---
title: "Fetch resource ID and account ID by names"
method: GET
path: "/restapi/json/v1/resources/getResourceIdAccountId"
tags: ["Resources"]
---

# Fetch resource ID and account ID by names

`GET /restapi/json/v1/resources/getResourceIdAccountId`

## Request

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

This operation is used to fetch the resource ID and account ID by providing the resource name and account name

## Query parameters

- `RESOURCENAME` string, required
- `ACCOUNTNAME` string, required

## Headers

- `orgName` string

## Response `200`

Resource ID and Account ID

- GetResourceIdAccountIdResponse
  - `operation` object
    - `result` OperationResult
      - `message` string: Result message describing the operation outcome
      - `status` string: Operation status
    - `Details` object
      - `ACCOUNTID` string: Unique identifier for the account
      - `RESOURCEID` string: Unique identifier for the resource
    - `name` string

---

[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)
