Skip to main content
Solved

Get segmentation rules from dashboard via API


Hi, I am trying to get the query used to create a segment on a dashboard via API. I have looked at the available endpoints and it does not seem like there is a way to do this, but wanted to confirm!

Best answer by Saish Redkar

If you are looking to pull a segment like this applied to a chart, then I don’t think it’s possible.

You can either query the results of a saved chart using this segment or build this segment definition using the API parameters as shown.

What format are you expecting your segment definition to look like if at all there was a way to extract just that?

View original
Did this topic help you find an answer to your question?

Saish Redkar
Expert
Forum|alt.badge.img+10

Hi @ksd 

Are you trying to replicate a chart via a API call which uses a user segment? You can replicate your chart’s user segment in your api call using this segment definition construct.
Or do you want to just get results from a existing chart which uses a user segment?


  • New Member
  • April 25, 2023

Hi @Saish Redkar

I’d like to get the segment definition used in a chart - I don’t need the results of the segment.


Esther Trapadoux
Community Manager
Forum|alt.badge.img+9

@ksd great question, I’m checking with the tech support team. Our API absolutely allows you to retrieve information about the charts and their data (as @Saish Redkar pointed out), but not sure if the API allows you to retrieve the query or segment definition used to create them. Looking into this. 👀


Saish Redkar
Expert
Forum|alt.badge.img+10

If you are looking to pull a segment like this applied to a chart, then I don’t think it’s possible.

You can either query the results of a saved chart using this segment or build this segment definition using the API parameters as shown.

What format are you expecting your segment definition to look like if at all there was a way to extract just that?


Esther Trapadoux
Community Manager
Forum|alt.badge.img+9

@Saish Redkar for your help on this. Just posting the final answer from the team that it’s not possible to achieve what @ksd is looking for at this time. 😓


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings