Expand my Community achievements bar.

SOLVED

How to look up the last 10 recent time-series event for a specif Profile

Avatar

Community Advisor

Hello guys,

 

I would like to look up the last 10 recent time-series event associated to a specific Prodile Id by using API call, where can I find the correct API call I can perform? 

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 5

Hi @Luca_Lattarini ,
you can make use of API which extracts experience events by identity & here is sample request. To extract 'limit' query parameter in request url helps you to extract number of records you want in response.

curl -X GET \
'https://platform.adobe.io/data/core/ups/access/entities?schema.name=_xdm.context.experienceevent&rel...limit=1' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'

View solution in original post

8 Replies

Avatar

Correct answer by
Level 5

Hi @Luca_Lattarini ,
you can make use of API which extracts experience events by identity & here is sample request. To extract 'limit' query parameter in request url helps you to extract number of records you want in response.

curl -X GET \
'https://platform.adobe.io/data/core/ups/access/entities?schema.name=_xdm.context.experienceevent&rel...limit=1' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'

Avatar

Community Advisor

hello @AtulChavan ,

 

Thanks for your answer.

I have a question regarding the end point

https://platform.adobe.io/data/core/ups/access/entities?schema.name=

_xdm.context.experienceevent
&relatedSchema.name=_xdm.context.profile
&relatedEntityId=89149270342662559642753730269986316900
&relatedEntityIdNS=ECID&fields=endUserIDs,web,channel
&startTime=1531260476000
&endTime=1531260480000

 

Why  we dont use schema.name=_xdm.context.profile and &relatedSchema.name=_xdm.context.experienceevent ? 

Thanks

 

Avatar

Employee Advisor

@Luca_Lattarini @AtulChavan One trick I use so I don't have to change timestamps is "order by":

orderby=-timestamp&limit=10

Avatar

Community Advisor

@Danny-Miller is

- for descending

+ for ascending 

or vice versa?

 

Avatar

Employee Advisor

- for descending
nothing for ascending (just timestamp)