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

# Get leases

`GET /leases`

## Query parameters

- `principalId` string
- `accountId` string
- `status` string
- `nextPrincipalId` string
- `nextAccountId` string
- `limit` integer

## Response `200`

OK

- Lease[]
  - `id` string — Lease ID
  - `principalId` string — principalId of the lease to get
  - `accountId` string — accountId of the AWS account
  - `leaseStatus` 'Active' | 'Decommissioned' | 'FinanceLock' | 'ResetLock' | 'ResetFinanceLock' — Status of the Lease. "Active": The principal is leased and has access to the account "Decommissioned": The principal was previously leased to the account, but now is not. "FinanceLock": The principal is leased to the account, but has hit a budget threshold, and is locked out of the account. "ResetLock": The principal is leased to the account, but the account is being reset. The principal's access is temporarily revoked, and will be given back after the reset process is complete. "ResetFinanceLock": The principal is leased to the account, but has been locked out for hitting a budget threshold. Additionally, the account is being reset. After reset, the principal's access will _not_ be restored, and the LeaseStatus will be set back to `ResetLock`.
  - `createdOn` number — creation date in epoch seconds
  - `lastModifiedOn` number — date last modified in epoch seconds
  - `budgetAmount` number — budget amount
  - `budgetCurrency` string — budget currency
  - `budgetNotificationEmails` string[] — budget notification emails
  - `leaseStatusModifiedOn` number — date lease status was last modified in epoch seconds
  - `requestedLeaseEnd` number — date lease should expire in epoch seconds

## Other responses

- `403` — Failed to authenticate request

## Changes

- **2019-10-21** `eed5055f8eb6` — 3 warning, 1 info
  - 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`
  - removed the non-success response with the status `400`

[Change history](https://skmtc.dev/optum/apis/namespace/changes/leases/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/eed5055f8eb6/schema)
