API Reference
Three REST endpoints for fetching your event catalog, downloading generated code, and reporting codebase usage. All endpoints require a Bearer token.
Authentication
Authenticate with Authorization: Bearer YOUR_TOKEN. Create tokens in Settings → Tokens inside your workspace.
Tokens are workspace-scoped. Each token has access to a single workspace's data.
Endpoints
Event Catalog
Fetch the list of event names defined in Ordaze. Used by the CLI scanner to know what to search for.
curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://app.ordaze.com/api/v1/catalog"Parameters
| Parameter | Description |
|---|---|
| source | Source slug (e.g. ios, android, backend). Alias: platform (legacy) |
| version | Version to fetch: draft, latest, or a version name |
Response
{
"protocolVersion": "1",
"events": [
{
"name": "app_launched",
"camelCase": "appLaunched",
"pascalCase": "AppLaunched",
"status": "active",
"properties": ["user_id", "device_type"],
"fields": { "team": "mobile" }
}
],
"excludeFiles": ["**/*.test.*"],
"version": "2.1.0"
}Code Generation
Download a generated Swift or Kotlin event file for your workspace. The file is rendered from the workspace's Handlebars template.
curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://app.ordaze.com/api/v1/codegen?source=ios" \
-o AnalyticsEvents.swiftParameters
| Parameter | Description |
|---|---|
| source | Source slug (e.g. ios, android). Alias: platform (legacy) |
| version | latest, draft, or a version name |
Report Codebase Usage
Report which events are used in your codebase. Called automatically by the CLI scanner, or use directly for custom integrations.
curl -X POST \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"source": "backend",
"version": "2.1.0",
"repo": "my-api",
"append": true,
"events": [
{ "name": "payout_completed", "filePath": "PayoutPaid.php" },
{ "name": "survey_completed", "filePath": "SurveyCompleted.php" }
]
}' \
"https://app.ordaze.com/api/v1/usage"Body Parameters
| Parameter | Description |
|---|---|
| source | Source slug (e.g. ios, android, backend). Alias: platform (legacy) |
| version | App version string |
| repo | Repository name (shown in coverage view) |
| append | true = merge with existing results, false = full replace |
| events | Array of { name, filePath } objects |
Response
{
"matched": 2,
"unmatched": ["unknown_event"],
"missing": ["checkout_started", "signup_completed"],
"total": 42
}| Field | Description |
|---|---|
| matched | Count of events found in both code and Ordaze |
| unmatched | Event names in code but not in Ordaze |
| missing | Event names in Ordaze but not in code |
| total | Total number of events in the workspace |
Rate Limiting
API requests are rate-limited to 30 requests per minute per token.
| Header | Description |
|---|---|
| Retry-After | Seconds to wait before retrying (429 responses only) |
| X-RateLimit-Reset | ISO 8601 timestamp when the window resets (429 responses only) |
If you receive a 429 Too Many Requests response, wait until the reset time before retrying.