X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=support%2Fdoc%2Fapi%2Fopenapi.yaml;h=afd310c0b8e2d2f3a097ad3a18a307ac297423fb;hb=2e401e8575decb1d491d0db48ca1ab1eba5b2a66;hp=95670925f8ef867aa54538cab5277d1e406298ec;hpb=f18a060a83d7053897173b2a24fb7984893131c7;p=github%2FChocobozzz%2FPeerTube.git diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index 95670925f..afd310c0b 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml @@ -247,8 +247,8 @@ tags: ### Import - _URL_-based: where the URL points to any service supported by [youtube-dl](https://ytdl-org.github.io/youtube-dl/) - - _magnet_-based: where the URI resolves to a BitTorrent ressource containing a single supported video file - - _torrent_-based: where the metainfo file resolves to a BitTorrent ressource containing a single supported video file + - _magnet_-based: where the URI resolves to a BitTorrent resource containing a single supported video file + - _torrent_-based: where the metainfo file resolves to a BitTorrent resource containing a single supported video file The import function is practical when the desired video/audio is available online. It makes PeerTube download it for you, saving you as much bandwidth and avoiding any instability or limitation your network might have. @@ -1903,6 +1903,22 @@ paths: example: | **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n**Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)** + '/videos/{id}/source': + post: + summary: Get video source file metadata + operationId: getVideoSource + tags: + - Video + parameters: + - $ref: '#/components/parameters/idOrUUID' + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/VideoSource' + '/videos/{id}/views': post: summary: Notify user is watching a video @@ -1952,6 +1968,18 @@ paths: - OAuth2: [] parameters: - $ref: '#/components/parameters/idOrUUID' + - name: startDate + in: query + description: Filter stats by start date + schema: + type: string + format: date-time + - name: endDate + in: query + description: Filter stats by end date + schema: + type: string + format: date-time responses: '200': description: successful operation @@ -1996,6 +2024,18 @@ paths: enum: - 'viewers' - 'aggregateWatchTime' + - name: startDate + in: query + description: Filter stats by start date + schema: + type: string + format: date-time + - name: endDate + in: query + description: Filter stats by end date + schema: + type: string + format: date-time responses: '200': description: successful operation @@ -2029,7 +2069,7 @@ paths: x-summary: video file too large, due to quota or max body size limit set by the reverse-proxy description: | If the response has no body, it means the reverse-proxy didn't let it through. Otherwise disambiguate via `type`: - - `quota_reached` for quota limits wether daily or global + - `quota_reached` for quota limits whether daily or global headers: X-File-Maximum-Size: schema: @@ -3578,7 +3618,7 @@ paths: - $ref: '#/components/parameters/name' - name: withStats in: query - description: include view statistics for the last 30 days (only if authentified as the account user) + description: include daily view statistics for the last 30 days and total views (only if authentified as the account user) schema: type: boolean - $ref: '#/components/parameters/start' @@ -5253,7 +5293,7 @@ components: moderator: Moderator scope user: User scope schemas: - # Resuable core properties + # Reusable core properties id: type: integer minimum: 1 @@ -5419,7 +5459,7 @@ components: - 1 - 2 - 3 - description: 'The live latency mode (Default = `1`, HIght latency = `2`, Small Latency = `3`)' + description: 'The live latency mode (Default = `1`, High latency = `2`, Small Latency = `3`)' VideoStateConstant: properties: @@ -6117,6 +6157,10 @@ components: $ref: '#/components/schemas/VideoConstantString-Language' captionPath: type: string + VideoSource: + properties: + filename: + type: string ActorImage: properties: path: @@ -7730,7 +7774,7 @@ components: - 5 nullable: true description: > - Error type if an error occured during the live session: + Error type if an error occurred during the live session: - `1`: Bad socket health (transcoding is too slow) - `2`: Max duration exceeded - `3`: Quota exceeded