---
title: "Fetch all accounts for a resource"
method: GET
path: "/restapi/json/v1/resources/{resourceId}/accounts"
tags: ["Accounts"]
---

# Fetch all accounts for a resource

`GET /restapi/json/v1/resources/{resourceId}/accounts`

## Request

- Base URL: `https://Hostname:Port`
- URL: `https://Hostname:Port/restapi/json/v1/resources/{resourceId}/accounts`
- Auth: API key in header `AUTHTOKEN`
- TypeScript: <https://skmtc.dev/manageengine/apis/pam360-rest-api/docs/restapi/json/v1/resources/:resourceId/accounts/get.ts> (a function with typed inputs; its response is checked against the schema)

Fetches all accounts associated with the specified resource. Supports optional filtering by view type, resource group, search keywords, and pagination.

## Path parameters

- `resourceId` integer, required

## Headers

- `orgName` string

## Response `200`

List of accounts

- GetAccountsForResourceResponse
  - `operation` object
    - `result` OperationResult
      - `message` string: Result message describing the operation outcome
      - `status` string: Operation status
    - `Details` object: Contains metadata of the resource and its associated accounts
      - `RESOURCE NAME` string: Name of the resource
      - `RESOURCE ID` string: Unique identifier of the resource
      - `RESOURCE TYPE` string: Type of the resource (e.g., Windows, Linux, etc.)
      - `RESOURCE DESCRIPTION` string: Description of the resource
      - `LOCATION` string: Location where the resource is deployed
      - `DNS NAME` string: DNS name or IP address of the resource
      - `DOMAIN NAME` string: Domain associated with the resource
      - `RESOURCE URL` string: Web URL associated with the resource
      - `RESOURCE OWNER` string: Name of the resource owner
      - `DEPARTMENT` string: Department to which the resource belongs
      - `RESOURCE PASSWORD POLICY` string: Password policy applied at resource level
      - `PASSWORDREQUEST_REASON_MANDATORY` string: Whether a reason is mandatory for password requests
      - `IS_LOCAL_ACCOUNTS_AUTOLOGON_RESTRICTED` string: Whether autologon is restricted for local accounts
      - `IS_SSH_RESTRICTED` string: Whether SSH access is restricted for this resource
      - `NEWSSHTERMINAL` string: Whether new SSH terminal is enabled
      - `IS_TOTP_SUPPORTED` string: Whether TOTP is supported for this resource
      - `ALLOWOPENURLINBROWSER` string: Whether opening the resource URL in browser is allowed
      - `ISRDPRESTRICTED` string: Whether RDP access is restricted for this resource
      - `ALLACCOUNTCOUNT` string: Total number of accounts under this resource
      - `CUSTOM FIELD` object[]: List of custom fields configured for the resource
        - `CUSTOMFIELDLABEL` string: Display label of the custom field
        - `CUSTOMFIELDTYPE` 'Character' | 'Date' | 'Numeric' | 'Password' | 'File': Data type of the custom field
        - `CUSTOMFIELDCOLUMNNAME` string: Internal column name for the custom field
        - `CUSTOMFIELDVALUE` string: Value of the custom field
      - `ACCOUNT LIST` AccountDetails[]: List of accounts associated with the resource
        - `ACCOUNT NAME` string: Name of the account
        - `ACCOUNT ID` string: Unique identifier of the account
        - `ACCOUNT_DESCRIPTION` string: Description of the account
        - `ACCOUNT PASSWORD POLICY` string: Password policy applied to the account
        - `PASSWORD STATUS` string: Current password status of the account
        - `ISFAVPASS` string: Indicates if this password is marked as favorite
        - `PASSWORDREQUEST_REASON_MANDATORY` string: Whether a reason is mandatory for password requests on this account
        - `AUTOLOGONLIST` string[]: List of autologon options configured for the account
        - `AUTOLOGONSTATUS` string: Status of the autologon feature
        - `ISREMOTEAPPONLY` string: Indicates if the account is used only for remote apps
        - `REMOTEAPPLIST` object: Remote applications configured for the account (dynamic keys like app1, app2, etc.)
        - `IS_USER_WITH_COMMAND_CONTROL_ROLE` string: Indicates if the user has command control role
        - `IS_COMMAND_CONTROL_CONFIGURED` string: Indicates if command control is configured for the account
        - `PASSWDID` string: ID of the password associated with the account
        - `IS_TICKETID_REQD` string: Indicates if a ticket ID is required for access
        - `IS_TICKETID_REQD_MANDATORY` string: Indicates if ticket ID is mandatory for access
        - `IS_TICKETID_REQD_ACW` string: Indicates if ticket ID is required for approval workflows
        - `IS_TOTP_CONFIGURED` string: Indicates if TOTP is configured for the account
        - `TOTP_VALIDITY` string: TOTP validity period in seconds (present when TOTP is configured)
        - `IS_PRIVATE_KEY_LOGIN_ENABLED` string: Indicates if private key login is enabled for the account
        - `IS_GATEWAY_SESSION_RECORDING_ENABLED` string: Indicates if gateway session recording is enabled
        - `IS_WEB_SESSION_RECORDING_ENABLED` string: Indicates if web session recording is enabled
        - `ISREASONREQUIRED` string: Indicates if access reason is required

---

[API](https://skmtc.dev/manageengine/apis/pam360-rest-api.md) - [All operations](https://skmtc.dev/manageengine/apis/pam360-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/manageengine/apis/pam360-rest-api/revisions/44a47abb4bdb?raw)
