Fetch the Accounts that are Part of a Resource

GET

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

ParametersDescriptionValues

RESOURCEID

The ID of the resource whose accounts needs to be fetched.
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.

Query Parameters

INPUT_DATA = {
		"operation": {
			"Details": {
			"VIEWTYPE": "ALLMYPASSWORD",
			"GROUPID": 1,
			"SEARCHTYPE": "RESOURCE",
			"SEARCHCOLUMN": "ALL",
			"SEARCHVALUE": "administrator",
			"STARTINDEX": 1,
			"LIMIT": 10
			}
		}
}

ParametersDescriptionValues

VIEWTYPE

Specifies the category of passwords to retrieve.
Type : String
Mandatory : No

Default Value : ALLMYPASSWORD
Allowed Values : ALLMYPASSWORD, FAVOURITEPASSWORD, RECENTLYACCESSEDPASSWORD, LINUXSSHPASSWORD, WINDOWSRDPPASSWORD

GROUPID

ID of the group for which passwords are being fetched.
Type : Integer
Mandatory : No

Default Value : N/A

SEARCHTYPE

Defines whether the search should be performed on resources or accounts.
Type : String
Mandatory : No

Default Value : All accounts will be fetched.
Allowed Values : RESOURCE, ACCOUNT

SEARCHCOLUMN

Specifies the columns in which the search is performed.
Type : String
Mandatory : No

Default Value : N/A
Allowed Values : ALL, RESOURCE_TYPE, RESOURCENAME, RESOURCEDESC, IPADDRESS, LOGINNAME, OPERATINGSYSTEM, DEPARTMENT, LOCATION, DOMAINNAME, RESOURCEURL, COLUMN_CHAR[0-9], COLUMN_LONG[0-9], COLUMN_SCHAR[0-9], COLUMN_DATE[0-9], COLUMN_FILE[0-9]*

SEARCHVALUE

The keyword used for the search.
Type : String
Mandatory : No

Default Value : N/A

STARTINDEX

The index from which the result set should begin.
Type : String
Mandatory : No

Default Value : N/A

LIMIT

The maximum number of records to be retrieved.
Type : Integer
Mandatory : No

Default Value : N/A

Sample Request

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



Top