Collections
Get a Collection
Authorization
API Key x-api-key<token>
Authenticate using API Key in request header
In: header
Query Parameters
collectionName*string
The name/path of the collection. Must use only letters, digits, underscores, and dots. Each segment must start with a letter or underscore.
page?integer
Page number for pagination
Default
1Range
1 <= valuelimit?integer
Number of items per page
Default
50Range
1 <= value <= 100includeSubcollections?boolean
When true, includes items from all subcollections under the specified collection path. For example, querying "customers" with this flag will return items from "customers", "customers.premium", "customers.premium.vip", etc.
Default
falseResponse Body
application/json
curl -X GET "https://api.bem.ai/v2/collections/items?collectionName=product_catalog"{
"collectionID": "cl_2N6gH8ZKCmvb6BnFcGqhKJ98VzP",
"collectionName": "product_catalog",
"itemCount": 150,
"items": [
{
"collectionItemID": "clitm_2N6gH8ZKCmvb6BnFcGqhKJ98VzP",
"data": "SKU-12345: Industrial Widget",
"createdAt": "2024-10-20T15:30:00Z",
"updatedAt": "2024-10-20T15:30:00Z"
},
{
"collectionItemID": "clitm_3M7hI9ALDnwc7CoGdHriLK09WaQ",
"data": {
"sku": "SKU-67890",
"name": "Premium Gear",
"category": "Hardware"
},
"createdAt": "2024-10-20T15:31:00Z",
"updatedAt": "2024-10-20T15:31:00Z"
}
],
"page": 1,
"limit": 50,
"totalPages": 3,
"createdAt": "2024-10-20T15:30:00Z",
"updatedAt": "2024-10-20T15:32:00Z"
}Empty