Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
965 changes: 817 additions & 148 deletions .mock/definition/__package__.yml

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion .mock/definition/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ types:
source:
openapi: openapi/openapi.yaml
inline: true
ActionsListResponseItemPermission:
discriminated: false
union:
- string
- docs: List of permissions (user needs any all of them)
type: list<string>
source:
openapi: openapi/openapi.yaml
inline: true
ActionsListResponseItem:
properties:
dialog:
Expand All @@ -23,7 +32,7 @@ types:
order:
type: optional<integer>
permission:
type: optional<string>
type: optional<ActionsListResponseItemPermission>
title:
type: optional<string>
source:
Expand Down
8 changes: 7 additions & 1 deletion .mock/definition/activityLogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,17 @@ service:
method: GET
auth: true
docs: >-
<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 activity logs filtered by workspace, project, user, HTTP
method, date range or search query.
source:
openapi: openapi/openapi.yaml
display-name: Get activity logs
display-name: Get activity logs
request:
name: ActivityLogsListRequest
query-parameters:
Expand Down
128 changes: 128 additions & 0 deletions .mock/definition/analytics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
imports:
root: __package__.yml
service:
auth: false
base-path: ''
endpoints:
api_analytics_kpis_retrieve:
path: /api/analytics/kpis/
method: GET
auth: true
docs: >-
Returns metadata for all available KPI (Key Performance Indicator)
classes. Each KPI includes its key, label, base class, dependencies, and
configuration. This endpoint is useful for discovering available metrics
and understanding their relationships and requirements.
source:
openapi: openapi/openapi.yaml
display-name: List all available KPIs
response:
docs: List of available KPIs with metadata
type: list<root.KpiMetadata>
examples:
- response:
body:
- base_class: base_class
calculation_formula:
key: value
date_column: date_column
depends_on_kpis:
- depends_on_kpis
is_calculated: true
is_label_type: true
key: key
label: label
percentage: true
unit: unit
api_analytics_kpis_retrieve_2:
path: /api/analytics/kpis/{kpi_key}
method: GET
auth: true
docs: >-
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). 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).
source:
openapi: openapi/openapi.yaml
path-parameters:
kpi_key:
type: string
docs: KPI identifier (key)
display-name: Get KPI data with optional segmentation
request:
name: ApiAnalyticsKpisRetrieve2Request
query-parameters:
end:
type: optional<datetime>
docs: End date for filtering (ISO format)
members:
type: optional<string>
docs: >-
Comma-separated user IDs. If empty, includes all organization
members.
projects:
type: optional<string>
docs: >-
Comma-separated project IDs. If empty, includes all organization
projects.
segment_by_time:
type: optional<string>
docs: 'Time granularity: hourly, daily, weekly, monthly, yearly'
segment_by_user:
type: optional<boolean>
docs: Whether to segment results by user
start:
type: optional<datetime>
docs: Start date for filtering (ISO format)
tz:
type: string
docs: >-
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:
docs: KPI data with requested segmentation
type: root.KpiDetailResponse
errors:
- root.BadRequestError
- root.NotFoundError
examples:
- path-parameters:
kpi_key: kpi_key
query-parameters:
tz: tz
response:
body:
by_user:
users:
- user_email: user_email
user_id: 1
username: username
values:
- 1.1
kpi_key: kpi_key
kpi_label: kpi_label
matrix:
interval_start:
- '2024-01-15T09:30:00Z'
users:
- user_email: user_email
user_id: 1
username: username
values:
- []
segmentation: none
time_series:
interval_start:
- '2024-01-15T09:30:00Z'
values:
- 1.1
total:
unit: unit
value: 1.1
unit: unit
source:
openapi: openapi/openapi.yaml
27 changes: 23 additions & 4 deletions .mock/definition/annotationHistory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@ service:
method: GET
auth: true
docs: >-
<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>
List annotation history items for an annotation. Annotation history logs
all actions performed with annotations, such as: imports, submits,
updates, reviews, and more. Users can view annotation history items in
the Annotation History panel during labeling.
source:
openapi: openapi/openapi.yaml
display-name: List all annotation history items for annotation
display-name: List all annotation history items for annotation
request:
name: AnnotationHistoryListRequest
query-parameters:
Expand Down Expand Up @@ -54,12 +60,18 @@ service:
method: DELETE
auth: true
docs: >-
<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>
Delete all annotation history items for a specific annotation, task or
project. This method is available only for users with administrator
roles.
source:
openapi: openapi/openapi.yaml
display-name: Delete annotation history items
display-name: Delete annotation history items
request:
name: AnnotationHistoryDeleteRequest
query-parameters:
Expand All @@ -85,12 +97,19 @@ service:
path: /api/projects/{id}/annotation-history/
method: GET
auth: true
docs: List all annotation history items for the project with pagination.
docs: |-
<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>
List all annotation history items for the project with pagination.
source:
openapi: openapi/openapi.yaml
path-parameters:
id: integer
display-name: List annotation history items for project
display-name: List annotation history items for project
request:
name: AnnotationHistoryListForProjectRequest
query-parameters:
Expand Down
Loading
Loading