Collection Operations
Create, list, update, and delete records across Flexim collections and single pages with the versioned content API.
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.
For an Auto Generate slug field, send the configured source field, such as name.
The server computes the slug on creation and when the source is updated. An
unrelated partial update preserves an existing slug and other omitted fields.
A missing slug is filled on save if its source is available. An empty or null
source yields an empty slug, subject to the schema's validation. Configured unique
constraints still apply; duplicate slugs fail the write. A supplied slug does not
override the configured computation.