Edit an Account Under a Specific Resource

PUT

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>

ParameterDescriptionValues

RESOURCEID

The ID of the resource under which the account is present.
Type : Integer
Mandatory : Yes

Default Value : N/A

ACCOUNTID

The ID of the account that needs to be edited.
Type : Integer
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": {
		"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
	}
}
}

ParametersDescriptionValues

ACCOUNTNAME

The name of the account to be updated.
Type : String
Mandatory : Yes

Default Value : N/A

ACCOUNTPASSWORDPOLICY

Password policy applied to the account.
Type : String
Mandatory : No

Default Value : N/A

RECORD_RDP_SESSIONS

Enables recording of RDP sessions for this account.
Type : Boolean
Mandatory : No

Default Value : N/A

RECORD_CLI_SESSIONS

Enables recording of CLI sessions for this account.
Type : Boolean
Mandatory : No

Default Value : N/A

DISABLE_PASSWORD_RESETS

Prevents automatic password resets.
Type : Boolean
Mandatory : No

Default Value : N/A

CONFIGURE_PASSWORD_RESET

Allows configuration of password reset for associated service accounts.
Type : Boolean
Mandatory : No

Default Value : N/A

ACCOUNT_RESOURCE_GROUP_IDS

The list of resource group IDs to which the account belongs.
Type : Integer Array
Mandatory : No

Default Value : N/A

IIS_WEB_CONFIG_RESET

Enables IIS Web Config reset during password reset.
Type : Boolean
Mandatory : No

Default Value : N/A

IIS_APP_POOL_RESTART

Restarts IIS Application Pool after password reset.
Type : Boolean
Mandatory : No

Default Value : N/A

IIS_APP_POOL_RESET

Resets IIS Application Pool during password reset.
Type : Boolean
Mandatory : No

Default Value : N/A

SERVICES_RESTART

Restarts associated services after password reset.
Type : Boolean
Mandatory : No

Default Value : N/A

SERVICES_RESET

Resets associated services during password reset.
Type : Boolean
Mandatory : No

Default Value : N/A

SCHEDULED_TASK_RESET

Resets scheduled tasks during password reset.
Type : Boolean
Mandatory : No

Default Value : N/A

NOTES

Additional notes related to the account.
Type : String
Mandatory : No

Default Value : N/A

COMMAND_SET

Command set ID associated with the account.
Type : Integer
Mandatory : No

Default Value : N/A

OWNERNAME

Name of the account owner.
Type : String
Mandatory : No

Default Value : N/A

TOTP_SECRET

Secret key for generating TOTP.
Type : String
Mandatory : No

Default Value : N/A

TOTP_ALGORITHM

Algorithm used for TOTP generation.
Type : String
Mandatory : No

Default Value : N/A

TOTP_DIGITS

Number of digits in TOTP.
Type : String
Mandatory : No

Default Value : N/A

TOTP_VALIDITY

Validity of TOTP in seconds.
Type : String
Mandatory : No

Default Value : N/A

DOMAINNAME

Domain name associated with the account.
Type : String
Mandatory : No

Default Value : N/A

DESCRIPTION

Description of the account.
Type : String
Mandatory : No

Default Value : N/A

SAP_USER_TYPE

Specifies the type of SAP user account to be modified.
Type : String
Mandatory : No
Supported Version : 8500

Default Value : N/A
Allowed Value : A (Dialog User), B (System User), C (Communication User), S (Service User), L (Reference User)

WEBSITE_SESSION_RECORDING

Enables website session recording.
Type : Boolean
Mandatory : No

Default Value : N/A

GATEWAY_SESSION_RECORDING

Enables gateway session recording.
Type : Boolean
Mandatory : No

Default Value : N/A

Sample Request

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



Top