Create and manage programmatic access.
CREATE SERVICE ACCOUNT IF NOT EXISTS "service_account_name" WITH DESCRIPTION = 'service account 1';
CALL fb_GENERATESERVICEACCOUNTKEY('service_account_name')
CALL fb_GENERATESERVICEACCOUNTKEY
command in the previous code example returns both the service account ID and secret. Once you retrieve this secret, you cannot retrieve it again later.
CREATE USER alex WITH SERVICE_ACCOUNT = service_account_name;
alex
, and associates it with a service account by its service_account_name
.
For more information, see Manage users.
curl -X POST --location 'https://id.app.firebolt.io/oauth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'audience=https://api.firebolt.io' \
--data-urlencode "client_id=${service_account_id}" \
--data-urlencode "client_secret=${service_account_secret}"
service_account_id
and service_account_secret
.
The following is an example response to the REST API request:
Response:
{
"access_token":"eyJz93a...k4laUWw",
"token_type":"Bearer",
"expires_in":86400
}
access_token
is a unique token that authorizes your API requests that acts as a temporary key to access resources or perform actions. You can use this token to authenticate with Firebolt’s platform until it expires.token_type
is Bearer
, which means that the access token must be included in an authorization header of your API requests using the format: Authorization: Bearer <access_token>
.expires_in
indicates the number of seconds until the token expires.access_token
to authenticate with Firebolt.
ALTER SERVICE ACCOUNT service_account_name SET NETWORK_POLICY = my_network_policy
DROP SERVICE ACCOUNT service_account_name;