Stores

Create and manage instance stores backed by Cargo.

Stores object

Attributes

object

String

String representing the object's type

id

String

name

String

access

Enum

item_count

Number

created_at

Date

updated_at

Date
{
"object": "store",
"access": "private"
}

List stores

Returns a paginated list of stores owned by the instance.

Query Parameters

limit

NumberOptional

after

StringOptional

before

StringOptional

cursor

StringOptional

order

EnumOptional

id

UnionOptional

Filter by store ID

created_at

ObjectOptional

Filter Filter by creation time by date range

updated_at

ObjectOptional

Filter Filter by update time by date range

GEThttp://api.metorial.com/stores
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

String

access

EnumOptional

template_id

StringOptional

parent_id

StringOptional
POSThttp://api.metorial.com/stores
curl -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

String

The unique identifier for the store

GEThttp://api.metorial.com/stores/:store_id
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

String

The unique identifier for the store

GEThttp://api.metorial.com/stores/:store_id/permissions
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

String

The unique identifier for the store

Request Body

name

StringOptional

access

EnumOptional
PATCHhttp://api.metorial.com/stores/:store_id
curl -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

String

The unique identifier for the store

DELETEhttp://api.metorial.com/stores/:store_id
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

String

The unique identifier for the store

Request Body

operations

Object
PATCHhttp://api.metorial.com/stores/:store_id/items
curl -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"
}
}'