Get all available steps for a taxonomy and collection.
This endpoint discovers what steps exist in your analytics data by querying the ClickHouse taxonomy_events table. Use this before querying transitions or paths to understand what step values you can use.
Use Cases:
Example Usage:
# 1. Get available steps
GET /v1/taxonomies/tax_sales/analytics/available-steps?collection_id=col_emails
# Response:
{
"taxonomy_id": "tax_sales",
"collection_id": "col_emails",
"total_events": 5432,
"total_sequences": 1000,
"steps": [
{"step_key": "inquiry", "event_count": 1000, ...},
{"step_key": "followup", "event_count": 450, ...},
{"step_key": "closed_won", "event_count": 350, ...}
]
}
# 2. Use discovered steps in transition query
POST /v1/taxonomies/tax_sales/analytics/transitions
{
"collection_id": "col_emails",
"from_step": "inquiry", # From available steps
"to_step": "closed_won" # From available steps
}
Args: request: FastAPI request object (contains tenant context) taxonomy_id: Taxonomy ID to query collection_id: Collection ID for filtering events
Returns: AvailableStepsResponse with all steps sorted by event count (descending)
Raises: NotFoundError: If taxonomy not found ValidationError: If unable to query ClickHouse
REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.
REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace'
Collection ID to analyze
Successful Response
Response containing all available steps for a taxonomy/collection.
This endpoint helps users discover what steps exist in their analytics data before querying transitions or paths.
Example Response:
json { "taxonomy_id": "tax_sales_stages", "collection_id": "col_emails", "total_events": 5432, "total_sequences": 1000, "steps": [ { "step_key": "inquiry", "event_count": 1000, "sequence_count": 1000, "first_seen": "2025-11-01T00:00:00Z", "last_seen": "2025-12-07T00:00:00Z" }, { "step_key": "followup", "event_count": 450, "sequence_count": 450, "first_seen": "2025-11-02T00:00:00Z", "last_seen": "2025-12-06T00:00:00Z" }, { "step_key": "closed_won", "event_count": 350, "sequence_count": 350, "first_seen": "2025-11-05T00:00:00Z", "last_seen": "2025-12-07T00:00:00Z" } ] }