Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

GET Shared Segments from Analytics API 2.0

Avatar

Avatar
Validate 1
Level 1
kshafer42
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
kshafer42
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
kshafer42
Level 1

22-01-2019

Hi all!

I'm trying GET segments using the swagger UI, but I'm only returning segments with MY owner ID. There are segments that are shared with the entire organization and I need to get their IDs. Is there a way to see this via Swagger?

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 5
Employee
Brian_Kent_Watson
Employee

Likes

18 likes

Total Posts

44 posts

Correct Reply

13 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 5
View profile

Avatar
Boost 5
Employee
Brian_Kent_Watson
Employee

Likes

18 likes

Total Posts

44 posts

Correct Reply

13 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 5
View profile
Brian_Kent_Watson
Employee

05-02-2019

You can use the handy technique of "see how Workspace does it" to see how to format the segment GET request.  As an example, I turned on Developer Tools in my browser, then created a new Workspace project, and I can see the call to the segment service go across the wire like so:

Request URL: https://appservice5-10.omniture.com/analytics/1.0/segments/?locale=en_US&includeType=shared,templates,curatedItem&dataType=oberon&curatedRsid=geo1metrixxgeometrixx.outdoors&expansion=favorite,approved,tags,usageSummaryWithRelevancyScore,modified,internal,compatibility&toBeUsedInRsid=geo1metrixxgeometrixx.outdoors&limit=10000

Although you will be making calls through the Adobe IO gateway and not to the raw Workspace endpoints, the API request/response format is the same. So to get the list of segments Workspace displays in the left rail, which are the segments you own as well as those that are shared with you, you need to supply the "includeType" parameter and set its value to "shared". You can also supply the "templates" value to retrieve any segment templates. You likely won't have use for the "curatedItem" value but it includes any segments that were curated along with the report suite specified in the curatedRSID parameter.

Answers (5)

Answers (5)

Avatar

Avatar
Validate 1
Level 1
kshafer42
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
kshafer42
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
kshafer42
Level 1

05-02-2019

This is amazing. You are amazing. I am amazed.

We'll give it a shot! Thanks a bunch!

Avatar

Avatar
Validate 1
Level 1
kshafer42
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
kshafer42
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
kshafer42
Level 1

30-01-2019

Avatar

Avatar
Coach
Employee
Gigazelle
Employee

Likes

470 likes

Total Posts

1,947 posts

Correct Reply

739 solutions
Top badges earned
Coach
Contributor 2
Validate 1
Ignite 80
Ignite 70
View profile

Avatar
Coach
Employee
Gigazelle
Employee

Likes

470 likes

Total Posts

1,947 posts

Correct Reply

739 solutions
Top badges earned
Coach
Contributor 2
Validate 1
Ignite 80
Ignite 70
View profile
Gigazelle
Employee

30-01-2019

Can you share the API call you're using? It might be defaulting to just your own segments.

Avatar

Avatar
Validate 1
Level 1
kshafer42
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
kshafer42
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
kshafer42
Level 1

22-01-2019

It appears it only works when I use the Tag filter. When I apply a tag to the shared segment, then GET with that tagName as the filter...I then see the shared segment in the Response Body.

Avatar

Avatar
Validate 1
Level 1
kshafer42
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
kshafer42
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
kshafer42
Level 1

22-01-2019

Side Note: I am also listed as an API admin.