Accessing Content Fragment using Dispatcher URL | Community
Skip to main content
Level 3
April 8, 2021
Solved

Accessing Content Fragment using Dispatcher URL

  • April 8, 2021
  • 1 reply
  • 1249 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Asutosh_Jena_

Hi @antony6790 

/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-fragments.html?lang=en#using

https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-configuration.html?lang=en#example-filter-section

 

Thanks! 

1 reply

Asutosh_Jena_
Community Advisor
Asutosh_Jena_Community AdvisorAccepted solution
Community Advisor
April 8, 2021

Hi @antony6790 

/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-fragments.html?lang=en#using

https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-configuration.html?lang=en#example-filter-section

 

Thanks! 

Level 3
April 8, 2021

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