Skip to content

OpenAPI and Swagger UI

OWOX Data Marts exposes OpenAPI specifications and Swagger UI for the HTTP API.

For OWOX Data Marts Cloud at https://app.owox.com, API documentation is available at:

For a self-managed OWOX Data Marts deployment at https://your-owox.example.com, use:

  • https://your-owox.example.com/api/openapi.json
  • https://your-owox.example.com/api/openapi.yaml
  • https://your-owox.example.com/api/swagger-ui

Use OpenAPI and Swagger UI to inspect available endpoints, request schemas, and response schemas.

  • Use owox-ctl when you want JSON terminal commands for automation or AI agents.
  • Use @owox/api-client when you build TypeScript or JavaScript integrations.
  • Use OpenAPI and Swagger UI when you need to inspect or integrate with the raw HTTP API directly.

Authenticated API requests require API key-based authentication. Start with API Keys before calling protected endpoints.

Raw HTTP API requests do not send the copied owox_key_... value directly. owox-ctl and @owox/api-client parse that value and perform the token exchange automatically.

If you integrate with the HTTP API directly, parse the copied API key value first:

  1. Remove the owox_key_ prefix.
  2. Base64url-decode the remaining value.
  3. Parse the decoded JSON object.
  4. Read apiOrigin, apiKeyId, and apiKeySecret.

Exchange the API Key ID and API Key Secret for an access token:

POST /api/auth/api-keys/exchange
Content-Type: application/json
X-OWOX-Api-Key-Id: <apiKeyId>
{
"apiKeySecret": "<apiKeySecret>"
}

Send this request to the decoded apiOrigin, for example https://app.owox.com/api/auth/api-keys/exchange.

The response contains an access token:

{
"accessToken": "<accessToken>"
}

Use that access token when calling protected endpoints:

GET /api/external/http-data/data-marts/<dataMartId>.ndjson
x-owox-authorization: Bearer <accessToken>
X-OWOX-Api-Key-Id: <apiKeyId>

Keep X-OWOX-Api-Key-Id on protected requests that use an access token created from an API key. The server binds API-key access tokens to their API Key ID.

The HTTP Data API can also stream a saved report’s data — applying the report’s stored filters, aggregations, date buckets, and sorting — instead of a Data Mart’s raw output. Pass an optional limit query parameter to cap rows:

GET /api/external/http-data/reports/<reportId>.ndjson
x-owox-authorization: Bearer <accessToken>
X-OWOX-Api-Key-Id: <apiKeyId>

Both endpoints include an x-owox-run-id response header when NDJSON streaming starts. Use it to look up the run and its executed query through the run history endpoint. The run exists when the headers arrive, if OWOX can record it. Its status is RUNNING until the stream ends. It holds the SQL and the totals when OWOX can produce them.

The Data Mart endpoint accepts includeTotalRowCount=true. The response then includes an x-owox-total-row-count header with the row count of the full result, without limit, as digits. The count is one more warehouse query. OWOX waits up to 60 s for it before the first row. BigQuery and Snowflake stop the query at that limit. On other storages the query runs to its end. The header is absent when the read does not ask, the count fails, or it takes longer than 60 s. The run records the count in additionalParams.httpData.totalRowCount, or the reason in additionalParams.httpData.totalRowCountError. An includeTotalRowCount value other than true or false returns 400 Bad Request. The report endpoint rejects the parameter.

Invalid query parameters, including output controls supplied to the Data Mart endpoint, return 400 Bad Request without a Run History entry. Errors in saved Data Mart or report configuration create a FAILED run. Project restrictions, such as an inactive project or an exceeded credit limit, create a RESTRICTED run.

Both HTTP Data endpoints save the SQL in additionalParams.httpData.executionSqlQuery, with parameter values inlined. The web UI shows this query in the run’s Executed SQL block, where it can be copied. The field is absent when OWOX cannot build the SQL. For a read without output controls, the reader runs its own query or reads the table directly. This SQL returns the same rows.

The same client and OWOX Data Marts server version is supported. Different versions are best effort.