Release ID missing from rest API

I'm looking to get a version of my website up and running with data from a release.
The website uses Gatbsy and the plugin document say I can pass in releaseID into the config.
When viewing my release in Prismic I can see r=ZMjTBBAAACIAQ0Le so i would assume that is my releaseID. But when adding this to the config, it fails.

I've looked at the rest API and I can only see Master in my refs.
https://folkestonedocumentaryfest.cdn.prismic.io/api/v2

How can I get the release and why is it not appearing in the API?
(The release contains some unpublished files)

Hi Team,

I checked your API browser and you have no releases available, only the live docs:
https://folkestonedocumentaryfest.prismic.io/api/v2

If you look at this example repo, if you select the release in the dropdown you'll have the release ID shown:
https://pa-app-follow.prismic.io/api/v2

My only thoughts as to why you're not seeing this are because maybe you're only previewing a single document OR your repo API access is set to 'public' rather than 'open'. You'll find this at https://folkestonedocumentaryfest.prismic.io/settings/apps/

Let me know if this helps.

Thanks. :slight_smile:

I've now changed the setting to OpenAPI and can see the release here:
https://folkestonedocumentaryfest.prismic.io/api/v2

but it isn't showing here:
https://folkestonedocumentaryfest.cdn.prismic.io/api/v2

and running my website i still get the error -

A Release with the ID "ZMjTBBAAACIAQ0Le" could not be found. Check that the `releaseID` option is correct and try again. You may also need to provide an access
token to query Releases.

You can see I have a release here:

I believe you need to provide the full release ID like this
ZOdR6BEAACYAsmUB~ZOdOWhEAACMAslOT

Because if I hit this endpoint with that ref in the browser, I can get your release:
https://folkestonedocumentaryfest.cdn.prismic.io/api/v2/documents/search?ref=ZOdR6BEAACYAsmUB~ZOdOWhEAACMAslOT

passing that to into releaseID in the gastby-config gives this error...

- A Release with the ID "ZOdR6BEAACYAsmUB~ZOdOWhEAACMAslOT" could not be found. Check that the `releaseID` option is correct and try again. You may also need to
provide an access token to query Releases.

Seems like that's not the release ID either?

OK, I guess the Gatsby kit really requires the access token. Can you try generating one here and passing it to your Gatsby config? You'll find this at https://folkestonedocumentaryfest.prismic.io/settings/apps/

I created an access token and added it to the config and it still says:

- A Release with the ID "ZOdR6BEAACYAsmUB~ZOdOWhEAACMAslOT" could not be found. Check that the `releaseID` option is correct and try again. You may also need to
provide an access token to query Releases.

Kinda also doesn't explain why i cant see my release here - https://folkestonedocumentaryfest.cdn.prismic.io/api/v2

That's normal; you'll never see the release ID here without providing the access token.

Take, for example, our docs CDN endpoint:
https://prismicio-docs-v3.cdn.prismic.io/api/v2

But with the access token:
https://prismicio-docs-v3.cdn.prismic.io/api?access_token=MTY5MzMxMDQwMzY0NC5ZRzdSREJBQUFDa0FpallI.Mu-_vWFaMu-_vVwORg7vv70-ElEufO-_vVbvv70xGhfvv73vv73vv70u77-977-9Ju-_vXc1&state=8ku6rq4p82

Okay looks like this is now working!

I change my repos to Private and created an Access Token (master + release_
I used the original release ID ZMjTBBAAACIAQ0Le

Using the full release ID ZOdR6BEAACYAsmUB~ZOdOWhEAACMAslOT doesn't work.

Thanks for your help @Phil

1 Like

Glad we could work through this together :slight_smile:

1 Like