Edit the Password of an Account

PUT

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

ParameterDescriptionValues

RESOURCEID

The ID of the resource for which the password needs to be edited.
Type : Integer
Mandatory : Yes

Default Value : N/A

ACCOUNTID

The ID of the account for which the password 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": {
		"NEWPASSWORD": "dinh&@!",
		"RESETTYPE": "LOCAL",
		"REASON": "Password Expired"
		}
	}
}

ParametersDescriptionValues

NEWPASSWORD

The new password to be set for the account.
Type : String
Mandatory : No

Default Value : N/A

RESETTYPE

Specifies how the password reset should be performed.
Type : String
Mandatory : No

Default Value : N/A

REASON

Reason provided for resetting the password.
Type : String
Mandatory : No

Default Value : N/A

Sample Request

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



Top