Skip to main content

Bulk update event catalog

PATCH 

https://app.mitzu.io/api/v1/projects/:project_id/event-catalog

Bulk updates the display_name and description of one or more event catalog entries.

Each event is identified by an event_name_path of the form source_table.event_name. If the event name itself contains a . character, escape it with a backslash (\).

All three fields per item (event_name_path, display_name, description) are required. Pass an empty string for description to clear an existing description.

The operation is atomic: if any item fails validation (unknown event, blank display name, duplicate event in the batch, display-name collision against another event in the project), the whole request is rejected and no changes are persisted. The is_hidden flag of every event is preserved.

Request

Path Parameters

    project_id stringrequired

    The ID of the project

Bodyrequired

    updates object[]required

    The set of event catalog updates to apply.

  • Array [
  • event_name_pathstringrequired

    Identifier of the event of the form source_table.event_name. Use a backslash (\) to escape . characters appearing inside the event name.

    Example: events.page_view
    display_namestringrequired

    New display name. Must be non-empty and unique within the project.

    Example: Page view
    descriptionstringrequired

    New description. Pass an empty string to clear the description.

    Example: Tracks every page navigation in the app.
  • ]

Responses

OK

Schema
    updated object[]

    The updated event catalog entries.

  • Array [
  • event_name_pathstring

    Identifier of the event in source_table.event_name form.

    display_namestring

    Display name of the event.

    descriptionstringnullable

    Description of the event, or null if none is set.

    is_hiddenboolean

    Whether the event is hidden from the catalog UI.

  • ]

Authorization: x-mitzu-api-key

name: x-mitzu-api-keytype: apiKeydescription: ## API Key

You can generate a new API key on the Account Settings -> API keys page.
in: header
import http.client
import json

conn = http.client.HTTPSConnection("app.mitzu.io")
payload = json.dumps({
"updates": [
{
"event_name_path": "events.page_view",
"display_name": "Page view",
"description": "Tracks every page navigation in the app."
}
]
})
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-mitzu-api-key': '<x-mitzu-api-key>'
}
conn.request("PATCH", "/api/v1/projects/:project_id/event-catalog", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Request Collapse all
Base URL
https://app.mitzu.io/api/v1
Auth
Parameters
— pathrequired
Body required
{
  "updates": [
    {
      "event_name_path": "events.page_view",
      "display_name": "Page view",
      "description": "Tracks every page navigation in the app."
    }
  ]
}
ResponseClear

Click the Send API Request button above and see the response here!