Markers API
Invalidation markers are how an out-of-band event tells the Gateway that a cache rule's results are now suspect. Once a marker is recorded, the next read against the targeted cache rule re-executes against the warehouse, even if the rule's TTL hadn't expired. Use this API for ETL completions, scheduled refreshes, and anything else that changes data outside the SQL stream.
Authentication
All endpoints require a Personal Access Token in the
Authorization header with cache-admin scope on the target
tenant.
Authorization: Bearer YOUR_PAT
Endpoints
| Method | Path | Purpose |
|---|---|---|
| GET | /tenants/{tenantId}/invalidation-markers | List markers |
| GET | /tenants/{tenantId}/invalidation-markers/{markerId} | Get marker details |
| POST | /tenants/{tenantId}/invalidation-markers | Create a manual marker |
| DELETE | /tenants/{tenantId}/invalidation-markers/{markerId} | Delete a marker |
List markers
GET /tenants/{tenantId}/invalidation-markers
Query parameters
| Parameter | Description |
|---|---|
status | Filter by active or expired. |
targetRuleId | Filter by the cache rule a marker invalidates. |
Example
curl -H "Authorization: Bearer $TOKEN" \
"https://api.airbrx.ai/tenants/your-slug/invalidation-markers"
Response
{
"_links": {
"self": { "href": "/tenants/your-slug/invalidation-markers" },
"items": [
{
"name": "cache-orders.1-InvalidationMarker",
"href": "/tenants/your-slug/invalidation-markers/cache-orders.1-InvalidationMarker"
}
]
}
}
Get marker details
GET /tenants/{tenantId}/invalidation-markers/{markerId}
Response
{
"invalidatedAt": "2026-02-01T17:31:04Z",
"expiresAt": "2026-02-02T17:31:04Z",
"ttlSeconds": 86400,
"invalidatedBy": {
"ruleId": "orders-dml",
"statement": "INSERT INTO orders (id, customer_id, total) VALUES (:p0, :p1, :p2)",
"triggeredBy": "Cross-rule invalidation"
},
"createdAt": "2026-02-01T17:31:04Z"
}
| Field | Type | Description |
|---|---|---|
invalidatedAt | ISO 8601 | When the marker was created. |
expiresAt | ISO 8601 | When the marker stops affecting reads. |
ttlSeconds | integer | Marker lifetime in seconds. |
invalidatedBy.ruleId | string | Rule that fired (DML rule for cross-rule invalidation, or the marker's own creator). |
invalidatedBy.statement | string | SQL that triggered the marker, when applicable. |
invalidatedBy.triggeredBy | string | Source description: "Cross-rule invalidation", "Manual", etc. |
Create a manual marker
POST /tenants/{tenantId}/invalidation-markers
Request body
{
"markerId": "etl-refresh-20260201",
"targetRuleId": "cache-analytics",
"metadata": {
"reason": "Daily ETL completed"
}
}
| Field | Required | Description |
|---|---|---|
markerId | Yes | Unique identifier for this marker. |
targetRuleId | Yes | Cache rule whose results should be marked stale. |
metadata.reason | No | Free-form description for debugging and audit. |
Example
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"markerId":"etl-20260201","targetRuleId":"cache-analytics","metadata":{"reason":"ETL completed"}}' \
"https://api.airbrx.ai/tenants/your-slug/invalidation-markers"
Delete a marker
DELETE /tenants/{tenantId}/invalidation-markers/{markerId}
curl -X DELETE \
-H "Authorization: Bearer $TOKEN" \
"https://api.airbrx.ai/tenants/your-slug/invalidation-markers/etl-20260201"
Response
{
"success": true,
"message": "Marker etl-20260201 deleted successfully"
}
Marker lifecycle
| Status | Meaning |
|---|---|
active | The marker is in effect. Reads against the target cache rule re-execute on the warehouse. |
expired | Marker TTL has elapsed. Cache resumes normal behavior on the target rule. |
Markers expire after 24 hours by default. Long-running invalidations should re-fire markers periodically rather than relying on a single one to last indefinitely.
Naming conventions
markerId is yours — pick something that's easy to identify
in audit and debugging. Patterns that work well:
etl-daily-20260201
inventory-sync-20260201-0600
manual-cache-clear-admin
schema-migration-orders-v3
See also
- Rules as the differentiator — how invalidation rules and markers fit together.
- Rule schema —
invalidateRulesandrequireInvalidationon cache rules. - dbt recipe — common pattern for pairing dbt builds with invalidation rules.