# 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 ```text https://:/restapi/json/v1/resources//accounts/ ``` | Parameter | Description | Values | |---|---|---| | **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 ```json { "AUTHTOKEN": "<>" } ``` | Parameter | Description | Values | |---|---|---| | **AUTHTOKEN** | Authentication token for the user to authorize the API request. Type: String. Mandatory: Yes | Default Value: N/A | ## Body Parameters ```json 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. 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 associated services 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 ### cURL ```bash curl -X PUT -H "AUTHTOKEN:<>" -H "Content-Type: application/x-www-form-urlencoded" https://:/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\"}]}}}" ``` ## Sample Response ```json { "operation": { "name": "EDIT ACCOUNT", "result": { "status": "Success", "message": "Account Test account modified successfully" } } } ```