Generate Cube API Token

Beta

Generate a short-lived JWT token for direct access to the semantic model’s Cube REST API. Use this token to query /cubejs-api/v1/load and /cubejs-api/v1/meta directly. Token expires after 1 hour. The token carries only the model ID and schema hash — database credentials are NOT included and are resolved server-side by Cube via callback.

Authentication

X-API-KEYstring
API Key authentication via header
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

asset_idstringRequired

Response

Successful Response
cube_urlstring
Base URL of the Cube instance
expires_atstring
ISO 8601 timestamp when the token expires
tokenstring
JWT for direct Cube REST API access

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
422
Unprocessable Entity Error