Bulk update event catalog
PATCHhttps://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
The ID of the project
- application/json
Bodyrequired
updates object[]required
Responses
- 200
- 400
- 401
- 404
- 405
- 429
OK
- application/json
- Schema
- Example (auto)
Schema
updated object[]
{
"updated": [
{
"event_name_path": "string",
"display_name": "string",
"description": "string",
"is_hidden": true
}
]
}
The request is invalid.
- application/json
- Schema
- Example (auto)
Schema
Event table is disabled{
"message": "Event table is disabled"
}
The API key header is either missing or an invalid API key is given
Not Found
- application/json
- Schema
- Example (auto)
Schema
Event not found in catalog{
"message": "Event not found in catalog"
}
The requested HTTP method is not allowed.
Too many requests sent with the same API key. Up to 10 requests can be sent within 1 second.
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
- python
- curl
- http
- java
- go
- HTTP.CLIENT
- REQUESTS
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"))