X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=support%2Fdoc%2Fapi%2Fopenapi.yaml;h=1d5581072adab2e4c0fec5ba638286f757f5cc65;hb=bdf70330e4d74091ccc9d64534d3f780d5ee8ef4;hp=48109664a6108857bbcda3e2cc4792d692b27d27;hpb=8dd754c76735417305c4b68e2ada6f623e9d7650;p=github%2FChocobozzz%2FPeerTube.git diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index 48109664a..1d5581072 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml @@ -267,6 +267,10 @@ tags: description: Like/dislike a video. - name: Video Playlists description: Operations dealing with playlists of videos. Playlists are bound to users and/or channels. + - name: Video Files + description: Operations on video files + - name: Video Transcoding + description: Video transcoding related operations - name: Feeds description: Server syndication feeds - name: Search @@ -309,6 +313,8 @@ x-tagGroups: - Video Playlists - Video Ownership Change - Video Mirroring + - Video Files + - Video Transcoding - Live Videos - Feeds - name: Search @@ -369,6 +375,7 @@ paths: - $ref: '#/components/parameters/nsfw' - $ref: '#/components/parameters/isLocal' - $ref: '#/components/parameters/include' + - $ref: '#/components/parameters/privacyOneOf' - $ref: '#/components/parameters/hasHLSFiles' - $ref: '#/components/parameters/hasWebtorrentFiles' - $ref: '#/components/parameters/skipCount' @@ -1305,6 +1312,7 @@ paths: - $ref: '#/components/parameters/nsfw' - $ref: '#/components/parameters/isLocal' - $ref: '#/components/parameters/include' + - $ref: '#/components/parameters/privacyOneOf' - $ref: '#/components/parameters/hasHLSFiles' - $ref: '#/components/parameters/hasWebtorrentFiles' - $ref: '#/components/parameters/skipCount' @@ -1628,6 +1636,7 @@ paths: - $ref: '#/components/parameters/nsfw' - $ref: '#/components/parameters/isLocal' - $ref: '#/components/parameters/include' + - $ref: '#/components/parameters/privacyOneOf' - $ref: '#/components/parameters/hasHLSFiles' - $ref: '#/components/parameters/hasWebtorrentFiles' - $ref: '#/components/parameters/skipCount' @@ -2867,6 +2876,7 @@ paths: - $ref: '#/components/parameters/nsfw' - $ref: '#/components/parameters/isLocal' - $ref: '#/components/parameters/include' + - $ref: '#/components/parameters/privacyOneOf' - $ref: '#/components/parameters/hasHLSFiles' - $ref: '#/components/parameters/hasWebtorrentFiles' - $ref: '#/components/parameters/skipCount' @@ -3564,6 +3574,69 @@ paths: '404': description: video does not exist + '/videos/{id}/hls': + delete: + summary: Delete video HLS files + security: + - OAuth2: + - admin + tags: + - Video Files + operationId: delVideoHLS + parameters: + - $ref: '#/components/parameters/idOrUUID' + responses: + '204': + description: successful operation + '404': + description: video does not exist + '/videos/{id}/webtorrent': + delete: + summary: Delete video WebTorrent files + security: + - OAuth2: + - admin + tags: + - Video Files + operationId: delVideoWebTorrent + parameters: + - $ref: '#/components/parameters/idOrUUID' + responses: + '204': + description: successful operation + '404': + description: video does not exist + + '/videos/{id}/transcoding': + post: + summary: Create a transcoding job + security: + - OAuth2: + - admin + tags: + - Video Transcoding + operationId: createVideoTranscoding + parameters: + - $ref: '#/components/parameters/idOrUUID' + requestBody: + content: + application/json: + schema: + type: object + properties: + transcodingType: + type: string + enum: + - hls + - webtorrent + required: + - transcodingType + responses: + '204': + description: successful operation + '404': + description: video does not exist + /search/videos: get: tags: @@ -3590,6 +3663,7 @@ paths: - $ref: '#/components/parameters/nsfw' - $ref: '#/components/parameters/isLocal' - $ref: '#/components/parameters/include' + - $ref: '#/components/parameters/privacyOneOf' - $ref: '#/components/parameters/hasHLSFiles' - $ref: '#/components/parameters/hasWebtorrentFiles' - $ref: '#/components/parameters/skipCount' @@ -3718,6 +3792,39 @@ paths: '500': description: search index unavailable + /blocklist/status: + get: + tags: + - Account Blocks + - Server Blocks + summary: Get block status of accounts/hosts + parameters: + - + name: 'accounts' + in: query + description: 'Check if these accounts are blocked' + example: [ 'goofy@example.com', 'donald@example.com' ] + schema: + type: array + items: + type: string + - + name: 'hosts' + in: query + description: 'Check if these hosts are blocked' + example: [ 'example.com' ] + schema: + type: array + items: + type: string + responses: + '200': + description: successful operation + content: + 'application/json': + schema: + $ref: '#/components/schemas/BlockStatus' + /server/blocklist/accounts: get: tags: @@ -4095,6 +4202,7 @@ paths: - $ref: '#/components/parameters/nsfw' - $ref: '#/components/parameters/isLocal' - $ref: '#/components/parameters/include' + - $ref: '#/components/parameters/privacyOneOf' - $ref: '#/components/parameters/hasHLSFiles' - $ref: '#/components/parameters/hasWebtorrentFiles' responses: @@ -4179,6 +4287,7 @@ paths: - $ref: '#/components/parameters/nsfw' - $ref: '#/components/parameters/isLocal' - $ref: '#/components/parameters/include' + - $ref: '#/components/parameters/privacyOneOf' - $ref: '#/components/parameters/hasHLSFiles' - $ref: '#/components/parameters/hasWebtorrentFiles' responses: @@ -4834,6 +4943,13 @@ components: schema: type: boolean description: '**PeerTube >= 4.0** Display only videos that have WebTorrent files' + privacyOneOf: + name: privacyOneOf + in: query + required: false + schema: + $ref: '#/components/schemas/VideoPrivacySet' + description: '**PeerTube >= 4.0** Display only videos in this specific privacy/privacies' include: name: include in: query @@ -4853,11 +4969,11 @@ components: - `1` NOT_PUBLISHED_STATE - - `2` HIDDEN_PRIVACY + - `2` BLACKLISTED - - `4` BLACKLISTED + - `4` BLOCKED_OWNER - - `8` BLOCKED + - `8` FILES subscriptionsUris: name: uris in: query @@ -4892,7 +5008,7 @@ components: - video-transcoding - video-file-import - video-import - - videos-views + - videos-views-stats - activitypub-refresher - video-redundancy - video-live-ending @@ -5051,6 +5167,29 @@ components: label: type: string + BlockStatus: + properties: + accounts: + type: object + additionalProperties: + x-additionalPropertiesName: account + type: object + properties: + blockedByServer: + type: boolean + blockedByUser: + type: boolean + hosts: + type: object + additionalProperties: + x-additionalPropertiesName: host + type: object + properties: + blockedByServer: + type: boolean + blockedByUser: + type: boolean + NSFWPolicy: type: string enum: @@ -5397,6 +5536,9 @@ components: - $ref: '#/components/schemas/Video' - type: object properties: + viewers: + type: integer + description: If the video is a live, you have the amount of current viewers descriptionPath: type: string example: /api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d/description @@ -6300,7 +6442,7 @@ components: - video-transcoding - email - video-import - - videos-views + - videos-views-stats - activitypub-refresher - video-redundancy data: @@ -7258,6 +7400,8 @@ components: properties: rtmpUrl: type: string + rtmpsUrl: + type: string streamKey: type: string description: RTMP stream key to use to stream into this live video