Operator Stats Endpoints¶
Operator Stats API endpoints.
Overview¶
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/operator-stats |
Get Operator Stats |
| GET | /api/v1/operator-stats/activity |
Get Operator Stats Activity |
| GET | /api/v1/operator-stats/operators/{operator_id} |
Get Operator Stats Detail |
API Reference¶
Sartiq Backend Server - Operator Stats 0.1.0¶
operator-stats¶
GET /api/v1/operator-stats¶
Get Operator Stats
Description
Composite dashboard payload for the current org, scoped to the caller.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
OAuth2PasswordBearer |
header | string | N/A | No | |
created_from |
query | No | |||
created_to |
query | No | |||
operator_ids |
query | No | |||
organization_id |
query | No | |||
roles |
query | No | |||
search |
query | No | |||
shooting_ids |
query | No | |||
time_range |
query | 30d | No |
Responses
{
"scope": "self",
"kpis": [
{
"id": "string",
"label": "string",
"value": "string",
"delta": null,
"delta_suffix": "string",
"delta_is_good_when_negative": true,
"sparkline": [
10.12
],
"secondary": null
}
],
"operators": [
{
"id": "37ea2ad8-60dc-41f2-a41e-2b0f52902fdb",
"full_name": "string",
"email": "string",
"initials": "string",
"role": "OPERATOR",
"last_active_at": null,
"shootings": 0,
"production_requests": 0,
"shots": 0,
"revisions": 0,
"revisions_by_status": {},
"authored_rejected": 0,
"authored_post_prod_rejected": 0,
"trend": [
10.12
]
}
],
"funnel": [
{
"status": "string",
"label": "string",
"count": 0
}
],
"timeline": [
{
"date": "string",
"counts": {}
}
],
"activity_calendar": [
{
"date": "string",
"count": 0
}
],
"ai_usage": [
{
"operator_id": "d404b170-e417-4493-bf26-f8b2cce41295",
"operator_name": "string",
"tools": {},
"predictions": 0
}
],
"activity_feed": [
{
"id": "string",
"actor_id": null,
"actor_name": "string",
"kind": "revision",
"verb": "string",
"target": "string",
"at": "2022-04-13T15:42:05.901Z",
"shooting_id": null,
"production_request_id": null,
"shot_id": null,
"product_id": null
}
]
}
Schema of the response body
{
"properties": {
"scope": {
"$ref": "#/components/schemas/StatsScope"
},
"kpis": {
"items": {
"$ref": "#/components/schemas/Kpi"
},
"type": "array",
"title": "Kpis"
},
"operators": {
"items": {
"$ref": "#/components/schemas/Operator"
},
"type": "array",
"title": "Operators"
},
"funnel": {
"items": {
"$ref": "#/components/schemas/FunnelStep"
},
"type": "array",
"title": "Funnel"
},
"timeline": {
"items": {
"$ref": "#/components/schemas/TimelinePoint"
},
"type": "array",
"title": "Timeline"
},
"activity_calendar": {
"items": {
"$ref": "#/components/schemas/CalendarDay"
},
"type": "array",
"title": "Activity Calendar"
},
"ai_usage": {
"items": {
"$ref": "#/components/schemas/AiUsageRow"
},
"type": "array",
"title": "Ai Usage"
},
"activity_feed": {
"items": {
"$ref": "#/components/schemas/ActivityEntry"
},
"type": "array",
"title": "Activity Feed"
}
},
"type": "object",
"required": [
"scope"
],
"title": "OperatorStatsResponse",
"description": "Full dashboard payload returned by ``GET /operator-stats``."
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.
GET /api/v1/operator-stats/activity¶
Get Operator Stats Activity
Description
Paginated activity feed (same filters as the dashboard).
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
OAuth2PasswordBearer |
header | string | N/A | No | |
created_from |
query | No | |||
created_to |
query | No | |||
limit |
query | integer | 50 | No | |
operator_ids |
query | No | |||
organization_id |
query | No | |||
roles |
query | No | |||
search |
query | No | |||
shooting_ids |
query | No | |||
skip |
query | integer | 0 | No | |
time_range |
query | 30d | No |
Responses
{
"data": [
{
"id": "string",
"actor_id": null,
"actor_name": "string",
"kind": "revision",
"verb": "string",
"target": "string",
"at": "2022-04-13T15:42:05.901Z",
"shooting_id": null,
"production_request_id": null,
"shot_id": null,
"product_id": null
}
],
"count": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.
GET /api/v1/operator-stats/operators/{operator_id}¶
Get Operator Stats Detail
Description
Single-operator profile + recent activity (org- and role-checked).
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
OAuth2PasswordBearer |
header | string | N/A | No | |
created_from |
query | No | |||
created_to |
query | No | |||
operator_id |
path | string | No | ||
operator_ids |
query | No | |||
organization_id |
query | No | |||
roles |
query | No | |||
search |
query | No | |||
shooting_ids |
query | No | |||
time_range |
query | 30d | No |
Responses
{
"operator": {
"id": "390cf26c-57cc-4766-92f3-bb58657ce6a7",
"full_name": "string",
"email": "string",
"initials": "string",
"role": "OPERATOR",
"last_active_at": null,
"shootings": 0,
"production_requests": 0,
"shots": 0,
"revisions": 0,
"revisions_by_status": {},
"authored_rejected": 0,
"authored_post_prod_rejected": 0,
"trend": [
10.12
]
},
"recent_activity": [
{
"id": "string",
"actor_id": null,
"actor_name": "string",
"kind": "revision",
"verb": "string",
"target": "string",
"at": "2022-04-13T15:42:05.901Z",
"shooting_id": null,
"production_request_id": null,
"shot_id": null,
"product_id": null
}
]
}
Schema of the response body
{
"properties": {
"operator": {
"$ref": "#/components/schemas/Operator"
},
"recent_activity": {
"items": {
"$ref": "#/components/schemas/ActivityEntry"
},
"type": "array",
"title": "Recent Activity"
}
},
"type": "object",
"required": [
"operator"
],
"title": "OperatorDetail",
"description": "Single-operator drawer payload."
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.
Schemas¶
ActivityEntry¶
| Name | Type | Description |
|---|---|---|
actor_id |
||
actor_name |
string | |
at |
string(date-time) | |
id |
string | |
kind |
ActivityKind | |
product_id |
||
production_request_id |
||
shooting_id |
||
shot_id |
||
target |
string | |
verb |
string |
ActivityFeedPublic¶
| Name | Type | Description |
|---|---|---|
count |
integer | |
data |
Array<ActivityEntry> |
ActivityKind¶
Type: string
AiUsageRow¶
| Name | Type | Description |
|---|---|---|
operator_id |
string(uuid) | |
operator_name |
string | |
predictions |
integer | |
tools |
CalendarDay¶
| Name | Type | Description |
|---|---|---|
count |
integer | |
date |
string |
FunnelStep¶
| Name | Type | Description |
|---|---|---|
count |
integer | |
label |
string | |
status |
string |
HTTPValidationError¶
| Name | Type | Description |
|---|---|---|
detail |
Array<ValidationError> |
Kpi¶
| Name | Type | Description |
|---|---|---|
delta |
||
delta_is_good_when_negative |
boolean | |
delta_suffix |
string | |
id |
string | |
label |
string | |
secondary |
||
sparkline |
Array<number> | |
value |
string |
Operator¶
| Name | Type | Description |
|---|---|---|
authored_post_prod_rejected |
integer | |
authored_rejected |
integer | |
email |
string | |
full_name |
string | |
id |
string(uuid) | |
initials |
string | |
last_active_at |
||
production_requests |
integer | |
revisions |
integer | |
revisions_by_status |
||
role |
RoleName | |
shootings |
integer | |
shots |
integer | |
trend |
Array<number> |
OperatorDetail¶
| Name | Type | Description |
|---|---|---|
operator |
Operator | |
recent_activity |
Array<ActivityEntry> |
OperatorStatsResponse¶
| Name | Type | Description |
|---|---|---|
activity_calendar |
Array<CalendarDay> | |
activity_feed |
Array<ActivityEntry> | |
ai_usage |
Array<AiUsageRow> | |
funnel |
Array<FunnelStep> | |
kpis |
Array<Kpi> | |
operators |
Array<Operator> | |
scope |
StatsScope | |
timeline |
Array<TimelinePoint> |
RoleName¶
Type: string
StatsScope¶
Type: string
TimelinePoint¶
| Name | Type | Description |
|---|---|---|
counts |
||
date |
string |
TimeRange¶
Type: string
ValidationError¶
| Name | Type | Description |
|---|---|---|
ctx |
||
input |
||
loc |
Array<> | |
msg |
string | |
type |
string |
Security schemes¶
| Name | Type | Scheme | Description |
|---|---|---|---|
| OAuth2PasswordBearer | oauth2 |