Fetching single items
Use the Prepr REST API to fetch a single content item when you need to get specific content for a bulk process. For example, to get content from linked content items as part of a project to migrate content from a legacy system to Prepr CMS.
Before calling a REST API endpoint to fetch a single content item, go to Settings > Access tokens to create an access token with the REST API scope
To fetch a content item, send a
GET request to the
https://cdn.prepr.io/content_items endpoint. There are two ways to fetch a single content item.
Query by Id
Since Ids are unique in Prepr, you will be able to find the content item you want using the
Here is an example that shows how to query a content item with the Id "535c1e-...".
Query by Slug
Since slugs are unique within a content model, you will be able to find a content item you want using the
Here is an example that shows how to query a Page type content item with the slug "nieuws/...".