Workspace.Workflows.Stats
Tags: automation, workflows
Endpoints
GET /{workflow_id}/task-assignment-stats- Task Assignment StatsGET /{workflow_id}/tasks/{task_id}/chats- Chats
Task Assignment Stats
GET /api/v2/w/{workspace_uuid}/workflows/{workflow_id}/task-assignment-stats
Description:
Workflow creation and management
Get current assignment count for each task in a workflow.
Returns aggregated data showing how many assignments are currently on each task. Useful for workflow visualization and identifying bottlenecks.
Path Parameters:
workflow_id: Unique identifier of the workflow (integer)
Query Parameters:
from_date: Filter assignments created on or after this date (ISO 8601 format, e.g., 2024-01-15)to_date: Filter assignments created on or before this date (ISO 8601 format, e.g., 2024-01-20)
Response: Returns a dictionary mapping task IDs to assignment counts:
{
123: {"count": 5},
456: {"count": 3}
}
Permissions: Requires valid workspace membership and "use" permission on the workflow.
Error Responses:
401 Unauthorized: Authentication required or invalid session403 Forbidden: User lacks "use" permission on this workflow404 Not Found: Workflow with specified ID does not exist
Authentication: Requires workspace member
Parameters:
workflow_id(Integer)from_date(String)to_date(String)
Chats
GET /api/v2/w/{workspace_uuid}/workflows/{workflow_id}/tasks/{task_id}/chats
Description:
Workflow creation and management
Get list of chats on a specific task in a workflow.
Returns a paginated list of chats that are currently assigned to a specific task. Useful for viewing all chats at a particular workflow task.
Path Parameters:
workflow_id: Unique identifier of the workflow (integer)task_id: Unique identifier of the task (integer)
Query Parameters:
from_date: Filter assignments created on or after this date (ISO 8601 format)to_date: Filter assignments created on or before this date (ISO 8601 format)limit: Maximum number of results to return (integer, default: 100, max: 500)offset: Number of results to skip for pagination (integer, default: 0)
Response: Returns a TaskChatsListResponse containing:
items: Array of task chat objects with:chatId: Chat identifierchatUuid: Chat UUIDtitle: Chat titlesummary: Chat summaryassignmentId: Current assignment IDmemberName: Name of assigned membermemberId: ID of assigned membercurrentTaskName: Name of current taskworkflowName: Name of workflowlastMessageAt: Timestamp of last messagemessageCount: Number of messages in the chattotal: Total count of matching chatslimit: Limit used for paginationoffset: Offset used for pagination
Permissions: Requires valid workspace membership and "use" permission on the workflow.
Error Responses:
400 Bad Request: Invalid date format or parameters401 Unauthorized: Authentication required or invalid session403 Forbidden: User lacks "use" permission on this workflow404 Not Found: Workflow or task not found
Authentication: Requires workspace member
Parameters:
workflow_id(Integer)task_id(Integer)from_date(String)to_date(String)limit(Integer)offset(Integer)
Response: See TaskChatsListResponse