Mixpanel Community Icon

Extracting Unique Events from Project Datasets

·
·

How can I get a list of unique events available for all the project in a given dataset?

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Hi Rohan M., Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> đź‘‹

    Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    To get a list of unique events available for all the projects in a given dataset, you can use the Lexicon Schemas API. Specifically, you can use the "List Schemas" endpoint to retrieve this information. Here's how you can do it:1. Make a GET request to the /projects/{projectId}/schemas endpoint. 2. This will return a list of all schemas in the project, including events.The response will include an array of results, where each item represents an entity (event or profile) in your project. To get the list of unique events, you'll need to filter the results for entities where entityType is "event".Here's what the relevant part of the response structure looks like::LBKSLBKS```LBKS{ "results":: [ { "entityType": "event", "name": "Event Name", "schemaJson": { "description": "Event description", "properties": { // Event properties } } } // More events... ] }```You can extract the name field from each event entity to get your list of unique events.It's important to note that this API endpoint requires proper authentication, and you'll need the necessary permissions to access this data.Lexicon Schemas API provides more details on the API usage and response format.If you need a more user-friendly way to view this information, you can also use the Mixpanel UI. As mentioned in the Mixpanel Community post, you can use the dropdown in Insights to see all events, and add tags to events with Lexicon to bookmark the most important ones.

    kapa.ai is still learning and improving, please let me know how I did by reacting below.

    ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.