Collections
SDK methods for the Collections module, accessed via soat.collections. See the Collections module docs for permissions and data model, and each method's REST page for the full request/response schema.
soat.collections.listCollections()
List collections
- Method:
GET - Path:
/api/v1/collections
await soat.collections.listCollections({
query: { /* + optional */ },
});
soat.collections.createCollection()
Create a collection
- Method:
POST - Path:
/api/v1/collections
await soat.collections.createCollection({
body: { name, /* + optional */ },
});
soat.collections.getCollection()
Get a collection
- Method:
GET - Path:
/api/v1/collections/{collection_id}
await soat.collections.getCollection({
path: { collection_id },
});
soat.collections.updateCollection()
Update a collection
- Method:
PATCH - Path:
/api/v1/collections/{collection_id}
await soat.collections.updateCollection({
path: { collection_id },
body: { /* + optional */ },
});
soat.collections.deleteCollection()
Delete a collection
- Method:
DELETE - Path:
/api/v1/collections/{collection_id}
await soat.collections.deleteCollection({
path: { collection_id },
});
soat.collections.listCollectionItems()
List items
- Method:
GET - Path:
/api/v1/collections/{collection_id}/items
await soat.collections.listCollectionItems({
path: { collection_id },
});
soat.collections.getCollectionItem()
Get an item
- Method:
GET - Path:
/api/v1/collections/{collection_id}/items/{key}
await soat.collections.getCollectionItem({
path: { collection_id, key },
});
soat.collections.putCollectionItem()
Create or replace an item
- Method:
PUT - Path:
/api/v1/collections/{collection_id}/items/{key}
await soat.collections.putCollectionItem({
path: { collection_id, key },
body: { data, /* + optional */ },
});
soat.collections.updateCollectionItem()
Update an item
- Method:
PATCH - Path:
/api/v1/collections/{collection_id}/items/{key}
await soat.collections.updateCollectionItem({
path: { collection_id, key },
body: { /* + optional */ },
});
soat.collections.deleteCollectionItem()
Delete an item
- Method:
DELETE - Path:
/api/v1/collections/{collection_id}/items/{key}
await soat.collections.deleteCollectionItem({
path: { collection_id, key },
});
soat.collections.getCollectionItemTags()
Get item tags
- Method:
GET - Path:
/api/v1/collections/{collection_id}/items/{key}/tags
await soat.collections.getCollectionItemTags({
path: { collection_id, key },
});
soat.collections.replaceCollectionItemTags()
Replace item tags
- Method:
PUT - Path:
/api/v1/collections/{collection_id}/items/{key}/tags
await soat.collections.replaceCollectionItemTags({
path: { collection_id, key },
body,
});
soat.collections.mergeCollectionItemTags()
Merge item tags
- Method:
PATCH - Path:
/api/v1/collections/{collection_id}/items/{key}/tags
await soat.collections.mergeCollectionItemTags({
path: { collection_id, key },
body,
});