Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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

0 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.