Create a service account and associate it with a user
Create a service account with organization administrator privilege, i.e., the service account property_is_organization_admin_ must be true. Next, create a user with role privileges you would like to have the service account and associate the service account with the user.Use tokens for authentication
To authenticate Firebolt using the service accounts with the properties as described above via Firebolt’s REST API, send the following request to receive an authentication token:Property | Data type | Description |
---|---|---|
client_id | TEXT | The service account ID. |
client_secret | TEXT | The service account secret. |
- The
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. - The
token_type
isBearer
, which means that the access token must be included in an authorization header of your API requests using the format:Authorization: Bearer <access_token>
. - The token
expires_in
indicates the number of seconds until the token expires.
Get the system engine URL
Use the following endpoint to return the system engine URL for<account name>
.
https://api.app.firebolt.io/web/v3/account/my-account/engineUrl
Response
Execute a query on the system engine
Use the following endpoint to run a query on the system engine:Property | Data type | Description |
---|---|---|
system engine URL | TEXT | The system engine URL (retrieved here) |
SQL query | TEXT | Any valid SQL query |
(optional) database name | TEXT | The database name |
Get a user engine URL
Get a user engine url by running the following query against theinformation_schema.engines
table:
Execute a query on a user engine
Use the following endpoint to run a query on a user engine:Property | Data type | Description |
---|---|---|
user engine URL | TEXT | The user engine URL (retrieved here) |
database name | TEXT | The database to run the query |
SQL query | TEXT | Any valid SQL query |
Queries are per request. To run multiple statement queries, separate queries each into one request.
OpenAPI spec
For a full definition of the query API, see the OpenAPI spec.API limits
Request Size Limits
By default, Firebolt enforces request size limits of 2 MiB for User Engines, and 32 KiB for the System Engine. If you exceed these limits, you will get an error like:- Requests above 2 MiB will not be retried internally after transient network errors.
- Requests above 2 MiB will not be included in online upgrade verification.