Updated docs to reflect changes to export endpoint

This commit is contained in:
Rui Alves 2024-11-10 21:46:29 +00:00
parent de4fecccf9
commit 7e5181a97a
2 changed files with 66 additions and 25 deletions

View File

@ -7,7 +7,7 @@ info:
servers: servers:
- url: https://demo.frigate.video/api - url: https://demo.frigate.video/api
- url: http://localhost:5001/ - url: http://localhost:5001/api
paths: paths:
/auth: /auth:
@ -296,7 +296,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/ReviewSetMultipleReviewedBody' $ref: '#/components/schemas/ReviewModifyMultipleBody'
responses: responses:
'200': '200':
description: Successful Response description: Successful Response
@ -321,7 +321,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/ReviewDeleteMultipleReviewsBody' $ref: '#/components/schemas/ReviewModifyMultipleBody'
responses: responses:
'200': '200':
description: Successful Response description: Successful Response
@ -1141,11 +1141,11 @@ paths:
type: number type: number
title: End Time title: End Time
requestBody: requestBody:
required: true
content: content:
application/json: application/json:
schema: schema:
type: object $ref: '#/components/schemas/ExportRecordingsBody'
title: Body
responses: responses:
'200': '200':
description: Successful Response description: Successful Response
@ -1408,6 +1408,14 @@ paths:
- type: number - type: number
- type: 'null' - type: 'null'
title: Max Length title: Max Length
- name: event_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Event Id
- name: sort - name: sort
in: query in: query
required: false required: false
@ -1518,7 +1526,7 @@ paths:
anyOf: anyOf:
- type: string - type: string
- type: 'null' - type: 'null'
default: thumbnail,description default: thumbnail
title: Search Type title: Search Type
- name: include_thumbnails - name: include_thumbnails
in: query in: query
@ -1590,6 +1598,22 @@ paths:
- type: 'null' - type: 'null'
default: 00:00,24:00 default: 00:00,24:00
title: Time Range title: Time Range
- name: has_clip
in: query
required: false
schema:
anyOf:
- type: boolean
- type: 'null'
title: Has Clip
- name: has_snapshot
in: query
required: false
schema:
anyOf:
- type: boolean
- type: 'null'
title: Has Snapshot
- name: timezone - name: timezone
in: query in: query
required: false required: false
@ -2356,14 +2380,14 @@ paths:
required: false required: false
schema: schema:
type: number type: number
default: 1729274204.653048 default: 1731271332.181958
title: After title: After
- name: before - name: before
in: query in: query
required: false required: false
schema: schema:
type: number type: number
default: 1729277804.653095 default: 1731274932.181968
title: Before title: Before
responses: responses:
'200': '200':
@ -3262,6 +3286,29 @@ components:
required: required:
- subLabel - subLabel
title: EventsSubLabelBody title: EventsSubLabelBody
ExportRecordingsBody:
properties:
playback:
allOf:
- $ref: '#/components/schemas/PlaybackFactorEnum'
title: Playback factor
default: realtime
source:
type: string
title: Source
default: recordings
name:
type: string
maxLength: 256
minLength: 1
title: Friendly name
image_path:
type: string
title: Image Path
type: object
required:
- name
title: ExportRecordingsBody
Extension: Extension:
type: string type: string
enum: enum:
@ -3313,6 +3360,12 @@ components:
- total_alert - total_alert
- total_detection - total_detection
title: Last24HoursReview title: Last24HoursReview
PlaybackFactorEnum:
type: string
enum:
- realtime
- timelapse_25x
title: PlaybackFactorEnum
RegenerateDescriptionEnum: RegenerateDescriptionEnum:
type: string type: string
enum: enum:
@ -3336,7 +3389,7 @@ components:
- motion - motion
- camera - camera
title: ReviewActivityMotionResponse title: ReviewActivityMotionResponse
ReviewDeleteMultipleReviewsBody: ReviewModifyMultipleBody:
properties: properties:
ids: ids:
items: items:
@ -3348,7 +3401,7 @@ components:
type: object type: object
required: required:
- ids - ids
title: ReviewDeleteMultipleReviewsBody title: ReviewModifyMultipleBody
ReviewSegmentResponse: ReviewSegmentResponse:
properties: properties:
id: id:
@ -3386,19 +3439,6 @@ components:
- thumb_path - thumb_path
- data - data
title: ReviewSegmentResponse title: ReviewSegmentResponse
ReviewSetMultipleReviewedBody:
properties:
ids:
items:
type: string
minLength: 1
type: array
minItems: 1
title: Ids
type: object
required:
- ids
title: ReviewSetMultipleReviewedBody
ReviewSummaryResponse: ReviewSummaryResponse:
properties: properties:
last24Hours: last24Hours:

View File

@ -1,6 +1,7 @@
from typing import Optional from typing import Union
from pydantic import BaseModel, Field from pydantic import BaseModel, Field
from pydantic.json_schema import SkipJsonSchema
from frigate.record.export import PlaybackFactorEnum from frigate.record.export import PlaybackFactorEnum
@ -11,4 +12,4 @@ class ExportRecordingsBody(BaseModel):
) )
source: str = "recordings" source: str = "recordings"
name: str = Field(title="Friendly name", min_length=1, max_length=256) name: str = Field(title="Friendly name", min_length=1, max_length=256)
image_path: Optional[str] = None image_path: Union[str, SkipJsonSchema[None]] = None