Analytics

✨ Get KPI data with optional segmentation

Changed on
<Card href="https://humansignal.com/goenterprise"> <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/> <p style="margin-top: 10px; font-size: 14px;"> This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise) </p> </Card> Retrieve data for a specific KPI with support for filtering and segmentation. Can segment by time (hourly, daily, weekly, monthly, yearly), by user, or both (2D matrix). Combining segment_by_user and segment_by_project returns a sparse user × project breakdown. If no segmentation is specified, returns a single total value. Supports filtering by projects, members, and date range. Date filters are interpreted in the specified timezone (required parameter). Maximum 50 projects allowed per request for performance reasons.
get/api/analytics/kpis/{kpi_key}

Request

  • Base URL
    http://localhost:8000
  • URL
    http://localhost:8000/api/analytics/kpis/{kpi_key}
  • Auth
    API key in header Authorization

Path parameters

kpi_keystring required

KPI identifier (key)

Query parameters

allboolean

When true with segment_by_user, return only members with performance data (capped). Used by Member Performance Select All discovery.

endstring date-time

End date for filtering (ISO format)

membersstring

Comma-separated user IDs. If empty, includes all organization members.

projectsstring

Comma-separated project IDs. If empty, includes all organization projects. Maximum 50 projects allowed per request. Requests exceeding this limit will be rejected with a 400 error.

segment_by_projectboolean

Whether to segment results by project. Combine with segment_by_user for a user × project breakdown.

segment_by_time'daily' | 'hourly' | 'monthly' | 'weekly' | 'yearly'

Time granularity for segmentation

segment_by_userboolean

Whether to segment results by user

startstring date-time

Start date for filtering (ISO format)

tzstring required

Timezone for date filtering (IANA timezone name, e.g., "America/New_York", "UTC"). The start and end dates will be interpreted in this timezone.

Response

KPI data with requested segmentation

kpi_keystring required

KPI identifier

kpi_labelstring nullable required

Human-readable KPI label

segmentation'none' | 'time' | 'user' | 'project' | 'matrix' | 'project_matrix' | 'user_project' required
  • none - none
  • time - time
  • user - user
  • project - project
  • matrix - matrix
  • project_matrix - project_matrix
  • user_project - user_project
unitstring required

Unit of measurement: seconds, minutes, hours, count, or ratio

Changes

    • warning

      added the new user_project enum value to the //// response property for the response status

    • info

      added the optional property to the response with the status

    • info

      added the new optional query request parameter all

    • info

      added the optional property ///// to the response with the status