Skip to content
Docs

Warehouse

2 operations in the Adverity Connect API. Replace {{INSTANCE}} and {{KEY}} in the examples with your instance and API key. How authentication works.

Run a bounded read-only query against the workspace's warehouse

POST/api/v1/workspaces/{workspace_id}/warehouse/query/

API key permissionWarehouse: Read-onlywarehouse:read

Executes a single SELECT or WITH statement against the workspace's warehouse and returns rows. The result is always wrapped in an enforced LIMIT server-side (row_limit is a soft request, capped at 100). Times out after 45s regardless of row count -- narrow the query rather than retrying. A query on facts that uses SELECT * or filters no date column is rejected with 400 before it runs; violations lists each failed rule with a fix.

Path parameters

  • workspace_idstring · uuidrequired

Request bodyrequired

application/json

Body schema

object WarehouseQuerySchema

  • sqlstringrequired
  • row_limitinteger

    Default 100

Responses

200OKapplication/json

Response schema

object WarehouseQueryResultSchema

  • columnsarray of stringrequired
  • rowsarray of objectrequired
  • row_countintegerrequired
  • warehouse_typestringrequired
  • query_time_msintegerrequired
  • is_truncatedbooleanrequired

400Bad Requestapplication/json

Response schema

object WarehouseQueryRejectedSchema

  • detailstringrequired
  • violationsarray of object

    Default []

    Items · WarehouseQueryViolationSchema
    • rulestringrequired

      One of select_star_on_facts no_time_window

    • reasonstringrequired
    • fixstringrequired

List Adverity-tracked columns available for this workspace's warehouse data

GET/api/v1/workspaces/{workspace_id}/warehouse/schema/

API key permissionWarehouse: Read-onlywarehouse:read

Returns the columns Adverity has actually loaded data for on this workspace's branch -- not a raw introspection of the underlying Snowflake/BigQuery connection, which can be shared across other workspaces.

Path parameters

  • workspace_idstring · uuidrequired

Responses

200OKapplication/json

Response schema

object WarehouseSchemaResponseSchema

  • tablesarray of objectrequired
    Items · WarehouseTableSchema
    • namestringrequired
    • columnsarray of objectrequired
      Items · WarehouseColumnSchema
      • namestringrequired
      • typestringrequired
  • hintstring
Was this page helpful?