Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

Using Segments as Dimensions using API 2.0

Avatar

Level 1

Hey there, looking to get some information on using a variety of segments as dimensions while using the API. This would allow us to run a single pipeline and pop in a variable to iterate through 30-40 different segments. Is it possible to do this using the API, rather than just within an AA workspace? Thank you in advance.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

A little known fact is that Workspace is built on the API 2.0... you can get the API calls that were used to return data in your Workspace and use them as is, or modify them...

 

To get access to this, you first need to enable Debug Mode:

Jennifer_Dungan_0-1685546443136.png

 

This will add a new icon to your tables:

Jennifer_Dungan_1-1685546475220.png

 

 

When you click on this, it will give you options for the table or the sparkline..

Jennifer_Dungan_2-1685546499614.png

 

 

Then when you choose the table, you will be presented with timestamps of the call(s)

Jennifer_Dungan_3-1685546526352.png

 

 

Now, selecting that, it will take you to a page that gives you the API call in multiple formats (JSON, curl, etc)

 

This is a quick way to replicate your Workspaces in the API without having to try and build it all from scratch.

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

A little known fact is that Workspace is built on the API 2.0... you can get the API calls that were used to return data in your Workspace and use them as is, or modify them...

 

To get access to this, you first need to enable Debug Mode:

Jennifer_Dungan_0-1685546443136.png

 

This will add a new icon to your tables:

Jennifer_Dungan_1-1685546475220.png

 

 

When you click on this, it will give you options for the table or the sparkline..

Jennifer_Dungan_2-1685546499614.png

 

 

Then when you choose the table, you will be presented with timestamps of the call(s)

Jennifer_Dungan_3-1685546526352.png

 

 

Now, selecting that, it will take you to a page that gives you the API call in multiple formats (JSON, curl, etc)

 

This is a quick way to replicate your Workspaces in the API without having to try and build it all from scratch.

Avatar

Level 1

Thanks for the response! Would this also account for creating a variable that contains a segment that can be passed through the API?

 

For example, we'd like to grab data with Segment1 as the variable, once that's finished, we'd pop in Segment2 as the variable and pull the same data, and so on.