# Fetch the Accounts that are Part of a Resource **Method:** `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 ```text https://:/restapi/json/v1/resources//accounts ``` | Parameters | Description | Values | |---|---|---| | **RESOURCEID** | The ID of the resource whose accounts needs to be fetched.
**Type :** Integer
**Mandatory :** Yes | **Default Value :** N/A | ## Header Parameters ```json { "AUTHTOKEN": "<>" } ``` | Parameter | Description | Values | |---|---|---| | **AUTHTOKEN** | Authentication token for the user to authorize the API request.
**Type :** String
**Mandatory :** Yes | **Default Value :** N/A | ## Query Parameters ```json 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.
**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 :** 100
**Maximum Value :** 100 | ## Sample Request ### cURL ```bash curl -G -H "Content-Type:application/x-www-form-urlencoded" -H "AUTHTOKEN:<>" "https://:/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\"}}}" ``` ## Sample Response ```json { "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" } } ```