How to use the Content Delivery API to Get a Story by ID from a Pipeline Stage?

I’m using the Pipelines Storyblok app.

I’m able to retrieve single stories using my preview token, such as:[preview token]

But, when I use my preview branch token, I get a 404 response “This record could not be found”.

My goal is to get the content of a single story by ID from a particular pipeline stage. Is there a way to do that?

Hello Ed,

this works when using the parameter like shown:
or for the UUID

Alright, that worked!
Here are the two points I did not understand:

  1. In order to query by UUID, add the parameter: find_by=uuid
  2. The story ID for a particular story on the Preview pipeline stage is not same value as the story ID (for the same story) on a different pipeline stage. If you want to query the API for a given story on different pipeline stages, the UUID works.

To 1. You need to switch to the particular id type you’re using if you want to have only 1 story but you can also use the by_uuids parameter instead:
It allows you to get one or more stories by their UUIDs.

To 2.
We recommend to use UUIDs instead of the legacy id in all cases.

1 Like