data.appdata.record.query
Query owner-scoped appdata records through the table query policy (routes to the app's storage plane: the shared appdata store, or the app's own Postgres instance when it has one)
Query owner-scoped appdata records through allowed filters and sorts.
Overview
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-appdata |
| Version | 1.0 |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | Authenticated organization UUID |
identity_app_uuid | uuid | No | — | (server-resolved principal from the end-user token; input ignored unless it agrees) |
database_slug | string | No | — | Virtual database slug. Optional when the authenticated app has exactly one serving database; required when the app has zero or many. |
table_slug | string | Yes | — | Virtual table slug |
end_user_uuid | uuid | No | — | (server-resolved principal from the end-user token; input ignored unless it agrees) |
app_organization_uuid | uuid | No | — | (server-resolved active workspace for organization-mode tables; input rejected if it disagrees) |
resource_ref | string | No | — | Optional resource identifier for fine-grained workspace capability checks (ns:verb:resource_ref) |
request_id | string | No | — | Caller request id for audit correlation |
actor | string | No | — | Workflow caller or agent identifier |
filters | dict | No | — | Allowed indexed filters only, plus record_uuid. Value: scalar, list, or {eq |
sort | list | No | — | Allowed indexed sort descriptors only |
limit | integer | No | — | Result limit capped by query policy |
offset | integer | No | — | Pagination offset |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | Organization UUID echoed from input |
identity_app_uuid | uuid | Yes | — | Identity app UUID echoed from input |
database_slug | string | Yes | — | Virtual database slug |
table_slug | string | Yes | — | Virtual table slug |
records | list | Yes | — | Scoped result records: record_uuid, created_at, updated_at + selectable fields |
count | integer | Yes | — | Number of returned records |
total | integer | No | — | Matching records before limit/offset |
has_more | boolean | No | — | True when more records exist past this page |
limit | integer | Yes | — | Applied result limit |
offset | integer | Yes | — | Applied offset |
failure_reason | string | No | — | Engine-stamped failure reason |
failed_at_state | string | No | — | State when the workflow failed |
failed_step | string | No | — | Failed DAG step name |
failed_layer | integer | No | — | Failed DAG layer index |
error | string | No | — | Engine-stamped exception message |
error_type | string | No | — | Engine-stamped exception class name |
States
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
done | Yes | Yes | Yes | — | — |
Outcomes
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
queried | SUCCESS | Query owner-scoped appdata records through the table query policy (routes to the app's storage plane: the shared appdata store, or the app's own Postgres instance when it has one) | count |
failed | FAILURE | Appdata workflow failed | failure_reason |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "data.appdata.record.query",
"initial_data": {
"organization_uuid": "value",
"table_slug": "value"
}
}