Expand my Community achievements bar.

Applications for the 2024 Adobe Target Community Mentorship Program are open! Click to the right to learn more about participating as either an Aspirant, to professionally level up with a new Certification, or as a Mentor, to share your Adobe Target expertise and inspire through your leadership! Submit your application today.
SOLVED

Get all available response tokens by API

Avatar

Level 1

Hello,

 

We are designing a system that will use the response token on the page for integration with other systems.

 

The flow is configurable. for example, the user will be able to configure: if response.token1 = 'a' then do something.

 

On the configuration page, in order to improve the UX and reduce the chance for mistakes, we would like to allow the user to select the available response tokens from a list, instead of typing it.

 

My question is: is there a resource on Target API (or another API) to get this information?

 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi @meirotstein2,

I don't believe such an API exists. I think your best bet might be to load the Response Tokens page (Adobe Target > Administration > Response tokens) and increase the items per page to max and then copy the data from the page. As response tokens do not change frequently this might be a feasible solution for you. You can also see the status and just use the "activated" response tokens if you want.

I suppose you could try and manually call the graphql POST request the page makes to fetch that data, but when I looked at the response body I wasn't seeing the status information. You possibly would need to combine data from multiple requests to get what you need if you go that route.

Hope that helps,

Ryan

View solution in original post

4 Replies

Avatar

Level 1

Thank you very much for your reply, @Pawan-Gupta .

I'm already familiar with that doc, and already leveraged response tokens on my runtime implmentation. 

I'm asking more about the design time - the configuration phase. here I want to allow easy configuration by pre-fetching the available tokens to be used - this is perhaps more like an admin API, I don't need the runtime values here, only all the available values that my return at runtime.

Avatar

Correct answer by
Employee Advisor

Hi @meirotstein2,

I don't believe such an API exists. I think your best bet might be to load the Response Tokens page (Adobe Target > Administration > Response tokens) and increase the items per page to max and then copy the data from the page. As response tokens do not change frequently this might be a feasible solution for you. You can also see the status and just use the "activated" response tokens if you want.

I suppose you could try and manually call the graphql POST request the page makes to fetch that data, but when I looked at the response body I wasn't seeing the status information. You possibly would need to combine data from multiple requests to get what you need if you go that route.

Hope that helps,

Ryan

Avatar

Administrator
@Ryan_Roberts_, Thank you for sharing solution with AEM community. Keep on assisting the AEM Community.


Kautuk Sahni