هذه الصفحة غير متاحة بالعربية بعد، وتُعرض بالإنجليزية.
Dexwize Query Service
Visual queries, saved queries, exports, alerts and a read-only OData v4 feed (E17, ADR-0031). A query is a structured model, never SQL; it compiles only through the TenantQuery whitelist layer, which injects the caller's tenant predicate and binds every value. Pseudonymised and tenant columns are not exposed and application usage is excluded (usage-service enforces k-anonymity there). Every run and export is audited. The /v1 endpoints take a bearer token; the OData feed takes a tenant-scoped API key.
Version 1.0.0. Download the OpenAPI specification.
Authentication: bearer, apiKey, apiKeyQuery.
Operations
| Method | Path | Summary |
|---|---|---|
GET | /odata/v1/ | OData v4 service document listing saved queries as entity sets |
GET | /odata/v1/{entitySet} | Rows of a saved query |
GET | /odata/v1/$metadata | CSDL metadata for the saved queries |
GET | /v1/coverage | Fleet collection coverage, the gaps agents reported in a window (FindingsRead) |
GET | /v1/coverage/devices/{deviceId} | Collection gaps one device reported in a window (FindingsRead) |
GET | /v1/query/alerts | List saved-query alerts (FindingsRead) |
POST | /v1/query/alerts | Create an alert on a saved query measure (TenantManage) |
DELETE | /v1/query/alerts/{id} | Delete an alert (TenantManage) |
POST | /v1/query/alerts/evaluate | Evaluate this tenant's alerts now (FindingsRead) |
GET | /v1/query/api-keys | List OData API keys without secrets (TenantManage) |
POST | /v1/query/api-keys | Create an OData API key (TenantManage) |
DELETE | /v1/query/api-keys/{id} | Revoke an API key (TenantManage) |
GET | /v1/query/datasets | Datasets and columns available to the query builder (FindingsRead) |
POST | /v1/query/run | Run an ad-hoc query (FindingsRead) |
GET | /v1/query/saved | List saved queries (FindingsRead) |
POST | /v1/query/saved | Save a query (FindingsRead) |
GET | /v1/query/saved/{id} | Get a saved query (FindingsRead) |
DELETE | /v1/query/saved/{id} | Delete a saved query (FindingsRead) |
GET | /v1/query/saved/{id}/export | Export a saved query (ReportsRead; rate limited; capped rows; audited) |
POST | /v1/query/saved/{id}/run | Run a saved query over its rolling window (FindingsRead) |
GET /odata/v1/
OData v4 service document listing saved queries as entity sets
Read-only. Authenticate with the X-Api-Key header (Power BI Web connector) or the api_key query parameter (Excel). The key decides the tenant. In Power BI choose Get Data, OData feed, then the root URL; in Excel choose Data, From OData Feed.
| Status | Description | Body |
|---|---|---|
| 200 | Service document | object |
| 401 | Missing, unknown or revoked key | |
| 403 | The caller lacks the permission (empty body), or the tenant's plan, add-ons, licence and overrides do not include the feature (error feature_not_entitled, ADR-0053). | EntitlementRefusal |
| 503 | The tenant's entitlements could not be confirmed and nothing usable was cached, so the paid feature is refused (fail closed, ADR-0053). Retry-After is set. | EntitlementRefusal |
GET /odata/v1/{entitySet}
Rows of a saved query
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
entitySet | path | string | yes | |
$top | query | integer | no | |
$skip | query | integer | no |
| Status | Description | Body |
|---|---|---|
| 200 | Rows | object |
| 400 | $top or $skip out of range | |
| 401 | Missing, unknown or revoked key | |
| 403 | The caller lacks the permission (empty body), or the tenant's plan, add-ons, licence and overrides do not include the feature (error feature_not_entitled, ADR-0053). | EntitlementRefusal |
| 404 | No saved query with this name | |
| 503 | The tenant's entitlements could not be confirmed and nothing usable was cached, so the paid feature is refused (fail closed, ADR-0053). Retry-After is set. | EntitlementRefusal |
GET /odata/v1/$metadata
CSDL metadata for the saved queries
| Status | Description | Body |
|---|---|---|
| 200 | CSDL XML | |
| 401 | Missing, unknown or revoked key | |
| 403 | The caller lacks the permission (empty body), or the tenant's plan, add-ons, licence and overrides do not include the feature (error feature_not_entitled, ADR-0053). | EntitlementRefusal |
| 503 | The tenant's entitlements could not be confirmed and nothing usable was cached, so the paid feature is refused (fail closed, ADR-0053). Retry-After is set. | EntitlementRefusal |
GET /v1/coverage
Fleet collection coverage, the gaps agents reported in a window (FindingsRead)
Each row is one collector, item and reason with the number of devices that reported it. Agents send a gap at most once a day per collector, item and reason; labels are fixed and never carry paths or error text.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
days | query | integer | no |
| Status | Description | Body |
|---|---|---|
| 200 | OK | FleetCoverage |
| 400 | Days outside 1 to 90 |
GET /v1/coverage/devices/{deviceId}
Collection gaps one device reported in a window (FindingsRead)
Another tenant's device returns an empty list, never its data.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
deviceId | path | string | yes | |
days | query | integer | no |
| Status | Description | Body |
|---|---|---|
| 200 | OK | DeviceCoverage |
| 400 | Days outside 1 to 90 |
GET /v1/query/alerts
List saved-query alerts (FindingsRead)
| Status | Description | Body |
|---|---|---|
| 200 | OK | QueryAlert[] |
| 403 | The caller lacks the permission (empty body), or the tenant's plan, add-ons, licence and overrides do not include the feature (error feature_not_entitled, ADR-0053). | EntitlementRefusal |
| 503 | The tenant's entitlements could not be confirmed and nothing usable was cached, so the paid feature is refused (fail closed, ADR-0053). Retry-After is set. | EntitlementRefusal |
POST /v1/query/alerts
Create an alert on a saved query measure (TenantManage)
When the measure in the first row crosses the threshold, a query_alert event goes to notification-service, which delivers it to the tenant's channels, including signed outbound webhooks. At most one notification per alert per day.
Request body: object (JSON).
| Status | Description | Body |
|---|---|---|
| 201 | Created | QueryAlert |
| 400 | Measure is not in the saved query | |
| 403 | The caller lacks the permission (empty body), or the tenant's plan, add-ons, licence and overrides do not include the feature (error feature_not_entitled, ADR-0053). | EntitlementRefusal |
| 404 | Unknown saved query | |
| 503 | The tenant's entitlements could not be confirmed and nothing usable was cached, so the paid feature is refused (fail closed, ADR-0053). Retry-After is set. | EntitlementRefusal |
DELETE /v1/query/alerts/{id}
Delete an alert (TenantManage)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 204 | Deleted | |
| 403 | The caller lacks the permission (empty body), or the tenant's plan, add-ons, licence and overrides do not include the feature (error feature_not_entitled, ADR-0053). | EntitlementRefusal |
| 404 | Unknown or another tenant's | |
| 503 | The tenant's entitlements could not be confirmed and nothing usable was cached, so the paid feature is refused (fail closed, ADR-0053). Retry-After is set. | EntitlementRefusal |
POST /v1/query/alerts/evaluate
Evaluate this tenant's alerts now (FindingsRead)
| Status | Description | Body |
|---|---|---|
| 200 | One result per enabled alert | object[] |
| 403 | The caller lacks the permission (empty body), or the tenant's plan, add-ons, licence and overrides do not include the feature (error feature_not_entitled, ADR-0053). | EntitlementRefusal |
| 503 | The tenant's entitlements could not be confirmed and nothing usable was cached, so the paid feature is refused (fail closed, ADR-0053). Retry-After is set. | EntitlementRefusal |
GET /v1/query/api-keys
List OData API keys without secrets (TenantManage)
| Status | Description | Body |
|---|---|---|
| 200 | OK | ApiKey[] |
| 403 | The caller lacks the permission (empty body), or the tenant's plan, add-ons, licence and overrides do not include the feature (error feature_not_entitled, ADR-0053). | EntitlementRefusal |
| 503 | The tenant's entitlements could not be confirmed and nothing usable was cached, so the paid feature is refused (fail closed, ADR-0053). Retry-After is set. | EntitlementRefusal |
POST /v1/query/api-keys
Create an OData API key (TenantManage)
The secret is returned once in this response. Only its SHA-256 hash is stored; it cannot be shown again.
Request body: object (JSON).
| Status | Description | Body |
|---|---|---|
| 201 | Created | object |
| 403 | The caller lacks the permission (empty body), or the tenant's plan, add-ons, licence and overrides do not include the feature (error feature_not_entitled, ADR-0053). | EntitlementRefusal |
| 503 | The tenant's entitlements could not be confirmed and nothing usable was cached, so the paid feature is refused (fail closed, ADR-0053). Retry-After is set. | EntitlementRefusal |
DELETE /v1/query/api-keys/{id}
Revoke an API key (TenantManage)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 204 | Revoked | |
| 403 | The caller lacks the permission (empty body), or the tenant's plan, add-ons, licence and overrides do not include the feature (error feature_not_entitled, ADR-0053). | EntitlementRefusal |
| 404 | Unknown or another tenant's | |
| 503 | The tenant's entitlements could not be confirmed and nothing usable was cached, so the paid feature is refused (fail closed, ADR-0053). Retry-After is set. | EntitlementRefusal |
GET /v1/query/datasets
Datasets and columns available to the query builder (FindingsRead)
| Status | Description | Body |
|---|---|---|
| 200 | OK | Dataset[] |
| 403 | The caller lacks the permission (empty body), or the tenant's plan, add-ons, licence and overrides do not include the feature (error feature_not_entitled, ADR-0053). | EntitlementRefusal |
| 503 | The tenant's entitlements could not be confirmed and nothing usable was cached, so the paid feature is refused (fail closed, ADR-0053). Retry-After is set. | EntitlementRefusal |
POST /v1/query/run
Run an ad-hoc query (FindingsRead)
Request body: QuerySpec (JSON).
| Status | Description | Body |
|---|---|---|
| 200 | Rows | QueryResult |
| 400 | Unknown dataset or column, bad shape, range over 90 days or limit over the maximum | |
| 403 | The caller lacks the permission (empty body), or the tenant's plan, add-ons, licence and overrides do not include the feature (error feature_not_entitled, ADR-0053). | EntitlementRefusal |
| 503 | The tenant's entitlements could not be confirmed and nothing usable was cached, so the paid feature is refused (fail closed, ADR-0053). Retry-After is set. | EntitlementRefusal |
GET /v1/query/saved
List saved queries (FindingsRead)
| Status | Description | Body |
|---|---|---|
| 200 | OK | SavedQuery[] |
| 403 | The caller lacks the permission (empty body), or the tenant's plan, add-ons, licence and overrides do not include the feature (error feature_not_entitled, ADR-0053). | EntitlementRefusal |
| 503 | The tenant's entitlements could not be confirmed and nothing usable was cached, so the paid feature is refused (fail closed, ADR-0053). Retry-After is set. | EntitlementRefusal |
POST /v1/query/saved
Save a query (FindingsRead)
Request body: object (JSON).
| Status | Description | Body |
|---|---|---|
| 201 | Saved | SavedQuery |
| 400 | Invalid name or query | |
| 403 | The caller lacks the permission (empty body), or the tenant's plan, add-ons, licence and overrides do not include the feature (error feature_not_entitled, ADR-0053). | EntitlementRefusal |
| 409 | Name already used in this tenant | |
| 503 | The tenant's entitlements could not be confirmed and nothing usable was cached, so the paid feature is refused (fail closed, ADR-0053). Retry-After is set. | EntitlementRefusal |
GET /v1/query/saved/{id}
Get a saved query (FindingsRead)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | OK | SavedQuery |
| 403 | The caller lacks the permission (empty body), or the tenant's plan, add-ons, licence and overrides do not include the feature (error feature_not_entitled, ADR-0053). | EntitlementRefusal |
| 404 | Unknown or another tenant's | |
| 503 | The tenant's entitlements could not be confirmed and nothing usable was cached, so the paid feature is refused (fail closed, ADR-0053). Retry-After is set. | EntitlementRefusal |
DELETE /v1/query/saved/{id}
Delete a saved query (FindingsRead)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 204 | Deleted | |
| 403 | The caller lacks the permission (empty body), or the tenant's plan, add-ons, licence and overrides do not include the feature (error feature_not_entitled, ADR-0053). | EntitlementRefusal |
| 404 | Unknown or another tenant's | |
| 503 | The tenant's entitlements could not be confirmed and nothing usable was cached, so the paid feature is refused (fail closed, ADR-0053). Retry-After is set. | EntitlementRefusal |
GET /v1/query/saved/{id}/export
Export a saved query (ReportsRead; rate limited; capped rows; audited)
CSV cells that start with = + - @ tab or carriage return are prefixed with an apostrophe so spreadsheets do not evaluate them. Rows are capped at the TenantQuery maximum. Each export writes an audit entry with the row count.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | |
format | query | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | File | |
| 400 | Unknown format | |
| 403 | The caller lacks the permission (empty body), or the tenant's plan, add-ons, licence and overrides do not include the feature (error feature_not_entitled, ADR-0053). | EntitlementRefusal |
| 404 | Unknown or another tenant's | |
| 429 | Export rate limit reached | |
| 503 | The tenant's entitlements could not be confirmed and nothing usable was cached, so the paid feature is refused (fail closed, ADR-0053). Retry-After is set. | EntitlementRefusal |
POST /v1/query/saved/{id}/run
Run a saved query over its rolling window (FindingsRead)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | Rows | QueryResult |
| 403 | The caller lacks the permission (empty body), or the tenant's plan, add-ons, licence and overrides do not include the feature (error feature_not_entitled, ADR-0053). | EntitlementRefusal |
| 404 | Unknown or another tenant's | |
| 503 | The tenant's entitlements could not be confirmed and nothing usable was cached, so the paid feature is refused (fail closed, ADR-0053). Retry-After is set. | EntitlementRefusal |