Collection
A Collection is a Thing with members, either listed one by one or defined by a saved query.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
query | json | The saved query that defines a dynamic Collection. |
Inherited from Thing: 4 properties
| Property | Type | Required | Description |
|---|---|---|---|
id | string | required | The stable identifier, which never changes. |
type | list of Noun | required | The Nouns this Thing is an instance of. |
state | string | The current state in its lifecycle. | |
outside | json | The ids this Thing has in outside tools, one per Integration, so a re-run matches instead of duplicating. |
Object
{
"$id": "https: //api.sb/ kilnbakery.com/ collections/ collection_1",
"$type": "Collection",
"id": "Example id",
"type": [
"noun_1"
],
"state": "Example state",
"outside": {},
"query": {}
}Relationships
- A Collection contains many Things: Members are listed one by one or matched by the Collection’s saved query; a Thing can belong to many Collections.
contains, inversememberOf.
Verbs
createCreates a Collection.POST /{namespace}/collectionsgetReturns one Collection by id.GET /{namespace}/collections/{id}listReturns Collections, newest first, one page at a time.GET /{namespace}/collectionsupdateChanges the given properties of a Collection.PATCH /{namespace}/collections/{id}deleteDeletes a Collection; its history is kept.DELETE /{namespace}/collections/{id}exportExport writes a Collection’s records to a file or the Startup’s warehouse, once or on a schedule.POST /{namespace}/collections/{collection}/exportqueryQuery reads any Nouns the caller’s Permissions allow, by SQL or a Relationship path, across every System in one call.POST /{namespace}/collections/query
Permissions
Which Access level may call each Verb. One-way Verbs wait their delay window.
| Operation | owner | admin | member | viewer |
|---|---|---|---|---|
Collection.create | Yes | Yes | Yes | No |
Collection.get | Yes | Yes | Yes | Yes |
Collection.list | Yes | Yes | Yes | Yes |
Collection.update | Yes | Yes | Yes | No |
Collection.delete | Yes | Yes | Yes | No |
Collection.export | Yes | Yes | Yes | No |
Collection.query | Yes | Yes | Yes | No |
Call it
Query the latest collection.Example
The Collection "enterprise Customers" is a saved query for Customers with more than 50 seats. A new Customer at 51 seats joins it at once.