Expand my Community achievements bar.

\/api/assets/.../folder.json giving correct response on author but not publish

Avatar

Level 1

Hi all,

 

I am currently working with trying to get a folder full of content fragments through the assets api, and am able to access this folder no problem on author instance (Gives me the full JSON with all files inside) but after publishing everything (Folder, content fragments, and content fragment model) and trying this URL on our publish server gives a 404 error.

 

I've tried with just a single content fragment in a different folder and it gives the same 404 error. The file clearly exists as the file shows it has been published, so I am wondering if it is some sort of issue with permissions? 

 

As a note, on my local instance it was working on author + publish instance (Could access the folder on both) but once we deployed to our dev server something seems to have changed. 

 

Please let me know if you have any ideas as to why this might be happening.

4 Replies

Avatar

Community Advisor

Hi @derek20 ,

 

Publisher would be accessed via dispatcher, so you need to allow asset api json in dispatcher filters configuration.

 

For eg. like below

 

# Allow http api assets JSON
/0101 { /type "allow" /extension "json" /path "/api/assets/<<project-name>>/<<cf-folder-name>>/*" }

Avatar

Level 1

Hi @Kishore_Kumar_, thank you for the reply. We actually did include this in the filters config file as follows:

 

/0124 { /type "allow" /path "/api/assets/*" /extension "json" }

this unfortunately didn't fix the issue either.

Avatar

Community Advisor

Please check the logs to find out if there is any issue.

Avatar

Community Advisor

Hi @derek20 

 

Did you check if it's working or not by bypassing the dispatcher and accessing the publish instance URL directly?

If it works on publish and does not work with dispatcher URL, then it's definitely an issue with the whitelisting path and you will need to check the disaptcher log to see where it is failing.

 

Thanks!