cURL
curl --request GET \
--url 'https://cockroachlabs.cloud/api/v1/api-keys?service_account_id=SOME_STRING_VALUE&pagination.page=SOME_STRING_VALUE&pagination.limit=SOME_INTEGER_VALUE&pagination.as_of_time=SOME_STRING_VALUE&pagination.sort_order=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'{
"api_keys": [
{
"created_at": "2022-03-22T20:23:11.285067Z",
"id": "CCDB1_12345abcdefGHIJKLMnopq",
"name": "example name",
"service_account_id": "1234abcd-1234-1234-abcd-12345678abcd"
}
],
"pagination": {
"next_page": "<string>",
"previous_page": "<string>"
}
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Sort order: created_at
Can be used by the following roles assigned at the organization scope:
- ORG_ADMIN
- CLUSTER_ADMIN
- AUDITOR
GET
/
api
/
v1
/
api-keys
cURL
curl --request GET \
--url 'https://cockroachlabs.cloud/api/v1/api-keys?service_account_id=SOME_STRING_VALUE&pagination.page=SOME_STRING_VALUE&pagination.limit=SOME_INTEGER_VALUE&pagination.as_of_time=SOME_STRING_VALUE&pagination.sort_order=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'{
"api_keys": [
{
"created_at": "2022-03-22T20:23:11.285067Z",
"id": "CCDB1_12345abcdefGHIJKLMnopq",
"name": "example name",
"service_account_id": "1234abcd-1234-1234-abcd-12345678abcd"
}
],
"pagination": {
"next_page": "<string>",
"previous_page": "<string>"
}
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}This endpoint is in Preview and subject to change. Refer to the API support policy for more details.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Optional filter to limit the response to include only api keys for a specific service account.
- ASC: Sort in ascending order. This is the default unless otherwise specified.
- DESC: Sort in descending order.
Available options:
ASC, DESC 
