Content items
The content item contains the data, which aligns with the data model and is structured according to a content type. You can use query attributes to control the set of items returned. Before you start working with content items, you must authenticate.
The CREATE, UPDATE, DELETE, PUBLISH, and UNPUBLISH methods support locales. If you don't include a locale, a null locale is assumed.
Get a list of content items
Use this method to retrieve a list of content items. If you don't specify any filtering parameters, you will retrieve all available content items.
Get all references to a content item
Use this method to retrieve a list of all content items that reference a content item with a specific ID and locale. This request uses the linkedTo query attribute and retrieves all the items that reference the content item with the ID mmdvOOpQH0CY4QRLztHflg.
Other request examples
You can include query parameters to control the set of items returned as shown in the following examples. You can also exclude all custom fields from the response by appending the query parameter view=excludeCustomFields. If you do this, the retrieved list only includes the NAME, CONTENT TYPE, UPDATED BY, UPDATED ON, and STATUS values for each item.
Example of an ID query for a single item
Example of an ID query for multiple items
Example of a search query
Example of a sortBy query
Get a content item using the ID and locale
Use this method to retrieve a content item with a specific ID and locale. You must include both a content ID and a locale and, for content items with no locale, you must indicate that the locale is null. For a list of content item IDs, run the GET api/content/v1/types method or open the content item details page. This request returns a content item with the ID cTgzGGR8wEu1MCgfSqMThw.
Create a content item
Use this method to create a primary content item with a specific ID and locale. This request creates a content item using the Historical Destinations content type.
Create a localized content item
Use this method to create a localized content item. This request takes the content item with the ID cTgzGGR8wEu1MCgfSqMThw and the locale en-uS and creates a localized content item with the locale it-IT. To use this method, locales must already be defined.
Update a content item
Use this method to update a content item with a specific ID and locale. You can, for example, add or modify content, delete existing content, or change properties associated with the content (such as taxonomy values).
This request updates the description of the content item with the ID mmdvOOpQH0CY4QRLztHflg and the locale en-US . It also changes the WithTour value to false.
The Update method does not merge content; rather, it fully replaces the existing content using the body of the request. For this reason, your request must include the new version of all the content, including your updates and any data you want to retain. Anything not included in your request will be replaced.
Delete a content item
Use this method to delete a content item with a specific ID and locale. If the content item is published, you must unpublish it first. You cannot delete a primary content item if it has associated localizations. This request deletes a content item with the ID eI_95LOp7UG4nC8rScISnQ and a locale of fr-CA
Publish a content item
Use this method to publish a content item with a specific ID and locale. This request publishes a content item with the ID -mmdvOOpQH0CY4QRLztHflg and the locale fr-FR.
Unpublish a content item
Use this method to unpublish a content item with a specific ID and locale. This request publishes a content item with the ID Mifoxjxc60SWt-8ntpDxeA and locale fr-CA.