add redundancy to the openapi spec
This commit is contained in:
parent
f4d5998127
commit
04b703f6fc
|
@ -66,6 +66,12 @@ tags:
|
||||||
server then deals with inter-server ActivityPub operations and propagates
|
server then deals with inter-server ActivityPub operations and propagates
|
||||||
information across its social graph by posting activities to actors' inbox
|
information across its social graph by posting activities to actors' inbox
|
||||||
endpoints.
|
endpoints.
|
||||||
|
- name: Instance Redundancy
|
||||||
|
description: >
|
||||||
|
Redundancy is part of the inter-server solidarity that PeerTube fosters.
|
||||||
|
Manage the list of instances you wish to help by seeding their videos according
|
||||||
|
to the policy of video selection of your choice. Note that you have a similar functionality
|
||||||
|
to mirror individual videos, see `Video Mirroring`.
|
||||||
- name: Video Abuses
|
- name: Video Abuses
|
||||||
description: |
|
description: |
|
||||||
Video abuses deal with reports of local or remote videos alike.
|
Video abuses deal with reports of local or remote videos alike.
|
||||||
|
@ -113,12 +119,13 @@ x-tagGroups:
|
||||||
- name: Videos
|
- name: Videos
|
||||||
tags:
|
tags:
|
||||||
- Video
|
- Video
|
||||||
- Video Caption
|
- Video Captions
|
||||||
- Video Channels
|
- Video Channels
|
||||||
- Video Comments
|
- Video Comments
|
||||||
- Video Rates
|
- Video Rates
|
||||||
- Video Playlists
|
- Video Playlists
|
||||||
- Video Ownership Change
|
- Video Ownership Change
|
||||||
|
- Video Mirroring
|
||||||
- Feeds
|
- Feeds
|
||||||
- name: Search
|
- name: Search
|
||||||
tags:
|
tags:
|
||||||
|
@ -133,6 +140,7 @@ x-tagGroups:
|
||||||
tags:
|
tags:
|
||||||
- Config
|
- Config
|
||||||
- Instance Follows
|
- Instance Follows
|
||||||
|
- Instance Redundancy
|
||||||
- name: Jobs
|
- name: Jobs
|
||||||
tags:
|
tags:
|
||||||
- Job
|
- Job
|
||||||
|
@ -1525,7 +1533,7 @@ paths:
|
||||||
get:
|
get:
|
||||||
summary: List captions of a video
|
summary: List captions of a video
|
||||||
tags:
|
tags:
|
||||||
- Video Caption
|
- Video Captions
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/idOrUUID'
|
- $ref: '#/components/parameters/idOrUUID'
|
||||||
responses:
|
responses:
|
||||||
|
@ -1546,7 +1554,7 @@ paths:
|
||||||
put:
|
put:
|
||||||
summary: Add or replace a video caption
|
summary: Add or replace a video caption
|
||||||
tags:
|
tags:
|
||||||
- Video Caption
|
- Video Captions
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/idOrUUID'
|
- $ref: '#/components/parameters/idOrUUID'
|
||||||
- $ref: '#/components/parameters/captionLanguage'
|
- $ref: '#/components/parameters/captionLanguage'
|
||||||
|
@ -1571,7 +1579,7 @@ paths:
|
||||||
delete:
|
delete:
|
||||||
summary: Delete a video caption
|
summary: Delete a video caption
|
||||||
tags:
|
tags:
|
||||||
- Video Caption
|
- Video Captions
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/idOrUUID'
|
- $ref: '#/components/parameters/idOrUUID'
|
||||||
- $ref: '#/components/parameters/captionLanguage'
|
- $ref: '#/components/parameters/captionLanguage'
|
||||||
|
@ -2360,6 +2368,113 @@ paths:
|
||||||
description: successful operation
|
description: successful operation
|
||||||
'404':
|
'404':
|
||||||
description: account block does not exist
|
description: account block does not exist
|
||||||
|
/redundancy/{host}:
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- Instance Redundancy
|
||||||
|
summary: Update a server redundancy policy
|
||||||
|
security:
|
||||||
|
- OAuth2:
|
||||||
|
- admin
|
||||||
|
parameters:
|
||||||
|
- name: host
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
description: server domain to mirror
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
redundancyAllowed:
|
||||||
|
type: boolean
|
||||||
|
description: allow mirroring of the host's local videos
|
||||||
|
required:
|
||||||
|
- redundancyAllowed
|
||||||
|
responses:
|
||||||
|
'204':
|
||||||
|
description: successful operation
|
||||||
|
'404':
|
||||||
|
description: server is not already known
|
||||||
|
/redundancy/videos:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Video Mirroring
|
||||||
|
summary: List videos being mirrored
|
||||||
|
security:
|
||||||
|
- OAuth2:
|
||||||
|
- admin
|
||||||
|
parameters:
|
||||||
|
- name: target
|
||||||
|
in: query
|
||||||
|
required: true
|
||||||
|
description: direction of the mirror
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- my-videos
|
||||||
|
- remote-videos
|
||||||
|
- $ref: '#/components/parameters/start'
|
||||||
|
- $ref: '#/components/parameters/count'
|
||||||
|
- $ref: '#/components/parameters/videoRedundanciesSort'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/VideoRedundancy'
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Video Mirroring
|
||||||
|
summary: Mirror a video
|
||||||
|
security:
|
||||||
|
- OAuth2:
|
||||||
|
- admin
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
videoId:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- videoId
|
||||||
|
responses:
|
||||||
|
'204':
|
||||||
|
description: successful operation
|
||||||
|
'400':
|
||||||
|
description: cannot mirror a local video
|
||||||
|
'404':
|
||||||
|
description: video does not exist
|
||||||
|
'409':
|
||||||
|
description: video is already mirrored
|
||||||
|
/redundancy/videos/{redundancyId}:
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- Video Mirroring
|
||||||
|
summary: Delete a mirror done on a video
|
||||||
|
security:
|
||||||
|
- OAuth2:
|
||||||
|
- admin
|
||||||
|
parameters:
|
||||||
|
- name: redundancyId
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
description: id of an existing redundancy on a video
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
'204':
|
||||||
|
description: successful operation
|
||||||
|
'404':
|
||||||
|
description: video redundancy not found
|
||||||
'/feeds/video-comments.{format}':
|
'/feeds/video-comments.{format}':
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
|
@ -2551,7 +2666,7 @@ components:
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
- -name
|
- name
|
||||||
- -duration
|
- -duration
|
||||||
- -createdAt
|
- -createdAt
|
||||||
- -publishedAt
|
- -publishedAt
|
||||||
|
@ -2566,7 +2681,7 @@ components:
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
- -name
|
- name
|
||||||
- -duration
|
- -duration
|
||||||
- -createdAt
|
- -createdAt
|
||||||
- -publishedAt
|
- -publishedAt
|
||||||
|
@ -2592,7 +2707,7 @@ components:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
- -id
|
- -id
|
||||||
- -name
|
- name
|
||||||
- -duration
|
- -duration
|
||||||
- -views
|
- -views
|
||||||
- -likes
|
- -likes
|
||||||
|
@ -2621,6 +2736,15 @@ components:
|
||||||
- -id
|
- -id
|
||||||
- -createdAt
|
- -createdAt
|
||||||
- -state
|
- -state
|
||||||
|
videoRedundanciesSort:
|
||||||
|
name: sort
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
description: Sort abuses by criteria
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- name
|
||||||
name:
|
name:
|
||||||
name: name
|
name: name
|
||||||
in: path
|
in: path
|
||||||
|
@ -3150,6 +3274,46 @@ components:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/VideoStreamingPlaylists'
|
$ref: '#/components/schemas/VideoStreamingPlaylists'
|
||||||
|
FileRedundancyInformation:
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
fileUrl:
|
||||||
|
type: string
|
||||||
|
strategy:
|
||||||
|
type: string
|
||||||
|
size:
|
||||||
|
type: integer
|
||||||
|
createdAt:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
updatedAt:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
expiresOn:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
VideoRedundancy:
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
uuid:
|
||||||
|
type: string
|
||||||
|
redundancies:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
files:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/FileRedundancyInformation'
|
||||||
|
streamingPlaylists:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/FileRedundancyInformation'
|
||||||
VideoImportStateConstant:
|
VideoImportStateConstant:
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
|
@ -3802,6 +3966,7 @@ components:
|
||||||
$ref: '#/components/schemas/Actor'
|
$ref: '#/components/schemas/Actor'
|
||||||
score:
|
score:
|
||||||
type: number
|
type: number
|
||||||
|
description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
|
||||||
state:
|
state:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
|
|
Loading…
Reference in New Issue