Prismic API calls give zero results eventhough we have content configured

We have content configured for our hero banners, but it is not getting reflected. When I refresh the page, it is showing. We are using Vue PWA VSF for our project.

Hello @aponnappan

Welcome to the Prismic community, and thanks for posting this question to us.

I can see content under home_hero_banners. Attaching a screenshot:

Are you using the current master ref? Because whenever you published the content in Prismic, the Master ref changes. You have to refresh the API browser screen to get a new Master ref.

Let me know if you have any doubt.

Thanks,
Priyanka

Yes, we are using the Master ref for this. But sometimes the API call didn't bring the data which is already added to the CMS and we are testing this without changing anything in the CMS.

Are you using updated Master ref? And Can you give me more detail on what content you are not getting? What is the API ID?

Hi Priyanka, the issue is not related to whether the content is not updated or not. The problem is sometimes the API is not fetching the contents which are there in the CMS even if the content is updated for a long time.

Can you see your content in your API Browser? If so the issue is most likely on the application level.

https://kingsroad.prismic.io/api/v2

Also please do not cache the ref as this will cause issues.

We have tested that at the app level. This is an intermittent issue when tested from the app. I'm not sure why this is happening. Now that issue is gone when we tried to call your API using the Axios package.

So the issue doesn't exist when you're using Axios?

Yes, it is not there when we use Axios for call the API.

So it sounds like the issue is in your Axios configuration rather than the API.

Can you show me how you are using Axios to call the API? Or even send me a copy of you project to test.

This thread has been closed due to inactivity. Flag to reopen.