Skip to Content
kosemdocs
ReferenceAPIService accounts

List service accounts in project

Lists the service accounts a project owns, or, as the project - with a filter that names an organization, those of the organization's projects that the caller holds identity.serviceAccounts.list on.

GET
/v1/projects/{project}/serviceAccounts

Lists the service accounts a project owns, or, as the project - with a filter that names an organization, those of the organization's projects that the caller holds identity.serviceAccounts.list on.

Authorization

bearer
headerAuthorizationBearer <token>

An access token, or an API key.

Path Parameters

project*string

The project's ID, or - for every project of the organization that filter names.

Match^(-|prj_[0-7][0-9a-hjkmnp-tv-z]{25})$

Query Parameters

pageSize?integer

Maximum number of items to return. Defaults to 50; values above 500 are treated as 500.

Formatint32
Range0 <= value
pageToken?string

Page token from a previous response.

filter?string

With the project -, and only then: organization = "organizations/{organization_id}". The list then holds the service accounts of every project of the organization that the caller holds identity.serviceAccounts.list on, without the organization's own.

Response Body

OK

application/json
  1. response
nextPageToken*string

Token for the next page; empty on the last page.

serviceAccounts*array<>

Service accounts, oldest first.

Example Request
curl -X GET 'https://api.kosem.ai/v1/projects/string/serviceAccounts'
Example Response
{
  "nextPageToken": "string",
  "serviceAccounts": [
    {
      "accountId": "string",
      "createTime": "2019-08-24T14:15:22Z",
      "description": "string",
      "displayName": "string",
      "name": "string",
      "state": "ACTIVE",
      "updateTime": "2019-08-24T14:15:22Z"
    }
  ]
}