Edit an Account Under a Specific Resource
This API edits the details of an existing account under a specific resource in PAM360. The response confirms whether the account was successfully updated with the new information.
Request URL
https://<Hostname-or-IP-address-of-PAM360-server>:<Port>/restapi/json/v1/resources/<RESOURCEID>/accounts/<ACCOUNTID>
| Parameter | Description | Values |
|---|---|---|
RESOURCEID | The ID of the resource under which the account is present. | Default Value : N/A |
ACCOUNTID | The ID of the account that needs to be edited. | 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": {
"ACCOUNTNAME": "bestest013",
"ACCOUNTPASSWORDPOLICY": "Strong",
"ACCOUNTPASSWORDPOLICYID": 101,
"RECORD_RDP_SESSIONS": true,
"RECORD_CLI_SESSIONS": true,
"DISABLE_PASSWORD_RESETS": true,
"CONFIGURE_PASSWORD_RESET": true,
"ACCOUNT_RESOURCE_GROUP_IDS": ["3002","3003"],
"IIS_WEB_CONFIG_RESET": true,
"IIS_APP_POOL_RESTART": true,
"IIS_APP_POOL_RESET": true,
"SERVICES_RESTART": true,
"SERVICES_RESET": true,
"SCHEDULED_TASK_RESET": true,
"NOTES": "IT Security - BES PAM API Test",
"COMMAND_SET": 1000,
"OWNERNAME": "admin",
"TOTP_SECRET": "829 198",
"TOTP_ALGORITHM": "SHA256",
"TOTP_DIGITS": "6",
"TOTP_VALIDITY": "30",
"DOMAINNAME": "domain",
"DESCRIPTION": "Windows account",
"SAP_USER_TYPE": "A",
"WEBSITE_SESSION_RECORDING": true,
"GATEWAY_SESSION_RECORDING": false
}
}
}| Parameters | Description | Values |
|---|---|---|
ACCOUNTNAME | The name of the account to be updated. | Default Value : N/A |
ACCOUNTPASSWORDPOLICY | Password policy applied to the account. | Default Value : N/A |
RECORD_RDP_SESSIONS | Enables recording of RDP sessions for this account. | Default Value : N/A |
RECORD_CLI_SESSIONS | Enables recording of CLI sessions for this account. | Default Value : N/A |
DISABLE_PASSWORD_RESETS | Prevents automatic password resets. | Default Value : N/A |
CONFIGURE_PASSWORD_RESET | Allows configuration of password reset for associated service accounts. | Default Value : N/A |
ACCOUNT_RESOURCE_GROUP_IDS | The list of resource group IDs to which the account belongs. | Default Value : N/A |
IIS_WEB_CONFIG_RESET | Enables IIS Web Config reset during password reset. | Default Value : N/A |
IIS_APP_POOL_RESTART | Restarts IIS Application Pool after password reset. | Default Value : N/A |
IIS_APP_POOL_RESET | Resets IIS Application Pool during password reset. | Default Value : N/A |
SERVICES_RESTART | Restarts associated services after password reset. | Default Value : N/A |
SERVICES_RESET | Resets associated services during password reset. | Default Value : N/A |
SCHEDULED_TASK_RESET | Resets scheduled tasks during password reset. | Default Value : N/A |
NOTES | Additional notes related to the account. | Default Value : N/A |
COMMAND_SET | Command set ID associated with the account. | Default Value : N/A |
OWNERNAME | Name of the account owner. | Default Value : N/A |
TOTP_SECRET | Secret key for generating TOTP. | Default Value : N/A |
TOTP_ALGORITHM | Algorithm used for TOTP generation. | Default Value : N/A |
TOTP_DIGITS | Number of digits in TOTP. | Default Value : N/A |
TOTP_VALIDITY | Validity of TOTP in seconds. | Default Value : N/A |
DOMAINNAME | Domain name associated with the account. | Default Value : N/A |
DESCRIPTION | Description of the account. | Default Value : N/A |
SAP_USER_TYPE | Specifies the type of SAP user account to be modified. | Default Value : N/A |
WEBSITE_SESSION_RECORDING | Enables website session recording. | Default Value : N/A |
GATEWAY_SESSION_RECORDING | Enables gateway session recording. | Default Value : N/A |
Sample Request
curl -X PUT -H "AUTHTOKEN:<<Authtoken-generated-from-PAM360>>" -H "Content-Type: text/json" https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/restapi/json/v1/resources/21/accounts/901 --data-urlencode "INPUT_DATA={\"operation\":{ \"Details\":{\"ACCOUNTNAME\" : \"Test account\",\"ACCOUNTPASSWORDPOLICY\":\"Strong\",\"NOTES\":\"Created for quality assurance\", \"SAP_USER_TYPE\":\"A\", \"ACCOUNTCUSTOMFIELD\" : [{\"CUSTOMLABEL\" : \"Secure Account\", \"CUSTOMVALUE\" : \"YES\"}]}}}"
import requests import json url = "https://<Hostname-or-IP-address-of-PAM360-server>:<Port>/restapi/json/v1/resources/2101/accounts/2703" headers = { "AUTHTOKEN": "<<Authtoken-generated-from-PAM360>>", "Content-Type": "application/x-www-form-urlencoded" } payload = { "INPUT_DATA": json.dumps({ "operation": { "Details": { "ACCOUNTNAME": "bestest013", "ACCOUNTPASSWORDPOLICY": "Strong", "RECORD_RDP_SESSIONS": True, "RECORD_CLI_SESSIONS": True, "DISABLE_PASSWORD_RESETS": True, "CONFIGURE_PASSWORD_RESET": True, "ACCOUNT_RESOURCE_GROUP_IDS": ["3002", "3003"], "IIS_WEB_CONFIG_RESET": True, "IIS_APP_POOL_RESTART": True, "IIS_APP_POOL_RESET": True, "SERVICES_RESTART": True, "SERVICES_RESET": True, "SCHEDULED_TASK_RESET": True, "NOTES": "hello", "COMMAND_SET": 1000, "OWNERNAME": "admin", "TOTP_SECRET": "AVDDO", "TOTP_ALGORITHM": "SHA256", "TOTP_DIGITS": "6", "TOTP_VALIDITY": "30", "DOMAINNAME": "domain", "SAP_USER_TYPE": "A", "WEBSITE_SESSION_RECORDING": True, "GATEWAY_SESSION_RECORDING": True } } }) } response = requests.put( url, headers=headers, data=payload, verify=True ) print("Status Code:", response.status_code) print("Response:", response.text)
$url = "https://<Hostname-or-IP-address-of-PAM360-server>:<Port>/restapi/json/v1/resources/21/accounts/901" $headers = @{ "AUTHTOKEN" = "<<Authtoken-generated-from-PAM360>>"; "Content-Type" = "application/x-www-form-urlencoded" } $payload = @{ operation = @{ Details = @{ ACCOUNTNAME = "bestest013"; ACCOUNTPASSWORDPOLICY = "Strong"; RECORD_RDP_SESSIONS = $true; RECORD_CLI_SESSIONS = $true; DISABLE_PASSWORD_RESETS = $true; CONFIGURE_PASSWORD_RESET = $true; ACCOUNT_RESOURCE_GROUP_IDS = @("3002","3003"); IIS_WEB_CONFIG_RESET = $true; IIS_APP_POOL_RESTART = $true; IIS_APP_POOL_RESET = $true; SERVICES_RESTART = $true; SERVICES_RESET = $true; SCHEDULED_TASK_RESET = $true; NOTES = "hello"; COMMAND_SET = 10000; OWNERNAME = "admin"; TOTP_SECRET = "ASDJDSA"; TOTP_ALGORITHM = "SHA256"; TOTP_DIGITS = "6"; TOTP_VALIDITY = "30"; DOMAINNAME = "domain"; SAP_USER_TYPE = "A"; WEBSITE_SESSION_RECORDING = $true; GATEWAY_SESSION_RECORDING = $false; } } } $body = @{ INPUT_DATA = ($payload | ConvertTo-Json -Depth 6) } $response = Invoke-RestMethod ` -Uri $url ` -Headers $headers ` -Method Put ` -Body $body $response
Sample Response
{
"operation": {
"name": "EDIT ACCOUNT",
"result": {
"status": "Success",
"message": "Account Test account modified successfully"
}
}
}