Skip to Content
kosemdocs
ReferenceAPIService accounts

Get service account key in project

Gets a key, without its secret.

GET
/v1/projects/{project}/serviceAccounts/{serviceAccount}/keys/{key}

Gets a key, without its secret.

Authorization

bearer
headerAuthorizationBearer <token>

An access token, or an API key.

Path Parameters

project*string

The project's ID.

Match^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$
serviceAccount*string

The service account's ID.

Match^sa_[0-7][0-9a-hjkmnp-tv-z]{25}$
key*string

The key's ID.

Match^key_[0-7][0-9a-hjkmnp-tv-z]{25}$

Response Body

OK

application/json
  1. response
createTime*string

When the key was created.

Formatdate-time
expireTime*string

When the key stops working.

Formatdate-time
lastUseTime?string

When the key was last used, if it was.

Formatdate-time
name*string

Resource name, the service account's name followed by /keys/{key_id}.

secret?string

The secret, which is the API key, sent as a bearer token. Only in the response that creates the key: it cannot be read again. Audit log entries never keep it.

Example Request
curl -X GET 'https://api.kosem.ai/v1/projects/string/serviceAccounts/string/keys/string'
Example Response
{
  "createTime": "2019-08-24T14:15:22Z",
  "expireTime": "2019-08-24T14:15:22Z",
  "lastUseTime": "2019-08-24T14:15:22Z",
  "name": "string",
  "secret": "string"
}