Edit the Password of an Account
This API updates the password of a specific account in PAM360. The response confirms whether the password has been updated successfully.
Request URL
https://<Hostname-or-IP-address-of-PAM360-server>:<Port>/restapi/json/v1/resources/<RESOURCEID>/accounts/<ACCOUNTID>/password
| Parameter | Description | Values |
|---|---|---|
RESOURCEID | The ID of the resource for which the password needs to be edited. | Default Value : N/A |
ACCOUNTID | The ID of the account for which the password 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": {
"NEWPASSWORD": "dinh&@!",
"RESETTYPE": "LOCAL",
"REASON": "Password Expired"
}
}
}| Parameters | Description | Values |
|---|---|---|
NEWPASSWORD | The new password to be set for the account. | Default Value : N/A |
RESETTYPE | Specifies how the password reset should be performed. | Default Value : N/A |
REASON | Reason provided for resetting the password. | Default Value : N/A |
Sample Request
curl -X PUT -H "AUTHTOKEN:<<Authtoken_generated_from_PAM360>>" -H "Content-Type: text/json" --url https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/restapi/json/v1/resources/21/accounts/301/password --data-urlencode INPUT_DATA={"operation":{"Details":{"NEWPASSWORD":"Test12345$","RESETTYPE":"LOCAL","REASON":"Outdated Password","TICKETID":"7"}}}
import requests import json # API URL url = "https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/restapi/json/v1/resources/21/accounts/301/password" # Headers headers = { "AUTHTOKEN": "<<Authtoken-generated-from-PAM360>>", "Content-Type": "application/x-www-form-urlencoded" } # Payload payload = { "operation": { "Details": { "NEWPASSWORD": "dinh&@!", "RESETTYPE": "LOCAL", "REASON": "Password Expired" } } } # Send PUT request response = requests.put( url, headers=headers, data={ "INPUT_DATA": json.dumps(payload) }, verify=True ) # Print response print(response.status_code) print(response.text)
# API URL $Url = "https://<Host-Name or IP>:<Port>/restapi/json/v1/resources/21/accounts/301/password" # Headers $Headers = @{ "AUTHTOKEN" = "<<Authtoken-generated-from-PAM360>>" "Content-Type" = "application/x-www-form-urlencoded" } # Body parameters $Body = @{ "INPUT_DATA" = '{ "operation": { "Details": { "NEWPASSWORD": "Test@123", "RESETTYPE": "LOCAL", "REASON": "Password Expired" } } }' } # Invoke the PUT request $response = Invoke-WebRequest -Uri $Url -Headers $Headers -Method Put -Body $Body -UseBasicParsing # Display the API response $response.Content
Sample Response
{
"operation": {
"result": {
"message": "Password changed successfully",
"status": "Success"
},
"name": "CHANGE PASSWORD"
}
}