cURL
curl --request GET \
--url 'https://cockroachlabs.cloud/api/v1/service-accounts?pagination.page=SOME_STRING_VALUE&pagination.limit=SOME_INTEGER_VALUE&pagination.as_of_time=SOME_STRING_VALUE&pagination.sort_order=SOME_STRING_VALUE&service_account_name=SOME_STRING_VALUE&roles=SOME_ARRAY_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'{
"service_accounts": [
{
"created_at": "2022-03-22T20:23:11.285067Z",
"creator_name": "creator",
"description": "",
"group_roles": [],
"id": "12345678-1234-1234-1234-123456789012",
"name": "SA Name",
"roles": [
{
"name": "CLUSTER_ADMIN",
"resource": {
"type": "ORGANIZATION"
}
}
]
}
],
"pagination": {
"next_page": "<string>",
"previous_page": "<string>"
}
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}List service accounts for an organization
Sort order: Service account name
Can be used by the following roles assigned at the organization scope:
- ORG_ADMIN
- CLUSTER_ADMIN
- AUDITOR
GET
/
api
/
v1
/
service-accounts
cURL
curl --request GET \
--url 'https://cockroachlabs.cloud/api/v1/service-accounts?pagination.page=SOME_STRING_VALUE&pagination.limit=SOME_INTEGER_VALUE&pagination.as_of_time=SOME_STRING_VALUE&pagination.sort_order=SOME_STRING_VALUE&service_account_name=SOME_STRING_VALUE&roles=SOME_ARRAY_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'{
"service_accounts": [
{
"created_at": "2022-03-22T20:23:11.285067Z",
"creator_name": "creator",
"description": "",
"group_roles": [],
"id": "12345678-1234-1234-1234-123456789012",
"name": "SA Name",
"roles": [
{
"name": "CLUSTER_ADMIN",
"resource": {
"type": "ORGANIZATION"
}
}
]
}
],
"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
Query Parameters
If specified, only service accounts holding at least one of these roles (either directly or via a group) are returned.
- FOLDER_ADMIN: Preview: A folder admin role.
- FOLDER_MOVER: Preview: A folder mover role.
- AUDITOR: Limited Access: An auditor role with org-wide, read-only visibility into configuration, identity, authorization, audit logs, and cluster metadata.
- CLUSTER_DATA_ACCESSOR: Limited Access: A cluster data accessor role with SQL and data access to clusters (databases, SQL shell, DB Console) without cluster-management privileges.
Available options:
BILLING_COORDINATOR, ORG_ADMIN, ORG_MEMBER, CLUSTER_ADMIN, CLUSTER_OPERATOR_WRITER, CLUSTER_DEVELOPER, CLUSTER_CREATOR, FOLDER_ADMIN, FOLDER_MOVER, METRICS_VIEWER, CLUSTER_MONITOR, BILLING_VIEWER, AUDITOR, CLUSTER_DATA_ACCESSOR 
