Segment creation Through API - Not editable | Community
Skip to main content
sheejo
Level 3
November 22, 2022
Solved

Segment creation Through API - Not editable

  • November 22, 2022
  • 1 reply
  • 1411 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Anil_Umachigi

@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").  


@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.html?lang=en#create

Makes sense? Let me know if that helped 

 

1 reply

Avinash_Gupta_
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
November 22, 2022

@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-definitions/operation/patchSegmentDefinition 

 

https://experienceleague.adobe.com/docs/experience-platform/segmentation/api/segment-definitions.html?lang=en#update-a-specific-segment-definition 

 

Hope this helps! 

sheejo
sheejoAuthor
Level 3
November 22, 2022

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

sheejo
sheejoAuthor
Level 3
November 23, 2022

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

 

 


@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").