Collection Operations
text/api/v1/{spaceName}/data/{typeModel}/{model}
This endpoint is used for operations on collections or pages as a whole.
Retrieve Objects from a Collection
Retrieves objects from a collection with optional pagination.
Notes:
- For retrieving data in the CMS, another version of this request with filter support is used:
/api/v1/{spaceName}/filter/{typeModel}/{model} - The request may include filters from shareCollections.collectionID that are attached to the request if created
Query Parameters:
| Name | Example | Possible values | Description |
|---|---|---|---|
| page | 1 | 1,2,3,4... | The page number to retrieve. Default limit: 10 records per page. If not specified, returns all objects in the collection. |
| select | true | true/false | Temporarily inactive. Was intended to return only the fields configured in the CMS shared view (shareCollections). Use selectFields to pick fields explicitly. |
| selectFields | name,slug | - | Comma-separated list of fields to include in the response. Used to reduce response size and time. Note: does not work on relation fields due to the deepPopulate setting. |
| populate | orders,author | - | Comma- or space-separated relation fields to expand in the response. |
Request Example:
GET /api/v1/main/data/collections/test_collection?page=1&selectFields=name,slug
Create a New Object
Creates a new object in the collection.
Request Example:
POST /api/v1/main/data/collections/test_collection
The request body depends on the schema of the collection/page. The structure is dynamic based on the collection's or page's fields.