Stores
Create and manage instance stores backed by Cargo.
Stores object
Attributes
object
StringString representing the object's type
id
Stringname
Stringaccess
Enumitem_count
Numbercreated_at
Dateupdated_at
Date{"object": "store","access": "private"}
List stores
Returns a paginated list of stores owned by the instance.
Query Parameters
limit
NumberOptionalafter
StringOptionalbefore
StringOptionalcursor
StringOptionalorder
EnumOptionalid
UnionOptionalFilter by store ID
created_at
ObjectOptionalFilter Filter by creation time by date range
updated_at
ObjectOptionalFilter Filter by update time by date range
curl -X GET "https://api.metorial.com/stores" \-H "Authorization: Bearer metorial_sk_..."
Create store
Creates a new store for the instance.
Request Body
name
Stringaccess
EnumOptionaltemplate_id
StringOptionalparent_id
StringOptionalcurl -X POST "https://api.metorial.com/stores" \-H "Content-Type: application/json" \-H "Authorization: Bearer metorial_sk_..." \-d '{"name": "example_name","access": "private","template_id": "example_template_id","parent_id": "example_parent_id"}'
Get store by ID
Retrieves a store by its ID.
URL Parameters
store_id
StringThe unique identifier for the store
curl -X GET "https://api.metorial.com/stores/sto_Rm4Mnheq2bfEPhBhP7SY" \-H "Authorization: Bearer metorial_sk_..."
Get store permissions
Returns the effective Cargo permissions for the current actor on a specific store.
URL Parameters
store_id
StringThe unique identifier for the store
curl -X GET "https://api.metorial.com/stores/sto_Rm4Mnheq2bfEPhBhP7SY/permissions" \-H "Authorization: Bearer metorial_sk_..."
Update store by ID
Updates a specific store.
URL Parameters
store_id
StringThe unique identifier for the store
Request Body
name
StringOptionalaccess
EnumOptionalcurl -X PATCH "https://api.metorial.com/stores/sto_Rm4Mnheq2bfEPhBhP7SY" \-H "Content-Type: application/json" \-H "Authorization: Bearer metorial_sk_..." \-d '{"name": "example_name","access": "private"}'
Delete store by ID
Deletes a specific store.
URL Parameters
store_id
StringThe unique identifier for the store
curl -X DELETE "https://api.metorial.com/stores/sto_Rm4Mnheq2bfEPhBhP7SY" \-H "Authorization: Bearer metorial_sk_..."
Modify store items
Applies bulk item operations to a specific store.
URL Parameters
store_id
StringThe unique identifier for the store
Request Body
operations
Objectcurl -X PATCH "https://api.metorial.com/stores/sto_Rm4Mnheq2bfEPhBhP7SY/items" \-H "Content-Type: application/json" \-H "Authorization: Bearer metorial_sk_..." \-d '{"operations": {"type": "add","itemId": "example_itemId","fileId": "example_fileId","documentId": "example_documentId","path": "example_path"}}'