Api keys

List Api Keys

get

List API keys associated with a service account.

Args: service_account_id: ID of the service account to which the API keys belong. hydrate: Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. filter_model: Filter model used for pagination, sorting, filtering

Returns: All API keys matching the filter and associated with the supplied service account.

Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
service_account_idstring · uuidRequired
Query parameters
hydratebooleanOptionalDefault: false
sort_bystringOptionalDefault: created
logical_operatorstring · enumOptional

Logical Ops to use to combine filters on list methods.

Default: andPossible values:
pageinteger · min: 1OptionalDefault: 1
sizeinteger · min: 1 · max: 10000OptionalDefault: 20
idany ofOptional
string · uuidOptional
or
stringOptional
or
nullOptional
createdany ofOptional
string · date-timeOptional
or
stringOptional
or
nullOptional
updatedany ofOptional
string · date-timeOptional
or
stringOptional
or
nullOptional
service_accountany ofOptional
string · uuidOptional
or
nullOptional
nameany ofOptional
stringOptional
or
nullOptional
descriptionany ofOptional
stringOptional
or
nullOptional
activeany ofOptional
booleanOptional
or
stringOptional
or
nullOptional
last_loginany ofOptional
string · date-timeOptional
or
stringOptional
or
nullOptional
last_rotatedany ofOptional
string · date-timeOptional
or
stringOptional
or
nullOptional
Responses
200

Successful Response

application/json
get
/api/v1/service_accounts/{service_account_id}/api_keys

Create Api Key

post

Creates an API key for a service account.

Args: service_account_id: ID of the service account for which to create the API key. api_key: API key to create.

Returns: The created API key.

Raises: IllegalOperationError: If the service account was created via external authentication.

Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
service_account_idstring · uuidRequired
Body

Request model for API keys.

namestring · max: 255Required
descriptionany ofOptional
string · max: 65535Optional
or
nullOptional
Responses
200

Successful Response

application/json
post
/api/v1/service_accounts/{service_account_id}/api_keys

Get Api Key

get

Returns the requested API key.

Args: service_account_id: ID of the service account to which the API key belongs. hydrate: Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. api_key_name_or_id: Name or ID of the API key to return.

Returns: The requested API key.

Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
service_account_idstring · uuidRequired
api_key_name_or_idany ofRequired
stringOptional
or
string · uuidOptional
Query parameters
hydratebooleanOptionalDefault: true
Responses
200

Successful Response

application/json
get
/api/v1/service_accounts/{service_account_id}/api_keys/{api_key_name_or_id}

Update Api Key

put

Updates an API key for a service account.

Args: service_account_id: ID of the service account to which the API key belongs. api_key_name_or_id: Name or ID of the API key to update. api_key_update: API key update.

Returns: The updated API key.

Raises: IllegalOperationError: If the service account was created via external authentication.

Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
service_account_idstring · uuidRequired
api_key_name_or_idany ofRequired
stringOptional
or
string · uuidOptional
Body

Update model for API keys.

nameany ofOptional
string · max: 255Optional
or
nullOptional
descriptionany ofOptional
string · max: 65535Optional
or
nullOptional
activeany ofOptional
booleanOptional
or
nullOptional
Responses
200

Successful Response

application/json
put
/api/v1/service_accounts/{service_account_id}/api_keys/{api_key_name_or_id}

Delete Api Key

delete

Deletes an API key.

Args: service_account_id: ID of the service account to which the API key belongs. api_key_name_or_id: Name or ID of the API key to delete.

Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
service_account_idstring · uuidRequired
api_key_name_or_idany ofRequired
stringOptional
or
string · uuidOptional
Responses
200

Successful Response

application/json
Responseany
delete
/api/v1/service_accounts/{service_account_id}/api_keys/{api_key_name_or_id}

No content

Last updated

Was this helpful?