Edit Resources
This API allows you to edit the details of an existing resource in PAM360. By providing the RESOURCEID of the resource, you can update its attributes such as name, type, owner, description, location, and any associated custom fields.
Request URL
https://<Hostname-or-IP-address-of-PAM360-server>:<Port>/restapi/json/v1/resources/<RESOURCEID>
| Parameter | Description | Values |
|---|---|---|
RESOURCEID | The ID of the resource. | Default Value : N/A |
Header Parameters
{
"AUTHTOKEN" : "<<Authtoken-generated-from-PAM360>>",
"orgName" : "<<org display name>>"
}| Parameter | Description | Values |
|---|---|---|
AUTHTOKEN | Authentication token for the user to authorize the API request. | Default Value : N/A |
orgName | Organization name available in PAM360. | Default Value : The organization to which the user belongs. |
Body Parameters
INPUT_DATA={
"operation": {
"Details": {
"RESOURCENAME": "Windows Server",
"LOCATION": "india",
"DNSNAME": "localhost",
"DEPARTMENT": "IT",
"OWNERNAME": "admin",
"RESOURCEURL": "http://windowsserver/adminconsole",
"RESOURCEDESCRIPTION": "Resource asda",
"RESOURCETYPE": "Windows",
"RESOURCETYPEID": 101,
"RESOURCEPASSWORDPOLICY": "Strong",
"RESOURCEPASSWORDPOLICYID": "101",
"RECORD_CONFIGURED_RESOURCE_URL": true,
"DISABLE_TAB_DUPLICATION": true,
"WEBSITE_SESSION_RECORDING": true,
"GATEWAY_SESSION_RECORDING": true,
"RESOURCECUSTOMFIELD": [
{
"CUSTOMLABEL": "Secure Resource",
"CUSTOMVALUE": "YES"
}
]
}
}
}| Parameters | Description | Values |
|---|---|---|
RESOURCENAME | Name of the resource to be edited. | Default Value : N/A |
LOCATION | Location of the resource. | Default Value : N/A |
DNSNAME | DNS name of the resource. | Default Value : N/A |
DEPARTMENT | Department to which the resource belongs. | Default Value : N/A |
OWNERNAME | Owner of the resource. | Default Value : N/A |
RESOURCEURL | The URL linked to the resource. | Default Value : N/A |
RESOURCEDESCRIPTION | Description of the resource. | Default Value : N/A |
RESOURCETYPE | Type of resource. | Default Value : N/A |
RESOURCEPASSWORDPOLICY | Password policy assigned to the resource. | Default Value : N/A |
RECORD_CONFIGURED_ | Enables session recording for the configured resource URL. When enabled, recording starts as soon as the resource URL is launched, including the login window, for sessions initiated through the PAM360 interface. | Default Value : N/A |
DISABLE_TAB_DUPLICATION | Specifies whether duplicate tabs for the resource are disabled. | Default Value : N/A |
WEBSITE_SESSION_RECORDING | Specifies whether website session recording is enabled. | Default Value : N/A |
GATEWAY_SESSION_RECORDING | Specifies whether gateway session recording is enabled. | Default Value : N/A |
RESOURCECUSTOMFIELD | Custom fields for the resource. Each object should have a CUSTOMLABEL and CUSTOMVALUE. | Default Value : N/A |
Sample Request
curl -X PUT -k "https://<Host-Name-or-IP-address-of-PAM360-Server>:<Port>/restapi/json/v1/resources/603" -H "Content-Type: application/x-www-form-urlencoded" -H "AUTHTOKEN: <Authtoken-generated-from-PAM360>" --data-urlencode "INPUT_DATA={\"operation\":{\"Details\":{\"RESOURCENAME\":\"Windows Server Operation\",\"DNSNAME\":\"127.0.0.1\",\"DEPARTMENT\":\"IT Services\",\"RESOURCEURL\":\"http://windowsserver\",\"RESOURCETYPE\":\"Windows Domain\",\"RESOURCEPASSWORDPOLICY\":\"Medium\",\"WEBSITE_SESSION_RECORDING\":false}}}"
#!/usr/bin/env python3
import requests
import urllib3
import json
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
def main():
config = {
"auth_token": "<<Authtoken-generated-from-PAM360>>",
"host_name": "https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>"
}
session = requests.Session()
session.verify = True
try:
test_url = f"{config['host_name']}/restapi/json/v1/resources/603"
headers = {
"AUTHTOKEN": config['auth_token'],
"Content-Type": "application/x-www-form-urlencoded"
}
payload = {
"INPUT_DATA": json.dumps({
"operation": {
"Details": {
"RESOURCENAME": "Windows Serveraa",
"DNSNAME": "127.0.0.1",
"DEPARTMENT": "IT Services",
"RESOURCEURL": "http://windowsserver",
"RESOURCETYPE": "Windows Domain"
}
}
})
}
response = session.put(test_url, headers=headers, data=payload, timeout=10)
print(response.text)
except Exception as e:
print(f"Error: {e}")
session.close()
if __name__ == "__main__":
main()# API endpoint $url = "https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/restapi/json/v1/resources/603" # Headers $headers = @{ "Content-Type" = "application/x-www-form-urlencoded" "AUTHTOKEN" = "<<Authtoken-generated-from-PAM360>>" } # Request body (INPUT_DATA) $body = @{ "INPUT_DATA" = @' { "operation": { "Details": { "RESOURCENAME": "Windows Server Operation", "DNSNAME": "127.0.0.1", "DEPARTMENT": "IT Services", "RESOURCEURL": "http://windowsserver", "RESOURCETYPE": "Windows Domain", "RESOURCEPASSWORDPOLICY": "Medium", "WEBSITE_SESSION_RECORDING": false } } } '@ } # Send PUT request $response = Invoke-WebRequest ` -Uri $url ` -Method Put ` -Headers $headers ` -Body $body ` # Print only the API response body $response.Content
Sample Response
{
"operation": {
"result": {
"message": "Resource Windows Server Operation modified successfully.",
"status": "Success"
},
"name": "EDIT RESOURCE"
}
}