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!
Get segmentation rules from dashboard via API
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?
Reply
Welcome to the Amplitude Community!
If you don't have an Amplitude account, you can create an Amplitude Starter account for free and enjoy direct access to the Community via SSO. Create an Amplitude account. You can also create a Guest account below!
If you're a current customer, select the domain you use to sign in with Amplitude.
analytics.amplitude.com analytics.eu.amplitude.comWelcome to the Amplitude Community!
If you don't have an Amplitude account, you can create an Amplitude Starter account for free and enjoy direct access to the Community via SSO. Create an Amplitude account. Want to sign up as a guest? Create a Community account.
If you're a current customer, select the domain you use to sign in with Amplitude.
analytics.amplitude.com analytics.eu.amplitude.comEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.