Expand my Community achievements bar.

SOLVED

Segment creation Through API - Not editable

Avatar

Level 3

Hello All

We created Segments using API calls. Now we are not able to edit the segment. Is there any way to edit the segments after creating the segments using API calls? Thanks in Advance.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@sheejo Ah ok, so clearly you can copy/edit these segments when you copy from one sandbox to another. 

The other thing i would try is use the segment definition and create a new segment via API (in the desired sandbox) and check if you can then edit, if this works you can bulk create the segments and then edit them later. 

Here's the endpoint guide 

https://experienceleague.adobe.com/docs/experience-platform/segmentation/api/segment-definitions.htm...

Makes sense? Let me know if that helped 

 

View solution in original post

5 Replies

Avatar

Community Advisor

@sheejo Yes, you can override the segment definitions using API call. Please refer to the following documentation of overwriting a segment definitions

 

Patch /segment/definitions/{SEGMENT_ID}

 

https://developer.adobe.com/experience-platform-apis/references/segmentation/#tag/Segment-definition... 

 

https://experienceleague.adobe.com/docs/experience-platform/segmentation/api/segment-definitions.htm... 

 

Hope this helps! 

Avatar

Level 3

Thanks @Avinash_Gupta_ . According to our requirement, we copied our Segments from Lower environment to UAT using API calls. Now our business wants to edit the segment and test their use cases directly in AEP UI. Now, business is not able to edit the segments after copying the segments

Avatar

Community Advisor

Unfortunately that's the drawback of copying segments via API, they are not editable. you have couple of options to proceed and try 

 

  1. Edit the segments via API: Like @Avinash_Gupta_  mentioned in this comment, use the patch endpoint to this, however this is not business user friendly (unless they know how to use API) 
  2. Try duplicating/copying the segment and make changes and remove the one created via API, quite a manual effort if you have lot of segments

Hope that helps

 

 

Avatar

Level 3

@Anil_Umachigi , thanks a lot for your reply. I tried to copy directly from AEP UI, but copy button is disabled(it says "Cannot copy segment. Use API to copy API generated segments"). image.png 

Avatar

Correct answer by
Community Advisor

@sheejo Ah ok, so clearly you can copy/edit these segments when you copy from one sandbox to another. 

The other thing i would try is use the segment definition and create a new segment via API (in the desired sandbox) and check if you can then edit, if this works you can bulk create the segments and then edit them later. 

Here's the endpoint guide 

https://experienceleague.adobe.com/docs/experience-platform/segmentation/api/segment-definitions.htm...

Makes sense? Let me know if that helped