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

Get Audience from a Segment

Avatar

Level 2

Hi Support,

 

We are trying to integrate  a solution with segments in Adobe experience platform.I have read two ways of accessing qualified audiance of a segment.

1. Export segment into AEP dataset

2. Export segment to other destinations.

 

Apart from these two approaches , Is there any other way to call an

http api along with segment id as query parameter that will give us qualified profiles of requested segment id?

 

Thanks in advance!

@seburke1 

@jantzen_b 

 @sarah @dr_venture 

 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi @SundarSritharan 

You have two options here: 
[1] Use the AEP UI to obtain the latest Segment Job ID via the Network Console and look for 'segmentedProfileCounter' which will then list all the segment IDs within the current sandbox and the total profiles qualified.

2021-10-15_09h13_51.png

Steps:

[1] AEP UI > Segments
[2] Open Developer tools and switch to Network
[3] Filter by jobs? (as we are looking for the latest segment job)
[4] Select the jobs request and switch to 'Preview'
[5] Locate segmentedProfileCounter (you can right click here and copy the object to a local text file)

Alternatively you can use the Segmentation Service API if you dont have access to the AEP UI:

Please see here

Steps

curl --location --request GET 'https://platform.adobe.io/data/core/ups/segment/jobs?limit=1' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ... ' \
--header 'x-api-key: <x-api-key> \
--header 'x-gw-ims-org-id: <YOUR-IMS-ORG-ID@AdobeOrg' \
--header 'x-sandbox-name: prod' \

The query string 'limit=1' here will pull in the 'latest succesfull' Segment Job (simialr to the AEP UI steps), so if there is currentl a segment job in a PROCCESSING state this will be ingored.

 

Within the response do a CTRL+F (find) for 'segmentedProfileCounter' and copy this locally. 

 

Only caveat here is that the segments are not in friendly-name format you will have to use the API ('GET Segment Definition by ID'), or the UI to lookup each segment ID to get the segment names.

 

Hope this helps!
Joshua

View solution in original post

4 Replies

Avatar

Employee Advisor

If you export the segment to a dataset, can you then download the dataset via API? Not exactly what you are asking for, but perhaps close enough?

Avatar

Correct answer by
Employee Advisor

Hi @SundarSritharan 

You have two options here: 
[1] Use the AEP UI to obtain the latest Segment Job ID via the Network Console and look for 'segmentedProfileCounter' which will then list all the segment IDs within the current sandbox and the total profiles qualified.

2021-10-15_09h13_51.png

Steps:

[1] AEP UI > Segments
[2] Open Developer tools and switch to Network
[3] Filter by jobs? (as we are looking for the latest segment job)
[4] Select the jobs request and switch to 'Preview'
[5] Locate segmentedProfileCounter (you can right click here and copy the object to a local text file)

Alternatively you can use the Segmentation Service API if you dont have access to the AEP UI:

Please see here

Steps

curl --location --request GET 'https://platform.adobe.io/data/core/ups/segment/jobs?limit=1' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ... ' \
--header 'x-api-key: <x-api-key> \
--header 'x-gw-ims-org-id: <YOUR-IMS-ORG-ID@AdobeOrg' \
--header 'x-sandbox-name: prod' \

The query string 'limit=1' here will pull in the 'latest succesfull' Segment Job (simialr to the AEP UI steps), so if there is currentl a segment job in a PROCCESSING state this will be ingored.

 

Within the response do a CTRL+F (find) for 'segmentedProfileCounter' and copy this locally. 

 

Only caveat here is that the segments are not in friendly-name format you will have to use the API ('GET Segment Definition by ID'), or the UI to lookup each segment ID to get the segment names.

 

Hope this helps!
Joshua

Avatar

Level 2

Thanks for taking time & responding!
My question is to get all the profile ids qualified for a segment. but not the count of profiles qualified.

Avatar

Community Advisor

Hi @SundarSritharan ,

           I don't think so other way but can you try using Http api connection.

 

Regards,

Sanjay