Unisson superadmin API
The superadmin API from Unisson — 3 operation(s) for superadmin.
The superadmin API from Unisson — 3 operation(s) for superadmin.
openapi: 3.1.0
info:
title: Unisson agent-evals superadmin API
version: 1.0.0
tags:
- name: superadmin
paths:
/api/v1/superadmin/check:
get:
tags:
- superadmin
summary: Check Superadmin
description: Check if the current organization has superadmin access.
operationId: check_superadmin_api_v1_superadmin_check_get
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
security:
- HTTPBearer: []
/api/v1/superadmin/costs:
get:
tags:
- superadmin
summary: Get Costs
description: Get cost data across all organizations (superadmin only).
operationId: get_costs_api_v1_superadmin_costs_get
security:
- HTTPBearer: []
parameters:
- name: granularity
in: query
required: false
schema:
type: string
pattern: ^(daily|weekly|monthly)$
default: daily
title: Granularity
- name: start_date
in: query
required: false
schema:
anyOf:
- type: string
format: date
- type: 'null'
description: Start date YYYY-MM-DD
title: Start Date
description: Start date YYYY-MM-DD
- name: end_date
in: query
required: false
schema:
anyOf:
- type: string
format: date
- type: 'null'
description: End date YYYY-MM-DD
title: End Date
description: End date YYYY-MM-DD
- name: org_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
description: Filter to a specific org
title: Org Id
description: Filter to a specific org
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/SuperadminCostsResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/superadmin/error-analytics:
get:
tags:
- superadmin
summary: Get Error Analytics
description: Get error analytics across all organizations (superadmin only).
operationId: get_error_analytics_api_v1_superadmin_error_analytics_get
security:
- HTTPBearer: []
parameters:
- name: granularity
in: query
required: false
schema:
type: string
pattern: ^(daily|weekly|monthly)$
default: daily
title: Granularity
- name: start_date
in: query
required: false
schema:
anyOf:
- type: string
format: date
- type: 'null'
description: Start date YYYY-MM-DD
title: Start Date
description: Start date YYYY-MM-DD
- name: end_date
in: query
required: false
schema:
anyOf:
- type: string
format: date
- type: 'null'
description: End date YYYY-MM-DD
title: End Date
description: End date YYYY-MM-DD
- name: org_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
description: Filter to a specific org
title: Org Id
description: Filter to a specific org
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorAnalyticsResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
OrgErrorSummary:
properties:
org_id:
type: string
title: Org Id
org_name:
type: string
title: Org Name
total_failed:
type: integer
title: Total Failed
error_breakdown:
items:
$ref: '#/components/schemas/ErrorCategoryCount'
type: array
title: Error Breakdown
type: object
required:
- org_id
- org_name
- total_failed
- error_breakdown
title: OrgErrorSummary
ModelCost:
properties:
model:
type: string
title: Model
cost:
type: number
title: Cost
input_tokens:
type: integer
title: Input Tokens
output_tokens:
type: integer
title: Output Tokens
call_count:
type: integer
title: Call Count
type: object
required:
- model
- cost
- input_tokens
- output_tokens
- call_count
title: ModelCost
TimeBucket:
properties:
period:
type: string
title: Period
org_id:
type: string
title: Org Id
org_name:
type: string
title: Org Name
llm_cost:
type: number
title: Llm Cost
kernel_cost:
type: number
title: Kernel Cost
total_cost:
type: number
title: Total Cost
run_count:
type: integer
title: Run Count
type: object
required:
- period
- org_id
- org_name
- llm_cost
- kernel_cost
- total_cost
- run_count
title: TimeBucket
ErrorTimeBucket:
properties:
period:
type: string
title: Period
category:
type: string
title: Category
count:
type: integer
title: Count
type: object
required:
- period
- category
- count
title: ErrorTimeBucket
CategoryTimeBucket:
properties:
period:
type: string
title: Period
category:
type: string
title: Category
cost:
type: number
title: Cost
call_count:
type: integer
title: Call Count
type: object
required:
- period
- category
- cost
- call_count
title: CategoryTimeBucket
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
ErrorAnalyticsResponse:
properties:
total_failed_runs:
type: integer
title: Total Failed Runs
total_runs:
type: integer
title: Total Runs
failure_rate:
type: number
title: Failure Rate
error_by_category:
items:
$ref: '#/components/schemas/ErrorCategoryCount'
type: array
title: Error By Category
error_by_org:
items:
$ref: '#/components/schemas/OrgErrorSummary'
type: array
title: Error By Org
error_time_series:
items:
$ref: '#/components/schemas/ErrorTimeBucket'
type: array
title: Error Time Series
type: object
required:
- total_failed_runs
- total_runs
- failure_rate
- error_by_category
- error_by_org
- error_time_series
title: ErrorAnalyticsResponse
ErrorCategoryCount:
properties:
category:
type: string
title: Category
count:
type: integer
title: Count
percentage:
type: number
title: Percentage
type: object
required:
- category
- count
- percentage
title: ErrorCategoryCount
SuperadminCostsResponse:
properties:
org_summaries:
items:
$ref: '#/components/schemas/OrgCostSummary'
type: array
title: Org Summaries
time_series:
items:
$ref: '#/components/schemas/TimeBucket'
type: array
title: Time Series
grand_total_cost:
type: number
title: Grand Total Cost
grand_total_llm_cost:
type: number
title: Grand Total Llm Cost
grand_total_kernel_cost:
type: number
title: Grand Total Kernel Cost
grand_total_runs:
type: integer
title: Grand Total Runs
kernel_cost_per_second:
type: number
title: Kernel Cost Per Second
cost_by_category:
items:
$ref: '#/components/schemas/CategoryCost'
type: array
title: Cost By Category
cost_by_model:
items:
$ref: '#/components/schemas/ModelCost'
type: array
title: Cost By Model
category_time_series:
items:
$ref: '#/components/schemas/CategoryTimeBucket'
type: array
title: Category Time Series
category_model_breakdown:
items:
$ref: '#/components/schemas/CategoryModelCost'
type: array
title: Category Model Breakdown
configured_models:
items:
$ref: '#/components/schemas/ConfiguredModel'
type: array
title: Configured Models
type: object
required:
- org_summaries
- time_series
- grand_total_cost
- grand_total_llm_cost
- grand_total_kernel_cost
- grand_total_runs
- kernel_cost_per_second
- cost_by_category
- cost_by_model
- category_time_series
- category_model_breakdown
- configured_models
title: SuperadminCostsResponse
ConfiguredModel:
properties:
role:
type: string
title: Role
model:
type: string
title: Model
used_by:
type: string
title: Used By
type: object
required:
- role
- model
- used_by
title: ConfiguredModel
description: 'Which model a product surface is *configured* to run on (from
settings.*_MODEL) — the intent view, independent of the date filter.'
CategoryModelCost:
properties:
category:
type: string
title: Category
model:
type: string
title: Model
cost:
type: number
title: Cost
input_tokens:
type: integer
title: Input Tokens
output_tokens:
type: integer
title: Output Tokens
call_count:
type: integer
title: Call Count
type: object
required:
- category
- model
- cost
- input_tokens
- output_tokens
- call_count
title: CategoryModelCost
description: 'A (category, model) pair with its real spend — the join between the
cost-by-category and cost-by-model breakdowns.'
OrgCostSummary:
properties:
org_id:
type: string
title: Org Id
org_name:
type: string
title: Org Name
total_runs:
type: integer
title: Total Runs
total_duration_seconds:
type: integer
title: Total Duration Seconds
total_llm_cost:
type: number
title: Total Llm Cost
total_kernel_cost:
type: number
title: Total Kernel Cost
total_cost:
type: number
title: Total Cost
total_llm_tokens:
type: integer
title: Total Llm Tokens
type: object
required:
- org_id
- org_name
- total_runs
- total_duration_seconds
- total_llm_cost
- total_kernel_cost
- total_cost
- total_llm_tokens
title: OrgCostSummary
CategoryCost:
properties:
category:
type: string
title: Category
cost:
type: number
title: Cost
input_tokens:
type: integer
title: Input Tokens
output_tokens:
type: integer
title: Output Tokens
type: object
required:
- category
- cost
- input_tokens
- output_tokens
title: CategoryCost
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
securitySchemes:
HTTPBearer:
type: http
scheme: bearer