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
sqlstringrequiredrow_limitinteger
Responses
200OKapplication/json
Response schema
object WarehouseQueryResultSchema
columnsarray of stringrequiredrowsarray of objectrequiredrow_countintegerrequiredwarehouse_typestringrequiredquery_time_msintegerrequiredis_truncatedbooleanrequired
400Bad Requestapplication/json
Response schema
object WarehouseQueryRejectedSchema
detailstringrequiredviolationsarray of objectItems · WarehouseQueryViolationSchema
rulestringrequiredreasonstringrequiredfixstringrequired
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 objectrequiredItems · WarehouseTableSchema
namestringrequiredcolumnsarray of objectrequiredItems · WarehouseColumnSchema
namestringrequiredtypestringrequired
hintstring