Question

Calling a saved JQL query through the rest API


  • New Participant
  • 2 replies

I haven’t been able to find any documentation on this, but it seems intuitive that, once you save a custom JQL query and give it a name one should be able to access it through the REST endpoint without sending the full text of the query (just the parameters). Is this functionality available? Currently I build the query in the online editor to test it, then copy it to a file on my local machine, then encode and send that back to Mixpanel… it’s not a big deal, just seems a bit roundabout.


3 replies

Userlevel 1
Badge

Hey vlsd,

I agree that would be an intuitive UX, and I imagine that would’ve been in the next iteration of JQL if iterating on JQL was on our roadmap. Our Engineering team however is in “maintenance-mode” with JQL and there are no plans currently to develop the feature out further.  As you’ve probably noticed, it has stricter rate limits compared to other APIs.

May I ask what the JQL query calculates/what the end use case is?  We may be able to use capabilities like Custom Properties alongside Data Functions (examples of capabilities we are continuing to build out to avoid the need for writing querying language) to query for the same data.

In my case, what I needed was a list of all users, and for each user a list of each day they were active in some way. I’m planning on/currently using that data to do explorations on how various user behaviors (such as using certain functions on a weekend, or taking a long break) correlate with other business metrics for different cohorts. I was able to get that through one query and save it as a CSV, from which point I can go in python and quickly iterate and experiment with different ways of slicing and visualizing the data.

More philosophically, I ultimately doubt any built-in user interface will be able to replace the flexibility of written queries (I’ve tried this in the past and realized halfway I was in the process of implementing SQL using buttons and dropdowns).

Badge +1

Hi @vlsd  -- 

 

Just to add on to this point, AFAIK there’s no way to query JQL by bookmark ID of a saved JQL report, so normally for this I would recommend copying the entire content of the script into your python script (but you can of course use params at that point). Sorry I don’t have a better answer there.

Reply


Mixpanel