API Keys

Manage runtime API keys for apps

Get API keys

get

Returns the API keys for a specific app. API keys are used to authenticate requests to the Spice.ai runtime.

Authorizations
AuthorizationstringRequired

OAuth 2.0 access token obtained from the Spice.ai authentication service

Path parameters
appIdintegerRequired

The ID of the app

Responses
chevron-right
200

API keys for the app

application/json
api_keystring · nullableOptional

Primary API key

api_key_2string · nullableOptional

Secondary API key (for key rotation)

get
/v1/apps/{appId}/api-keys

Regenerate an API key

post

Regenerates an API key for the specified app. This invalidates the previous key. Use key_number to specify which key to regenerate (0 for both, 1 for primary, 2 for secondary).

Authorizations
AuthorizationstringRequired

OAuth 2.0 access token obtained from the Spice.ai authentication service

Path parameters
appIdintegerRequired

The ID of the app

Body
key_numberinteger · enumOptional

Which API key to regenerate (0 = both, 1 = primary, 2 = secondary)

Default: 1Possible values:
Responses
chevron-right
200

API key regenerated successfully

application/json
api_keystring · nullableOptional

Primary API key

api_key_2string · nullableOptional

Secondary API key

regenerated_keyinteger · enumOptional

Which key was regenerated (0 = both, 1 = primary, 2 = secondary)

Possible values:
post
/v1/apps/{appId}/api-keys

Last updated

Was this helpful?