Releases
Enables users to create releases that contains entries or assets and perform actions on them.
Currently supported actions:
- Create release
- Update release
- Delete release
- Fetch release
- Query releases
- Publish release
- Unpublish release
- Validate release
Availability
Releases feature is globally available for all customers. In the Contentful web app this feature is available for the customers that purchased Launch application.
Limitations
Release cannot contain more then 200 entities or assets in total.
Release schema
The release entity has following schema:
Releases
Use this endpoint to create a new release. When using this endpoint, an ID will be automatically generated for the created release and returned in the response.
Permissions
Any user can create new release.
Errors
- 400 Error is returned in case:
- property “linkType” is missing
- property “linkType” is not “Entry” or “Asset”
- environment is not found
- 404 Error is returned in case:
- current user doesn’t have access to space
- current user doesn’t have access to provided entry
- entity does not exist
- 422 Error is returned in case:
- provided entity ids are not unique
- provided entity id is undefined
- provided entityType is not Entry or Asset
- exceed limit of entities in the release
Use this endpoint to fetch a multiple releases.
Releases collection
The releases collection endpoint implements cursor-based pagination.
The pages object contains the next key which contains the relative URL to the next batch of items.
The URL contains the same set of filters and limit as initially requested.
This key is presented only if there are available elements to be fetched that weren’t returned from the current request because of the requested limit.
The default page size is 100 and the maximum allowed limit is 1000.
Filters
These are the following filters (query params) available for this endpoint:
Permissions
Any user with read access to an entry can query releases.
Errors
- 400 Error is returned in case:
- Environment is not found
- Property LinkType is missing when using “entities.sys.id[in]” filter
- Property “linkType” is not “Entry” or “Asset”
- 404 Error is returned in case:
- Including an entry that user has no permissions to
- Current user doesn’t have access to space
Release
Use this method to fetch a single release.
Permissions
Any user with read access to an entry can get a release.
Errors
- 404 Error is returned in case:
- The
sys.idis not found - Current user doesn’t have access to space
- The
Use this method to update the release by provided ID.
Permissions
Any user with write access to an entry can update a release.
Errors
- 400 Error is returned in case:
- the version header is not provided.
- 404 Error is returned in case:
- The
sys.idis not found - Current user doesn’t have access to space
- Current user doesn’t have access to provided entity
- Entity does not exist
- The
- 422 Error is returned in case:
- provided entity ids are not unique
- provided entity id is undefined
- provided entityType is not Entry or Asset
- exceed limit of entities in the release
Use this method to delete a release by provided ID.
Permissions
Only a user that created release or admin can delete a release.
Errors
- 404 Error is returned in case:
- The
sys.idis not found
- The
Validate release
Create validation release action
Use this method to create a release action that validates a release identified by the provided ID asynchronously.
Permissions
Any user with publish access to an entry can validate a release.
Limitations
There is only 1 validation at a time allowed for a single release. Initiating additional validation for the release that already has in progress would result in error.
Errors
- 404 Error is returned in case:
- The
sys.idis not found - current user has no access to releases
- The
- 429 Error is returned in case:
- current user has no access to entries
- validation action is not publish or unpublish
- exceeding the publish limit
- release validation is already in progress
Published release
Use this method to create a release action that publishes all entities that belong to release by provided ID.
Permissions
Any user with publish access to an entry can publish a release.
Errors
- 404 Error is returned in case:
- The
sys.idis not found - current user has no access to releases
- the version header is not provided.
- The
- 429 Error is returned in case:
- exceeding the limit publish limit
- exceeding the limit if in action is already created or in progress
- fails with validation errors
Use this method to create release action that unpublishes all entities that belong to release by provided ID.
Permissions
Any user with publish access to an entry can unpublish a release.
Errors
- 404 Error is returned in case:
- The
sys.idis not found - current user has no access to releases
- the version header is not provided.
- The
- 429 Error is returned in case:
- exceeding the limit publish limit
- exceeding the limit if in action is already created or in progress
- fails with validation errors
Archived release
Use this method to archive a release. Archiving a release will prevent publishes, unpublishes or schedules in the target release.
Permissions
Users with access to the release can archive it.
Errors
- 400 Error is returned in case:
- The release is already archived
- 409 Error is returned in case:
- Incorrect release version passed in the
X-Contentful-Versionheader
- Incorrect release version passed in the
Use this method to unarchive an archived release. Unarchiving a release will enable publishing, unpublishing or scheduling in the target release.
Permissions
Users with access to the release can archive it.
Errors
- 400 Error is returned in case:
- The release is not archived
- 409 Error is returned in case:
- Incorrect release version passed in the
X-Contentful-Versionheader
- Incorrect release version passed in the
Release actions
Release actions are entities that contain information about actions performed in a release. These actions include validate, publish and unpublish.
Use this method to query release actions that belongs to one or more releases.
Filters
There are following filters available on this endpoint:
Permissions
Any user with read access to an entry/release can query release actions.
Errors
- 400 (BadRequest) Error is returned when:
sys.status[in]andsys.status[nin]are present at the same time in the request
Release action
Use this method to get single release action that belongs to specific release.
Permissions
Any user with read access to an entry can query release actions.
Errors
- 404 Error is returned in case:
- release not found
- release action not found