{
"workspace_uuid": "your-workspace-uuid",
"entity": "agents",
"metric": "created",
"aggregation": "count"
}{
"workspace_uuid": "your-workspace-uuid",
"entity": "workflows",
"metric": "executions",
"aggregation": "count",
"group_by": "user",
"order_by": "value",
"order_dir": "desc",
"limit": 10
}{
"workspace_uuid": "your-workspace-uuid",
"entity": "agents",
"metric": "executions",
"aggregation": "count",
"group_by": "date",
"granularity": "daily",
"filters": {
"period": "30d"
}
}| Entity | Description |
|---|---|
agents | AI Agents created in the workspace |
workflows | Automation workflows |
| Metric | Agents | Workflows | Description |
|---|---|---|---|
executions | ✅ | ✅ | Number of times the entity was run |
created | ✅ | ✅ | Number of entities created |
copies | ✅ | ✅ | Number of entities cloned from templates |
shares | ✅ | ✅ | Number of entities shared with others |
avg_duration | ❌ | ✅ | Average execution time (milliseconds) |
Note: The avg_durationmetric is only available for workflows and does not support grouping.
group_by is not provided, the API returns only the total value:{
"workspace_uuid": "your-workspace-uuid",
"entity": "agents",
"metric": "created",
"aggregation": "count"
}{
"data": {
"entity": "agents",
"metric": "created",
"aggregation": "count",
"group_by": null,
"granularity": null,
"total": 47,
"results": []
}
}{
"workspace_uuid": "your-workspace-uuid",
"entity": "workflows",
"metric": "executions",
"aggregation": "count",
"group_by": "user",
"limit": 5
}{
"data": {
"entity": "workflows",
"metric": "executions",
"aggregation": "count",
"group_by": "user",
"total": 890,
"results": [
{ "user_id": "user-uuid-1", "user_name": "John Doe", "value": 150 },
{ "user_id": "user-uuid-2", "user_name": "Jane Smith", "value": 120 }
]
}
}granularity parameter:{
"workspace_uuid": "your-workspace-uuid",
"entity": "agents",
"metric": "executions",
"aggregation": "count",
"group_by": "date",
"granularity": "daily"
}{
"data": {
"entity": "agents",
"metric": "executions",
"aggregation": "count",
"group_by": "date",
"granularity": "daily",
"total": 1250,
"results": [
{ "date": "2026-01-01", "value": 45 },
{ "date": "2026-01-02", "value": 52 }
]
}
}| Value | Format | Example |
|---|---|---|
daily | YYYY-MM-DD | 2026-01-15 |
weekly | YYYY-WW | 2026-03 (year-week) |
monthly | YYYY-MM | 2026-01 |
filters.period to specify the time range:| Value | Description |
|---|---|
7d | Last 7 days |
30d | Last 30 days (default) |
90d | Last 90 days |
all | All time |
{
"workspace_uuid": "your-workspace-uuid",
"entity": "agents",
"metric": "executions",
"aggregation": "count",
"filters": {
"period": "7d"
}
}filters.user_id:{
"workspace_uuid": "your-workspace-uuid",
"entity": "agents",
"metric": "executions",
"aggregation": "count",
"group_by": "date",
"granularity": "daily",
"filters": {
"period": "30d",
"user_id": 123
}
}| Value | Description |
|---|---|
value | Sort by metric value (default) |
name | Sort by user name |
date | Sort by date |
| Value | Description |
|---|---|
desc | Descending order (default) |
asc | Ascending order |
{
"workspace_uuid": "your-workspace-uuid",
"entity": "workflows",
"metric": "executions",
"aggregation": "count",
"group_by": "user",
"order_by": "value",
"order_dir": "desc",
"limit": 5
}{
"workspace_uuid": "uuid",
"entity": "agents",
"metric": "created",
"aggregation": "count",
"filters": { "period": "30d" }
}{
"workspace_uuid": "uuid",
"entity": "workflows",
"metric": "executions",
"aggregation": "count",
"filters": { "period": "30d" }
}{
"workspace_uuid": "uuid",
"entity": "workflows",
"metric": "avg_duration",
"aggregation": "avg",
"filters": { "period": "30d" }
}{
"workspace_uuid": "uuid",
"entity": "agents",
"metric": "executions",
"aggregation": "count",
"group_by": "date",
"granularity": "weekly",
"filters": { "period": "90d" }
}{
"workspace_uuid": "uuid",
"entity": "workflows",
"metric": "executions",
"aggregation": "count",
"group_by": "date",
"granularity": "daily",
"filters": {
"period": "30d",
"user_id": 123
}
}{
"workspace_uuid": "uuid",
"entity": "agents",
"metric": "shares",
"aggregation": "count",
"group_by": "user",
"filters": { "period": "30d" },
"limit": 10
}{
"data": {
"entity": "string",
"metric": "string",
"aggregation": "string",
"group_by": "string|null",
"granularity": "string|null",
"total": "number",
"results": []
},
"meta": {
"period": {
"from": "YYYY-MM-DD",
"to": "YYYY-MM-DD"
},
"cached_at": "ISO 8601 timestamp",
"cache_ttl": 300,
"unit": "string|null"
}
}data.total - The aggregate value across all resultsdata.results - Array of grouped results (empty when no group_by)meta.period - The actual date range used for the querymeta.cached_at - When this response was cachedmeta.cache_ttl - Cache time-to-live in seconds (5 minutes)meta.unit - Unit of measurement (e.g., "milliseconds" for avg_duration)meta.cached_at field indicates when the cached response was generated. Identical requests within the cache window return the same cached data.{
"message": "The entity field is required.",
"errors": {
"entity": ["The entity field is required."]
}
}entity is required and must be agents or workflowsmetric is required and must be a supported metric for the entityaggregation is required and must be count, sum, or avggranularity is required when group_by is dateavg_duration metric does not support group_byavg_duration metric is only available for workflows{
"message": "This action is unauthorized."
}{
"error": "Workspace not found"
}curl --location --request GET 'https://localhost/api/v1/workspaces/metrics' \
--header 'X-Multiplai-Authorization;' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"workspace_uuid": "8360bf61-4604-4f22-99dc-2afa910fd8c7",
"entity": "agents",
"metric": "executions",
"aggregation": "count",
"group_by": "user",
"granularity": "daily",
"filters": {
"period": "30d",
"user_id": 0
},
"order_by": "value",
"order_dir": "desc",
"limit": 10
}'{
"data": {
"entity": "agents",
"metric": "executions",
"aggregation": "count",
"group_by": "user",
"granularity": "daily",
"total": 0,
"results": [
{
"user_id": "string",
"user_name": "string",
"date": "string",
"value": 0
}
]
},
"meta": {
"period": {
"from": "2019-08-24",
"to": "2019-08-24"
},
"cached_at": "2019-08-24T14:15:22.123Z",
"cache_ttl": 300,
"unit": "string"
}
}