Skip to main content

Workspace.Workflows.Stats

Tags: automation, workflows

Endpoints

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 session
  • 403 Forbidden: User lacks "use" permission on this workflow
  • 404 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 identifier
  • chatUuid: Chat UUID
  • title: Chat title
  • summary: Chat summary
  • assignmentId: Current assignment ID
  • memberName: Name of assigned member
  • memberId: ID of assigned member
  • currentTaskName: Name of current task
  • workflowName: Name of workflow
  • lastMessageAt: Timestamp of last message
  • messageCount: Number of messages in the chat
  • total: Total count of matching chats
  • limit: Limit used for pagination
  • offset: Offset used for pagination

Permissions: Requires valid workspace membership and "use" permission on the workflow.

Error Responses:

  • 400 Bad Request: Invalid date format or parameters
  • 401 Unauthorized: Authentication required or invalid session
  • 403 Forbidden: User lacks "use" permission on this workflow
  • 404 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