cURL
curl --request GET \
--url 'https://cockroachlabs.cloud/api/v1/service-accounts/{service_account_id}/credentials?pagination.page=SOME_STRING_VALUE&pagination.limit=SOME_INTEGER_VALUE&pagination.as_of_time=SOME_STRING_VALUE&pagination.sort_order=SOME_STRING_VALUE&status_filter=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'{
"credentials": [
{
"algorithm": "RS256",
"client_id": "crl-sa_abc123",
"created_at": "2022-03-22T20:23:11.285067Z",
"credential_type": "JWT_BEARER",
"expires_at": "2023-03-22T20:23:11.285067Z",
"id": "1234abcd-1234-1234-abcd-12345678abcd",
"name": "ci signer",
"service_account_id": "abcd1234-abcd-abcd-1234-abcdef123456"
}
],
"pagination": {}
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}List a service account's OAuth credentials
Sort order: created_at
Can be used by the following roles assigned at the organization scope:
- ORG_ADMIN
- CLUSTER_ADMIN
- AUDITOR
GET
/
api
/
v1
/
service-accounts
/
{service_account_id}
/
credentials
cURL
curl --request GET \
--url 'https://cockroachlabs.cloud/api/v1/service-accounts/{service_account_id}/credentials?pagination.page=SOME_STRING_VALUE&pagination.limit=SOME_INTEGER_VALUE&pagination.as_of_time=SOME_STRING_VALUE&pagination.sort_order=SOME_STRING_VALUE&status_filter=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'{
"credentials": [
{
"algorithm": "RS256",
"client_id": "crl-sa_abc123",
"created_at": "2022-03-22T20:23:11.285067Z",
"credential_type": "JWT_BEARER",
"expires_at": "2023-03-22T20:23:11.285067Z",
"id": "1234abcd-1234-1234-abcd-12345678abcd",
"name": "ci signer",
"service_account_id": "abcd1234-abcd-abcd-1234-abcdef123456"
}
],
"pagination": {}
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the service account whose credentials to list.
Query Parameters
- ASC: Sort in ascending order. This is the default unless otherwise specified.
- DESC: Sort in descending order.
Available options:
ASC, DESC Optional filter by credential status. Defaults to returning all credentials, active and disabled.
- ACTIVE: Only active (not disabled) credentials.
- DISABLED: Only disabled credentials.
Available options:
ACTIVE, DISABLED 
