How to use the Content Delivery API to retrieve multiple stories, including those that are both not published and on a release?

For example, my Content Delivery API request looks something like:

I the request, I’m trying to get all stories whose path starts with “foo”, including those from the release “5678”.

It seems that the Content Delivery API response will only include stories from the “5678” release if they are published on the “Current” release.

But, I do not want to publish those stories until the release goes live (ex = the “Release Now” button is clicked). They are not supposed to be available to our visitors until the release goes live.

How can I get those unpublished stories into the (draft) API response (so that I can test in my dev environment)? It seems like they should be in there already since I’m using “&version=draft”?

Hello Ed,

can you give me more information about this issue, please?
In which space does this happen?

Best regards

Thanks Hannes, here is some more information.

Space: 86211
Release ID: 11363
Sample Query:[isArchived][in]=false

In the above query, the goal is to get all stories in the pointy-rocks folder from release 11363 whose “isArchived” property is equal to false.
The pointy-rocks folder contains a story “Test” that was created and scheduled in the 11363 release, but not published.
I don’t want the “test” story to be available on the “current” release.
The issue with the above query is that the response does not include the “test” story.

If I remove the filter_query parameter, then it works as expected (the “test” story is included in the response), such as:

Am I doing something wrong with the filter_query parameter?

Hello Ed,

since it’s a boolean you have to use [is] not [in]. After that, the query will return also the entries without the isArchived property. When you want to retrieve just the ones with that property and the property set to false, you have to do[isArchived][is]=false&filter_query[isArchived][is]=not_empty

Best regards

Hannes, thanks for that filter_query tip!

The query you added in your last post is not working as expected because there is a second filter query parameter: filter_query[isArchived][is]=not_empty

When that second filter_query parameter is removed, it works like a charm:[isArchived][is]=false

1 Like