Entries
Entry object description
Entry object consists of the following top-level properties:
fields object in CMA always includes locale.Entries collection
Entries represent text content in a space, and the data structure of an entry must adhere to a certain content type.
To fetch specific entries like e.g. entries of a particular content type use query search parameters.
Before you can create an entry you need to create and activate a content type as outlined above.
When creating a new entry, you need to pass the ID of the desired content type as the X-Contentful-Content-Type header and pass the field data as a JSON payload.
When using this endpoint, an ID will be automatically generated for the created entry and returned in the response.
If default values are set for some field of the content type, they will be applied at entry creation, if the corresponding field isn’t provided in the request body. Default values don’t affect entry updates.
Published Entries collection
Use this endpoint to get all published entries of a given space.
Get all published entries of a space
Entry
Use this endpoint to create a new entry with a specified ID. When creating a new entry, you need to pass the ID of the entry’s desired content type as the X-Contentful-Content-Type header.
To update an entry, use the Create an entry with ID endpoint to update a specific entry via its ID. When updating an existing entry, you need to specify the last version of the entry you are updating with X-Contentful-Version.
You do not need to pass the ID of the entry’s content type.
Use this endpoint to update a specific entry via its ID using JSON Patch format. When patching an entry, you need to specify the current version of the entry you are updating with X-Contentful-Version.
Use this endpoint to fetch an entry with a specified ID. All empty entry fields are omitted from the response, that means if the field is empty its key is not going to be presented in the response. If the entry has no set fields the corresponding key is missing as well. In order to update the entry with empty fields all keys that need to be updated should be added to the entry object.
Entry references
Recursively collects references of an entry and their descendants, up to 10 levels deep, and returns them.
Limitations
- Collect all descendants, up to 10 levels deep.
- The maximum size of includes array is 1000.
Entry publishing
After publishing the entry, it will be available via the Content Delivery API.
Locale-based publishing
To publish or unpublish entry’s fields in certain locales, use the Entry publishing endpoints and pass in the locales in the payload as show in the examples below:
Publish entry locales:
Unpublish entry locales:
Entry archiving
You can only archive an entry when it’s not published.