Expand my Community achievements bar.

SOLVED

disabling audience via api

Avatar

Level 1

Hi,
I want to know if there is an API endpoint or method to disable an audience (make it inactive or stop activation)(

lifecycleState to draft)

without deleting it in Adobe Experience Platform.

If yes:

  • Which API should I use?
  • Any sample request or official documentation link would be helpful.

Thanks!

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi

 

You can deactivate an audience, buit only if it is not activated to a destiantion, which probably doesnt help you here. To solve for your question , you need to programatically patch the destination flow and remove the audience

 

And that is quite a thing through APIs. If you want to go that route use something like postamn with flows.

 

essentially you need to remove the audience from the destination flow. so the trick there is to find the audience id in the destination flow

 

run a GET on this https://platform.adobe.io/data/foundation/flowservice/flows?property=inheritedAttributes.properties....

 

it will list all the flows, in there you are looking for the destiantion flow you want to update, and look for an array called 

segmentSelectors
 
then find the audience you want to remove, and patch the flow directly using https://platform.adobe.io/data/foundation/flowservice/flows/{FLOW ID}
with the array id of the audience you want to remove as an integer (the array starts at 0)
 
}
"op": "remove",
"path": "/transformations/segmentSelectors/{INDEX}"
}
 
and that would remove it
 
or you just go to the UI and deactivate it..... 🙂 It can be done, but phew!
 
cheers, good luck

View solution in original post

2 Replies

Avatar

Correct answer by
Level 4

Hi

 

You can deactivate an audience, buit only if it is not activated to a destiantion, which probably doesnt help you here. To solve for your question , you need to programatically patch the destination flow and remove the audience

 

And that is quite a thing through APIs. If you want to go that route use something like postamn with flows.

 

essentially you need to remove the audience from the destination flow. so the trick there is to find the audience id in the destination flow

 

run a GET on this https://platform.adobe.io/data/foundation/flowservice/flows?property=inheritedAttributes.properties....

 

it will list all the flows, in there you are looking for the destiantion flow you want to update, and look for an array called 

segmentSelectors
 
then find the audience you want to remove, and patch the flow directly using https://platform.adobe.io/data/foundation/flowservice/flows/{FLOW ID}
with the array id of the audience you want to remove as an integer (the array starts at 0)
 
}
"op": "remove",
"path": "/transformations/segmentSelectors/{INDEX}"
}
 
and that would remove it
 
or you just go to the UI and deactivate it..... 🙂 It can be done, but phew!
 
cheers, good luck

Avatar

Level 4

just to add to that, you cant set an audience back to draft, but you can copy it to draft using 

https://platform.adobe.io/data/core/ups apis