Edit Resources

PUT

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>

ParameterDescriptionValues

RESOURCEID

The ID of the resource.
Type : Long
Mandatory : Yes

Default Value : N/A

Header Parameters

{
	"AUTHTOKEN" : "<<Authtoken-generated-from-PAM360>>",
	"orgName"   : "<<org display name>>"
}

ParameterDescriptionValues

AUTHTOKEN

Authentication token for the user to authorize the API request.
Type : String
Mandatory : Yes

Default Value : N/A

orgName

Organization name available in PAM360.
Type : String
Mandatory : No

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"
		}
	]
	}
}
}

ParametersDescriptionValues

RESOURCENAME

Name of the resource to be edited.
Type : String
Mandatory : No

Default Value : N/A

LOCATION

Location of the resource.
Type : String
Mandatory : No

Default Value : N/A

DNSNAME

DNS name of the resource.
Type : String
Mandatory : No

Default Value : N/A

DEPARTMENT

Department to which the resource belongs.
Type : String
Mandatory : No

Default Value : N/A

OWNERNAME

Owner of the resource.
Type : String
Mandatory : No

Default Value : N/A

RESOURCEURL

The URL linked to the resource.
Type : URL
Mandatory : No

Default Value : N/A

RESOURCEDESCRIPTION

Description of the resource.
Type : String
Mandatory : No

Default Value : N/A

RESOURCETYPE

Type of resource.
Type : String
Mandatory : No

Default Value : N/A

RESOURCEPASSWORDPOLICY

Password policy assigned to the resource.
Type : String
Mandatory : No

Default Value : N/A
Allowed Value : The password policies available in PAM360.

RECORD_CONFIGURED_
RESOURCE_URL

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.
Type : Boolean
Mandatory : No
Supported Version :7500

Default Value : N/A

DISABLE_TAB_DUPLICATION

Specifies whether duplicate tabs for the resource are disabled.
Type : Boolean
Mandatory : No
Supported Version :7500

Default Value : N/A

WEBSITE_SESSION_RECORDING

Specifies whether website session recording is enabled.
Type : Boolean
Mandatory : No
Supported Version :7500

Default Value : N/A

GATEWAY_SESSION_RECORDING

Specifies whether gateway session recording is enabled.
Type : Boolean
Mandatory : No
Supported Version :7500

Default Value : N/A

RESOURCECUSTOMFIELD

Custom fields for the resource. Each object should have a CUSTOMLABEL and CUSTOMVALUE.
Type : JSON
Mandatory : No

Default Value : N/A

Sample Request

cURLPythonPowerShell
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"
  }
}



Top