> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xenia.team/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Project Task Analytics

> Returns one row per task status with its count. Only statuses that have at least one task appear, and `data` is returned as a string because it comes straight from a SQL `COUNT`. Send no request body.



## OpenAPI

````yaml POST /api/v1/ops/workspaces/{workspaceId}/projects/{projectId}/tasks/analytics
openapi: 3.1.0
info:
  title: Xenia Team API - Get Project Task Analytics
  version: 1.0.0
  description: >-
    Task-status counts for one project. A POST with no request body — it creates
    nothing.
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/ops/workspaces/{workspaceId}/projects/{projectId}/tasks/analytics:
    post:
      tags:
        - Projects
      summary: Get Project Task Analytics
      description: >-
        Returns one row per task status with its count. Only statuses that have
        at least one task appear, and `data` is returned as a string because it
        comes straight from a SQL `COUNT`. Send no request body.
      parameters:
        - name: workspaceId
          in: path
          required: true
          description: UUID of the workspace. Must be the workspace the API key belongs to.
          schema:
            type: string
            format: uuid
            example: cb363f7e-c52a-4478-911d-f6a6f791090e
        - name: projectId
          in: path
          required: true
          description: UUID of the project.
          schema:
            type: string
            format: uuid
            example: c7966d63-52ce-4967-b30a-16aaa9e806b5
      responses:
        '200':
          description: Analytics retrieved successfully.
          content:
            application/json:
              example:
                data:
                  - status: Completed
                    data: '42'
                  - status: Open
                    data: '9'
                extra_meta: {}
        '401':
          description: >-
            Unauthorized - Invalid client credentials, or the key does not
            belong to this workspace.
        '403':
          description: >-
            Forbidden - API key not authorized for this route, the role lacks
            the required permission, the workspace does not have the Projects
            feature, or the project id is unknown to the caller. Note an unknown
            or deleted projectId also returns 403, not 404: the project access
            check runs before the handler and denies when it cannot load the
            project.
        '500':
          description: Internal Server Error.
      security:
        - clientKey: []
          clientSecret: []
components:
  securitySchemes:
    clientKey:
      type: apiKey
      in: header
      name: x-client-key
    clientSecret:
      type: apiKey
      in: header
      name: x-client-secret

````