Fetch a Password of an Account in a Resource

GET

This API fetches the password of a specific account within a resource in PAM360. The response indicates whether the password has been successfully fetched.

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 fetched.
Type : String
Mandatory : Yes

Default Value : N/A

ACCOUNTID

The ID of the account for which the password needs to be fetched.
Type : String
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.

Query Parameters

INPUT_DATA = {
"operation": {
	"Details": {
		"REASON": "Need the password to Login Windows Server",
		"TICKETID": "7"
		}
	}
}

ParametersDescriptionValues

REASON

Reason provided for accessing or requesting the password.
Type : String
Mandatory : No

Default Value : N/A

TICKETID

ID of the ticket associated with the request.
Type : Integer
Mandatory : No

Default Value : N/A

Sample Request

cURLPythonPowerShell
curl -G "https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/restapi/json/v1/resources/603/accounts/603/password" -H "AUTHTOKEN:<<Authtoken-generated-from-PAM360>>" -H "Content-Type:application/x-www-form-urlencoded" --data-urlencode "INPUT_DATA={\"operation\":{\"Details\":{\"REASON\":\"Need the password to Login Windows Server\"}}}"
import requests

url = "https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/restapi/json/v1/resources/603/accounts/603/password"

params = {
	"INPUT_DATA": """{
		"operation": {
			"Details": {
				"REASON": "Need the password to Login Windows Server"
			}
		}
	}"""
}

headers = {
	"AUTHTOKEN": "<<Authtoken-generated-from-PAM360>>",
	"Content-Type": "application/x-www-form-urlencoded"
}

response = requests.get(url, headers=headers, params=params, verify=True)

print(response.text)
		
$Url = "https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/restapi/json/v1/resources/603/accounts/603/password"

$Headers = @{
	"AUTHTOKEN" = "<<Authtoken-generated-from-PAM360>>"
	"Content-Type" = "application/x-www-form-urlencoded"
}

$Params = @{
	"INPUT_DATA" = '{"operation":{"Details":{"REASON":"Need the password to Login Windows Server"}}}'
}

$response = Invoke-WebRequest -Uri $Url -Headers $Headers -Method Get -Body $Params -UseBasicParsing  

$response.Content
		

Sample Response

{
  "operation": {
    "name": "GET PASSWORD",
    "result": {
      "status": "Success",
      "message": "Password fetched successfully"
    },
    "Details": {
      "PASSWORD": "by@1pBdasas"
    }
  }
}



Top