Hi Team,
Currently I am working with Adobe Analytics APIs. I just wanted to know , is there any way to approve and share segments via APIs. I covered below documents, but didn't find anything suitable for me or am I missed something ?
Thanks in advance.
Solved! Go to Solution.
Views
Replies
Total Likes
I believe the solution you are after is the "component-metadata - shares" endpoint as documented here:
https://adobedocs.github.io/analytics-2.0-apis/#/component-metadata%20-%20shares/updateShares
https://www.adobe.io/apis/experiencecloud/analytics/docs.html#!AdobeDocs/analytics-2.0-apis/master/s...
The UI uses this api when a share is made in the ui . Referencing the requests there may aid you in your proof of concept and troubleshooting the API (please note the UI will use a slightly different endpoint than you would use and is documented in the documentation linked above):
I've never used this particular API, but it appears to be suggesting the functionality you are after. I would test it on some test segments, before starting any big project.
Views
Replies
Total Likes
@deepakkv The segements sharing and approve is controlled in Adobe analytics UI, you would not be able control that with the APIs, Analytics APIs are used for fetching data from adobe analytics, you can fetch the segment data through the API , but not sharing and approving them
Views
Replies
Total Likes
I believe the solution you are after is the "component-metadata - shares" endpoint as documented here:
https://adobedocs.github.io/analytics-2.0-apis/#/component-metadata%20-%20shares/updateShares
https://www.adobe.io/apis/experiencecloud/analytics/docs.html#!AdobeDocs/analytics-2.0-apis/master/s...
The UI uses this api when a share is made in the ui . Referencing the requests there may aid you in your proof of concept and troubleshooting the API (please note the UI will use a slightly different endpoint than you would use and is documented in the documentation linked above):
I've never used this particular API, but it appears to be suggesting the functionality you are after. I would test it on some test segments, before starting any big project.
Views
Replies
Total Likes
Hi Garretth,
This is useful. Now I can able share the segment.
Still not able to approve it. Is it possible to approve it using this APIs ?
Views
Replies
Total Likes
I think you should be able to publish using the update https://www.adobe.io/apis/experiencecloud/analytics/docs.html#!AdobeDocs/analytics-2.0-apis/master/s...
You can edit existing segments with the PUT /segments/{id} endpoint. Some fields cannot be edited on a segment with the PUT endpoint, including tags, compatibility, and reportSuiteName. Other fields, including owner, name, description, rsid, and definition, can be edited.
The PUT endpoint also supports partial updates. This means that instead of sending the entire JSON object to the API, you can simply send fields that you want to update. For example, if you only want to update the name, use the JSON {"name":"Updated name"}. The entire object is returned in the response, modified by the requested expansions."
When I look at the request made when I publish in the UI the updated field appears to be:
publishingStatus: {lookbackPeriod: 0, published: true}
Views
Replies
Total Likes