---
title: "Get accounts"
method: GET
path: "/accounts"
---

# Get accounts

`GET /accounts`

## Query parameters

- `id` string
- `status` string
- `adminRoleArn` string
- `principalRoleArn` string
- `principalPolicyHash` string
- `nextId` string
- `limit` integer

## Response `200`

OK

- Account[]
  - `id` string — AWS Account ID
  - `accountStatus` 'Ready' | 'NotReady' | 'Leased' | 'Orphaned' — Status of the Account. "Ready": The account is clean and ready for lease "NotReady": The account is in "dirty" state, and needs to be reset before it may be leased. "Leased": The account is leased to a principal
  - `adminRoleArn` string — ARN for an IAM role within this AWS account. The DCE master account will assume this IAM role to execute operations within this AWS account. This IAM role is configured by the client, and must be configured with [a Trust Relationship with the DCE master account.](/https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html)
  - `principalRoleArn` string — ARN for an IAM role within this AWS account. This role is created by the DCE master account, and may be assumed by principals to login to their AWS child account.
  - `principalPolicyHash` string — The S3 object ETag used to apply the Principal IAM Policy within this AWS account. This policy is created by the DCE master account, and is assumed by people with access to principalRoleArn.
  - `lastModifiedOn` integer — Epoch timestamp, when account record was last modified
  - `createdOn` integer — Epoch timestamp, when account record was created
  - `metadata` object — Any organization specific data pertaining to the account that needs to be persisted

## Other responses

- `403` — Unauthorized

## Changes

> 12 revisions in range; 3 could not be searched.

- **2020-01-13** `d532a85f38ef` — 4 info
  - added the new optional `query` request parameter `id`
  - added the new optional `query` request parameter `limit`
  - added the new optional `query` request parameter `nextId`
  - added the new optional `query` request parameter `status`
- **2019-10-21** `eed5055f8eb6` — 11 warning
  - the optional response header `Access-Control-Allow-Headers` removed for the status `200`
  - the optional response header `Access-Control-Allow-Methods` removed for the status `200`
  - the optional response header `Access-Control-Allow-Origin` removed for the status `200`
  - the optional response header `Link` removed for the status `200`
  - …7 more

[Change history](https://skmtc.dev/optum/apis/namespace/changes/accounts/get.md)

---

[API](https://skmtc.dev/optum/apis/namespace.md) · [All operations](https://skmtc.dev/optum/apis/namespace/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/optum/namespace/revisions/11d73002ea62/schema)
