Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.
SOLVED

Fetching Profile and Event data in a single API call

Avatar

Community Advisor

Hello,

I have a use case where I need to retrieve the real-time CDP profile of a customer, which contains both profile data and event data, using an API. I am aware that we have a Profile API that can fetch profile data or event data by passing schema.name as _xdm.context.profile or _xdm.context.experienceevent. However, I would like to know if it's possible to retrieve both profile data and event data in a single API call.

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi @arpan-garg , 

You can use retrieve both profile and event information by using schema name as _xdm.context.experienceevent and relatedSchema.name as _xdm.context.profile. 

Here is the documentation for the same: https://developer.adobe.com/experience-platform-apis/references/profile/#tag/Entities/operation/retr...

And sample GET request: https://platform.adobe.io/data/core/ups/access/entities?schema.name=_xdm.context.experienceevent&rel...

View solution in original post

4 Replies

Avatar

Level 5

Hi @arpan-garg , to my knowledge no such API exist but you may have your script that chains these apis one after another. Execute script in async/wait manner i.e. wait until first completes as these apis are asynchronous. You also might need promises just to ensure first api call is success as you might not be interested in having just profile data without its events.  

Avatar

Correct answer by
Level 4

Hi @arpan-garg , 

You can use retrieve both profile and event information by using schema name as _xdm.context.experienceevent and relatedSchema.name as _xdm.context.profile. 

Here is the documentation for the same: https://developer.adobe.com/experience-platform-apis/references/profile/#tag/Entities/operation/retr...

And sample GET request: https://platform.adobe.io/data/core/ups/access/entities?schema.name=_xdm.context.experienceevent&rel...

Avatar

Community Advisor

Hi @kchaitanya - I don't think so thats the case, this will just give you event data of that profile. Not the profile data. I already tested it earlier.

Avatar

Level 4

Looks like you are right. Yes, it is not returning the profile data. Thanks for letting me know.