Search code examples
mixpanel

Is there a wildcard character for the Mixpanel API "export" method "event" parameter?


According to Mixpanel's API documentation here: https://mixpanel.com/docs/api-documentation/exporting-raw-data-you-inserted-into-mixpanel

Method: export

URI: https://data.mixpanel.com/api/2.0/export/

Please note: The URI is data.mixpanel.com and not just mixpanel.com

Description

Get a "raw dump" of tracked events over a time period.

Parameters

...
optional event array
The event or events that you wish to get data for, encoded as a JSON array.
Example format: '["play song", "log in", "add playlist"]'
An expression to filter events by. See the expression section on the main data export API page.
...

If I wanted to fetch all events rather than a list of specific events, is there a wildcard syntax that I can use?


Solution

  • Mixpanel support answered my question, if you omit the "events" parameter it will return all types of events:

    eg: API call, notice there is no event parameter included

    https://data.mixpanel.com/api/2.0/export/?from_date=2012-02-14&expire=1329760783&sig=bbe4be1e144d6d6376ef5484745aac45
    &to_date=2012-02-14&api_key=f0aa346688cee071cd85d857285a3464&
    where=properties%5B%22%24os%22%5D+%3D%3D+%22Linux%22
    

    Events of all types will be returned since no "event" filter is specified.