Mixpanel Community Icon
  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    To replace a lookup table using the Mixpanel Ingestion API, it's important to ensure you have the correct lookup table ID. The 404 error you're encountering suggests that the lookup table ID you're using in your API call might be incorrect or the lookup table doesn't exist.Here are some steps to troubleshoot and resolve this issue:1. Verify the lookup table ID: The ID needed for the API call can be found in Lexicon under the Lookup Table's Details. According to the documentation, you can find this ID in the Mixpanel UI.2. Ensure the lookup table exists: Remember that lookup tables must be created via the Mixpanel UI before you can replace their contents using the API.3. Check your API call: Make sure you're using the correct endpoint and including all required parameters. The API call should look something like this:

    c994bb,Drake,Pop,True,Hotline Bling,2015-10-18T22:00:00Z d8d949,Gipsy Kings,Flamenco,False,Bamboleo,1987-07-12T05:00:00Z a43fb8,Daft Punk,House,False,Aerodynamic,2001-03-12T07:30:00Z """LBKS id = "LOOKUP_TABLE_ID" project_id = "PROJECT_ID"LBKS resp = requests.put( f"[https://api.mixpanel.com/lookup-tables/{id}?project_id={project_id}](https://api.mixpanel.com/lookup-tables/{id}?project_id={project_id})", headers={"Content-Type": "text/csv"}, auth=(SERVICE_ACCOUNT_USER, SERVICE_ACCOUNT_PASS), data=data ) print(resp.json()) ```LBKSLBKS Make sure to replace `LOOKUP_TABLE_ID`, `PROJECT_ID`, `SERVICE_ACCOUNT_USER`, and `SERVICE_ACCOUNT_PASS` with your actual values.LBKS4. Verify your authentication: Ensure you're using the correct [service account credentials](https://github.com/mixpanel/docs/blob/main/reference/Ingestion%20API/lookup-tables.md) for authentication.LBKSIf you've verified all these points and are still encountering issues, you may want to contact Mixpanel support for further assistance.

    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.