Update api schema

This commit is contained in:
Nicolas Mowen 2025-04-09 14:47:31 -06:00
parent 2cafcf698c
commit 6a4e340919

View File

@ -161,6 +161,253 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/HTTPValidationError" $ref: "#/components/schemas/HTTPValidationError"
"/users/{username}/role":
put:
tags:
- Auth
summary: Update Role
operationId: update_role_users__username__role_put
parameters:
- name: username
in: path
required: true
schema:
type: string
title: Username
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/AppPutRoleBody"
responses:
"200":
description: Successful Response
content:
application/json:
schema: {}
"422":
description: Validation Error
content:
application/json:
schema:
$ref: "#/components/schemas/HTTPValidationError"
/faces:
get:
tags:
- Events
summary: Get Faces
operationId: get_faces_faces_get
responses:
"200":
description: Successful Response
content:
application/json:
schema: {}
/faces/reprocess:
post:
tags:
- Events
summary: Reclassify Face
operationId: reclassify_face_faces_reprocess_post
requestBody:
content:
application/json:
schema:
type: object
title: Body
responses:
"200":
description: Successful Response
content:
application/json:
schema: {}
"422":
description: Validation Error
content:
application/json:
schema:
$ref: "#/components/schemas/HTTPValidationError"
"/faces/train/{name}/classify":
post:
tags:
- Events
summary: Train Face
operationId: train_face_faces_train__name__classify_post
parameters:
- name: name
in: path
required: true
schema:
type: string
title: Name
requestBody:
content:
application/json:
schema:
type: object
title: Body
responses:
"200":
description: Successful Response
content:
application/json:
schema: {}
"422":
description: Validation Error
content:
application/json:
schema:
$ref: "#/components/schemas/HTTPValidationError"
"/faces/{name}/create":
post:
tags:
- Events
summary: Create Face
operationId: create_face_faces__name__create_post
parameters:
- name: name
in: path
required: true
schema:
type: string
title: Name
responses:
"200":
description: Successful Response
content:
application/json:
schema: {}
"422":
description: Validation Error
content:
application/json:
schema:
$ref: "#/components/schemas/HTTPValidationError"
"/faces/{name}/register":
post:
tags:
- Events
summary: Register Face
operationId: register_face_faces__name__register_post
parameters:
- name: name
in: path
required: true
schema:
type: string
title: Name
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: >-
#/components/schemas/Body_register_face_faces__name__register_post
responses:
"200":
description: Successful Response
content:
application/json:
schema: {}
"422":
description: Validation Error
content:
application/json:
schema:
$ref: "#/components/schemas/HTTPValidationError"
/faces/recognize:
post:
tags:
- Events
summary: Recognize Face
operationId: recognize_face_faces_recognize_post
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: "#/components/schemas/Body_recognize_face_faces_recognize_post"
responses:
"200":
description: Successful Response
content:
application/json:
schema: {}
"422":
description: Validation Error
content:
application/json:
schema:
$ref: "#/components/schemas/HTTPValidationError"
"/faces/{name}/delete":
post:
tags:
- Events
summary: Deregister Faces
operationId: deregister_faces_faces__name__delete_post
parameters:
- name: name
in: path
required: true
schema:
type: string
title: Name
requestBody:
content:
application/json:
schema:
type: object
title: Body
responses:
"200":
description: Successful Response
content:
application/json:
schema: {}
"422":
description: Validation Error
content:
application/json:
schema:
$ref: "#/components/schemas/HTTPValidationError"
/lpr/reprocess:
put:
tags:
- Events
summary: Reprocess License Plate
operationId: reprocess_license_plate_lpr_reprocess_put
parameters:
- name: event_id
in: query
required: true
schema:
type: string
title: Event Id
responses:
"200":
description: Successful Response
content:
application/json:
schema: {}
"422":
description: Validation Error
content:
application/json:
schema:
$ref: "#/components/schemas/HTTPValidationError"
/reindex:
put:
tags:
- Events
summary: Reindex Embeddings
operationId: reindex_embeddings_reindex_put
responses:
"200":
description: Successful Response
content:
application/json:
schema: {}
/review: /review:
get: get:
tags: tags:
@ -206,9 +453,7 @@ paths:
in: query in: query
required: false required: false
schema: schema:
allOf: $ref: "#/components/schemas/SeverityEnum"
- $ref: "#/components/schemas/SeverityEnum"
title: Severity
- name: before - name: before
in: query in: query
required: false required: false
@ -237,6 +482,35 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/HTTPValidationError" $ref: "#/components/schemas/HTTPValidationError"
/review_ids:
get:
tags:
- Review
summary: Review Ids
operationId: review_ids_review_ids_get
parameters:
- name: ids
in: query
required: true
schema:
type: string
title: Ids
responses:
"200":
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/ReviewSegmentResponse"
title: Response Review Ids Review Ids Get
"422":
description: Validation Error
content:
application/json:
schema:
$ref: "#/components/schemas/HTTPValidationError"
/review/summary: /review/summary:
get: get:
tags: tags:
@ -575,6 +849,19 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/HTTPValidationError" $ref: "#/components/schemas/HTTPValidationError"
/metrics:
get:
tags:
- App
summary: Metrics
description: Expose Prometheus metrics endpoint and update metrics with latest stats
operationId: metrics_metrics_get
responses:
"200":
description: Successful Response
content:
application/json:
schema: {}
/config: /config:
get: get:
tags: tags:
@ -731,6 +1018,15 @@ paths:
- type: string - type: string
- type: "null" - type: "null"
title: Download title: Download
- name: stream
in: query
required: false
schema:
anyOf:
- type: boolean
- type: "null"
default: false
title: Stream
- name: start - name: start
in: query in: query
required: false required: false
@ -825,6 +1121,59 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/HTTPValidationError" $ref: "#/components/schemas/HTTPValidationError"
/plus/models:
get:
tags:
- App
summary: Plusmodels
operationId: plusModels_plus_models_get
parameters:
- name: filterByCurrentModelDetector
in: query
required: false
schema:
type: boolean
default: false
title: Filterbycurrentmodeldetector
responses:
"200":
description: Successful Response
content:
application/json:
schema: {}
"422":
description: Validation Error
content:
application/json:
schema:
$ref: "#/components/schemas/HTTPValidationError"
/recognized_license_plates:
get:
tags:
- App
summary: Get Recognized License Plates
operationId: get_recognized_license_plates_recognized_license_plates_get
parameters:
- name: split_joined
in: query
required: false
schema:
anyOf:
- type: integer
- type: "null"
title: Split Joined
responses:
"200":
description: Successful Response
content:
application/json:
schema: {}
"422":
description: Validation Error
content:
application/json:
schema:
$ref: "#/components/schemas/HTTPValidationError"
/timeline: /timeline:
get: get:
tags: tags:
@ -1158,12 +1507,12 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/HTTPValidationError" $ref: "#/components/schemas/HTTPValidationError"
"/export/{event_id}/{new_name}": "/export/{event_id}/rename":
patch: patch:
tags: tags:
- Export - Export
summary: Export Rename summary: Export Rename
operationId: export_rename_export__event_id___new_name__patch operationId: export_rename_export__event_id__rename_patch
parameters: parameters:
- name: event_id - name: event_id
in: path in: path
@ -1171,12 +1520,12 @@ paths:
schema: schema:
type: string type: string
title: Event Id title: Event Id
- name: new_name requestBody:
in: path required: true
required: true content:
schema: application/json:
type: string schema:
title: New Name $ref: "#/components/schemas/ExportRenameBody"
responses: responses:
"200": "200":
description: Successful Response description: Successful Response
@ -1409,6 +1758,31 @@ paths:
- type: number - type: number
- type: "null" - type: "null"
title: Max Score title: Max Score
- name: min_speed
in: query
required: false
schema:
anyOf:
- type: number
- type: "null"
title: Min Speed
- name: max_speed
in: query
required: false
schema:
anyOf:
- type: number
- type: "null"
title: Max Speed
- name: recognized_license_plate
in: query
required: false
schema:
anyOf:
- type: string
- type: "null"
default: all
title: Recognized License Plate
- name: is_submitted - name: is_submitted
in: query in: query
required: false required: false
@ -1684,6 +2058,31 @@ paths:
- type: number - type: number
- type: "null" - type: "null"
title: Max Score title: Max Score
- name: min_speed
in: query
required: false
schema:
anyOf:
- type: number
- type: "null"
title: Min Speed
- name: max_speed
in: query
required: false
schema:
anyOf:
- type: number
- type: "null"
title: Max Speed
- name: recognized_license_plate
in: query
required: false
schema:
anyOf:
- type: string
- type: "null"
default: all
title: Recognized License Plate
- name: sort - name: sort
in: query in: query
required: false required: false
@ -1867,9 +2266,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
allOf: $ref: "#/components/schemas/SubmitPlusBody"
- $ref: "#/components/schemas/SubmitPlusBody"
title: Body
responses: responses:
"200": "200":
description: Successful Response description: Successful Response
@ -2056,15 +2453,13 @@ paths:
content: content:
application/json: application/json:
schema: schema:
allOf: $ref: "#/components/schemas/EventsCreateBody"
- $ref: "#/components/schemas/EventsCreateBody"
default: default:
source_type: api source_type: api
score: 0 score: 0
duration: 30 duration: 30
include_recording: true include_recording: true
draw: {} draw: {}
title: Body
responses: responses:
"200": "200":
description: Successful Response description: Successful Response
@ -2305,6 +2700,14 @@ paths:
- type: integer - type: integer
- type: "null" - type: "null"
title: Height title: Height
- name: store
in: query
required: false
schema:
anyOf:
- type: integer
- type: "null"
title: Store
responses: responses:
"200": "200":
description: Successful Response description: Successful Response
@ -2407,6 +2810,42 @@ paths:
content: content:
application/json: application/json:
schema: {} schema: {}
/recordings/summary:
get:
tags:
- Media
summary: All Recordings Summary
description: Returns true/false by day indicating if recordings exist
operationId: all_recordings_summary_recordings_summary_get
parameters:
- name: timezone
in: query
required: false
schema:
type: string
default: utc
title: Timezone
- name: cameras
in: query
required: false
schema:
anyOf:
- type: string
- type: "null"
default: all
title: Cameras
responses:
"200":
description: Successful Response
content:
application/json:
schema: {}
"422":
description: Validation Error
content:
application/json:
schema:
$ref: "#/components/schemas/HTTPValidationError"
"/{camera_name}/recordings/summary": "/{camera_name}/recordings/summary":
get: get:
tags: tags:
@ -2461,14 +2900,14 @@ paths:
required: false required: false
schema: schema:
type: number type: number
default: 1733228876.15567 default: 1744227965.180043
title: After title: After
- name: before - name: before
in: query in: query
required: false required: false
schema: schema:
type: number type: number
default: 1733232476.15567 default: 1744231565.180048
title: Before title: Before
responses: responses:
"200": "200":
@ -2749,12 +3188,12 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/HTTPValidationError" $ref: "#/components/schemas/HTTPValidationError"
"/events/{event_id}/thumbnail.jpg": "/events/{event_id}/thumbnail.{extension}":
get: get:
tags: tags:
- Media - Media
summary: Event Thumbnail summary: Event Thumbnail
operationId: event_thumbnail_events__event_id__thumbnail_jpg_get operationId: event_thumbnail_events__event_id__thumbnail__extension__get
parameters: parameters:
- name: event_id - name: event_id
in: path in: path
@ -2762,6 +3201,12 @@ paths:
schema: schema:
type: string type: string
title: Event Id title: Event Id
- name: extension
in: path
required: true
schema:
type: string
title: Extension
- name: max_cache_age - name: max_cache_age
in: query in: query
required: false required: false
@ -3251,6 +3696,12 @@ components:
password: password:
type: string type: string
title: Password title: Password
role:
anyOf:
- type: string
- type: "null"
title: Role
default: viewer
type: object type: object
required: required:
- username - username
@ -3265,6 +3716,35 @@ components:
required: required:
- password - password
title: AppPutPasswordBody title: AppPutPasswordBody
AppPutRoleBody:
properties:
role:
type: string
title: Role
type: object
required:
- role
title: AppPutRoleBody
Body_recognize_face_faces_recognize_post:
properties:
file:
type: string
format: binary
title: File
type: object
required:
- file
title: Body_recognize_face_faces_recognize_post
Body_register_face_faces__name__register_post:
properties:
file:
type: string
format: binary
title: File
type: object
required:
- file
title: Body_register_face_faces__name__register_post
DayReview: DayReview:
properties: properties:
day: day:
@ -3354,7 +3834,9 @@ components:
- type: "null" - type: "null"
title: End Time title: End Time
false_positive: false_positive:
type: boolean anyOf:
- type: boolean
- type: "null"
title: False Positive title: False Positive
zones: zones:
items: items:
@ -3362,7 +3844,9 @@ components:
type: array type: array
title: Zones title: Zones
thumbnail: thumbnail:
type: string anyOf:
- type: string
- type: "null"
title: Thumbnail title: Thumbnail
has_clip: has_clip:
type: boolean type: boolean
@ -3394,6 +3878,7 @@ components:
- type: "null" - type: "null"
title: Model Type title: Model Type
data: data:
type: object
title: Data title: Data
type: object type: object
required: required:
@ -3511,6 +3996,11 @@ components:
exclusiveMinimum: 0 exclusiveMinimum: 0
- type: "null" - type: "null"
title: Score for sub label title: Score for sub label
camera:
anyOf:
- type: string
- type: "null"
title: Camera this object is detected on.
type: object type: object
required: required:
- subLabel - subLabel
@ -3518,13 +4008,11 @@ components:
ExportRecordingsBody: ExportRecordingsBody:
properties: properties:
playback: playback:
allOf: $ref: "#/components/schemas/PlaybackFactorEnum"
- $ref: "#/components/schemas/PlaybackFactorEnum"
title: Playback factor title: Playback factor
default: realtime default: realtime
source: source:
allOf: $ref: "#/components/schemas/PlaybackSourceEnum"
- $ref: "#/components/schemas/PlaybackSourceEnum"
title: Playback source title: Playback source
default: recordings default: recordings
name: name:
@ -3536,6 +4024,16 @@ components:
title: Image Path title: Image Path
type: object type: object
title: ExportRecordingsBody title: ExportRecordingsBody
ExportRenameBody:
properties:
name:
type: string
maxLength: 256
title: Friendly name
type: object
required:
- name
title: ExportRenameBody
Extension: Extension:
type: string type: string
enum: enum: