---
title: "List Key Rotation History"
method: GET
path: "/v4/organizations/{organizationId}/cmek/{cmekId}/history"
tags: ["CMEK"]
---

# List Key Rotation History

`GET /v4/organizations/{organizationId}/cmek/{cmekId}/history`

## Request

- Base URL: `https://cloudapi.cloud.couchbase.com`
- URL: `https://cloudapi.cloud.couchbase.com/v4/organizations/{organizationId}/cmek/{cmekId}/history`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/couchbase/apis/couchbase-capella-management-api/docs/v4/organizations/:organizationId/cmek/:cmekId/history/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves the full history of rotations for a specific customer-managed encryption key within the organization.
In order to access this endpoint, the provided API key must have at least one of the following roles:
 - Organization Owner
 - Organization Member
To learn more, see [Organization, Project, and Database Access Overview](https://docs.couchbase.com/cloud/organizations/organization-projects-overview.html).

## Query parameters

- `page` integer
- `perPage` integer
- `sortBy` 'active' | 'associatedAt' | 'associatedBy' | 'key'
- `sortDirection` 'asc' | 'desc'

## Response `200`

Successfully fetched the key rotation history based on its ID.

- GetCMEKHistoryMetadataListResponse
  - `data` GetCMEKHistoryMetadataResponse[], required
    - `config` union
      - AWSConfig
        - `arn` string, required: The Amazon Resource Name (ARN) that uniquely identifies the AWS KMS key.
      - GCPConfig
        - `resourceName` string, required: The unique identifier for a GCP resource, specifying the project, location, key ring, and the key within Cloud KMS.
    - `active` boolean: Whether the key is currently active or not.
    - `key` string: The customer managed enycrption key name.
    - `associatedAt` string, date-time: The RFC3339 timestamp associated with when the resource was last modified.
    - `associatedBy` string: The user who last modified the key; this will be a UUID4 ID for standard users and will be a string such as "internal-support" for internal Couchbase support users.
  - `cursor` Cursor, required
    - `pages` Pages, required
      - `page` integer, required: Current page of results, starting from page 1.
      - `next` integer: Number of the next page of results. Not set on the last page.
      - `previous` integer: Number of the previous page of results. Not set on the first page.
      - `last` integer, required: Number of the last page of results.
      - `perPage` integer, required: Number of items displayed in each page.
      - `totalItems` integer, required: Total items found by the given query.
    - `hrefs` Hrefs, required
      - `first` string, uri, required: The base URL, endpoint, and path parameters required to fetch the first page of results.
      - `last` string, uri, required: The base URL, endpoint, and path parameters required to fetch the last page of results.
      - `previous` string, uri, required: The base URL, endpoint, and path parameters required to fetch the previous page of results. Empty if there is no previous page.
      - `next` string, uri, required: The base URL, endpoint, and path parameters required to fetch the next page of results. Empty if there is no next page.

## Other responses

- `403`: The client does not have the necessary permissions to access this resource.
- `404`: The requested resource was not found.
- `429`: Returned when the client exceeds the rate limit for the given APIKey.
- `500`: An unexpected error occurred in the server while processing this request.

---

[API](https://skmtc.dev/couchbase/apis/couchbase-capella-management-api.md) - [All operations](https://skmtc.dev/couchbase/apis/couchbase-capella-management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/couchbase/apis/couchbase-capella-management-api/revisions/fcc4f29578b1?raw)
