Collection .query
POST /{namespace}/collections/query
Query reads any Nouns the caller’s Permissions allow, by SQL or a Relationship path, across every System in one call.
- Noun
- Collection
- Mode
do- Event
Collection.queried
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
query | text | required | SQL, or a Relationship path such as customer.subscriptions.invoices. |
save | boolean | True saves it as a Collection defined by the query. |
Outputs
| Output | Type | Required | Description |
|---|---|---|---|
rows | json | required | The matching records. |
collection | Collection | required | The Collection the query read. |
Effects
- Emits
Collection.queried. - Performed by the Analyst.
- Two-way: it runs at once, in the
try,sendanddomodes.
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | Collection.query |
When it waits
| Gate | Default |
|---|---|
| Decision class | Low: two-way, nothing at stake |
| Delay window | None: it runs once review passes. |
| Limit | The call Limit of the Permission it runs under. |
| Over the Limit | It waits pending for an Approval from the Founder. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled. |