Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Accessing Content Fragment using Dispatcher URL

Avatar

Level 2

We are building content fragments and exposing to Mobile App.

 

Able to get the CF json output when we use direct publish URL  https://publishURL/api/assets/abc-fragment.json

But when we use dispatcher URL(setup for our website) https://sitedomain/api/assets/abc-fragment.json we are getting page not found.

 

We do not want to use direct publish to expose Content fragments to Mobile App.

 

So do we have to configure any other settings or dispatcher rules to expose content fragment using a dispatcher vhost domain? 

 

Appreciate inputs.

 

 

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @visa679 

/api needs to be allowed in the v-host and .any file for your website. Currently it will be blocked by dispatcher rule which is why you are getting a 404 response.

The same you can identify by checking the dispatcher.log as well.

 

Please apply the below entry in your filter section and it will be resolved.

/0002 { /type "allow" /url "/api/*"}

 

Links for reference:

https://experienceleague.adobe.com/docs/experience-manager-65/assets/extending/assets-api-content-fr...

https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-c...

 

Thanks! 

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi @visa679 

/api needs to be allowed in the v-host and .any file for your website. Currently it will be blocked by dispatcher rule which is why you are getting a 404 response.

The same you can identify by checking the dispatcher.log as well.

 

Please apply the below entry in your filter section and it will be resolved.

/0002 { /type "allow" /url "/api/*"}

 

Links for reference:

https://experienceleague.adobe.com/docs/experience-manager-65/assets/extending/assets-api-content-fr...

https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-c...

 

Thanks! 

Avatar

Level 2

Thanks Asutosh for the respone. We already added the filter to allow /api/assets/* path but still getting error.