Fetch the Accounts that are Part of a Resource
This API fetches all accounts that belong to a specific resource in PAM360. The response includes details of the resource and its associated accounts.
Request URL
https://<Hostname-or-IP-address-of-PAM360-server>:<Port>/restapi/json/v1/resources/<RESOURCEID>/accounts
| Parameters | Description | Values |
|---|---|---|
RESOURCEID | The ID of the resource whose accounts needs to be fetched. | 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. |
Query Parameters
INPUT_DATA = {
"operation": {
"Details": {
"VIEWTYPE": "ALLMYPASSWORD",
"GROUPID": 1,
"SEARCHTYPE": "RESOURCE",
"SEARCHCOLUMN": "ALL",
"SEARCHVALUE": "administrator",
"STARTINDEX": 1,
"LIMIT": 10
}
}
}| Parameters | Description | Values |
|---|---|---|
VIEWTYPE | Specifies the category of passwords to retrieve. | Default Value : ALLMYPASSWORD |
GROUPID | ID of the group for which passwords are being fetched. | Default Value : N/A |
SEARCHTYPE | Defines whether the search should be performed on resources or accounts. | Default Value : All accounts will be fetched. |
SEARCHCOLUMN | Specifies the columns in which the search is performed. | Default Value : N/A |
SEARCHVALUE | The keyword used for the search. | Default Value : N/A |
STARTINDEX | The index from which the result set should begin. | Default Value : N/A |
LIMIT | The maximum number of records to be retrieved. | Default Value : N/A |
Sample Request
curl -G -H "Content-Type:application/x-www-form-urlencoded" -H "AUTHTOKEN:<<Authtoken-generated-from-PAM360>>" "https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/restapi/json/v1/resources/603/accounts" --data-urlencode "INPUT_DATA={\"operation\":{\"Details\":{\"VIEWTYPE\":\"ALLMYPASSWORD\",\"STARTINDEX\":\"1\",\"LIMIT\":\"10\",\"SEARCHTYPE\":\"RESOURCE\",\"SEARCHVALUE\":\"administrator\",\"SEARCHCOLUMN\":\"ALL\",\"GROUPID\":\"1\"}}}"
import requests url = "https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/restapi/json/v1/resources/603/accounts" headers = { "AUTHTOKEN": "<<Authtoken-generated-from-PAM360>>", "Content-Type": "application/x-www-form-urlencoded" } input_data = { "operation": { "Details": { "VIEWTYPE": "ALLMYPASSWORD", "STARTINDEX": "0", "LIMIT": "10", "SEARCHTYPE": "RESOURCE", "SEARCHVALUE": "administrator", "SEARCHCOLUMN": "ALL" } } } params = { "INPUT_DATA": str(input_data).replace("'", '"') } response = requests.get(url, headers=headers, params=params, verify=True) print("Status:", response.status_code) print("Response:", response.text)
$Url = "https://<Hostname-or-IP-address-of-PAM360-server>:<Port>/restapi/json/v1/resources/603/accounts" $Headers = @{ "AUTHTOKEN" = "<<Authtoken-generated-from-PAM360>>"; "Content-Type" = "application/x-www-form-urlencoded" } $InputData = @{ operation = @{ Details = @{ VIEWTYPE = "ALLMYPASSWORD";STARTINDEX = "1";LIMIT = "10";SEARCHTYPE = "RESOURCE";SEARCHVALUE = "administrator";SEARCHCOLUMN = "ALL";GROUPID = "1"; } } } | ConvertTo-Json -Compress $Params = @{ INPUT_DATA = $InputData } $response = Invoke-WebRequest -Uri $Url -Headers $Headers -Method Get -Body $Params $response.Content
Sample Response
{
"operation": {
"result": {
"message": "Resource details with account list fetched successfully",
"status": "Success"
},
"Details": {
"LOCATION": "",
"RESOURCE DESCRIPTION": "",
"RESOURCE TYPE": "Windows",
"RESOURCE ID": "1",
"ACCOUNT LIST": [
{
"ACCOUNT_DESCRIPTION": "",
"ISFAVPASS": "false",
"ACCOUNT ID": "2",
"AUTOLOGONLIST": [
"Windows Remote Desktop",
"RDP Console Session",
"VNC"
],
"ACCOUNT NAME": "1561",
"PASSWORDREQUEST_REASON_MANDATORY": "true",
"PASSWORD STATUS": "****",
"ISREMOTEAPPONLY": "false",
"ACCOUNT PASSWORD POLICY": "Strong",
"IS_USER_WITH_COMMAND_CONTROL_ROLE": "true",
"AUTOLOGONSTATUS": "One of the resources or landing servers is configured to be connected repeatedly. Check your landing server configuration or contact your administrator.",
"IS_TICKETID_REQD_ACW": "false",
"IS_COMMAND_CONTROL_CONFIGURED": "false",
"PASSWDID": "2",
"IS_TICKETID_REQD_MANDATORY": "false",
"IS_TOTP_CONFIGURED": "false",
"IS_TICKETID_REQD": "false",
"ISREASONREQUIRED": "false"
},
{
"ACCOUNT_DESCRIPTION": "",
"ISFAVPASS": "false",
"ACCOUNT ID": "1",
"AUTOLOGONLIST": [
"Windows Remote Desktop",
"RDP Console Session",
"VNC"
],
"ACCOUNT NAME": "aaa1",
"PASSWORDREQUEST_REASON_MANDATORY": "true",
"PASSWORD STATUS": "****",
"ISREMOTEAPPONLY": "false",
"ACCOUNT PASSWORD POLICY": "Strong",
"IS_USER_WITH_COMMAND_CONTROL_ROLE": "true",
"AUTOLOGONSTATUS": "One of the resources or landing servers is configured to be connected repeatedly. Check your landing server configuration or contact your administrator.",
"IS_TICKETID_REQD_ACW": "false",
"IS_COMMAND_CONTROL_CONFIGURED": "false",
"PASSWDID": "1",
"IS_TICKETID_REQD_MANDATORY": "false",
"IS_TOTP_CONFIGURED": "false",
"IS_TICKETID_REQD": "false",
"ISREASONREQUIRED": "false"
}
],
"DEPARTMENT": "",
"PASSWORDREQUEST_REASON_MANDATORY": "true",
"RESOURCE OWNER": "admin",
"RESOURCE PASSWORD POLICY": "Strong",
"IS_LOCAL_ACCOUNTS_AUTOLOGON_RESTRICTED": "false",
"RESOURCE URL": "",
"IS_SSH_RESTRICTED": "false",
"NEWSSHTERMINAL": "false",
"DOMAIN NAME": "",
"ALLOWOPENURLINBROWSER": "true",
"RESOURCE NAME": "administrator",
"DNS NAME": "",
"ISRDPRESTRICTED": "false"
},
"name": "GET RESOURCE ACCOUNTLIST"
}
}