updated REST API documentation
This commit is contained in:
parent
be0f59b4ee
commit
2963c3432f
File diff suppressed because it is too large
Load Diff
|
@ -2,24 +2,105 @@ swagger: '2.0'
|
||||||
info:
|
info:
|
||||||
title: PeerTube
|
title: PeerTube
|
||||||
version: 1.1.0-alpha.2
|
version: 1.1.0-alpha.2
|
||||||
description: Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.
|
contact:
|
||||||
host: peertube.example.com
|
name: PeerTube Community
|
||||||
|
url: 'https://joinpeertube.org'
|
||||||
|
license:
|
||||||
|
name: AGPLv3.0
|
||||||
|
url: 'https://github.com/Chocobozzz/PeerTube/blob/master/LICENSE'
|
||||||
|
x-logo:
|
||||||
|
url: 'https://joinpeertube.org/img/brand.png'
|
||||||
|
description: |
|
||||||
|
# Introduction
|
||||||
|
The PeerTube API is built on HTTP(S). Our API is RESTful. It has predictable
|
||||||
|
resource URLs. It returns HTTP response codes to indicate errors. It also
|
||||||
|
accepts and returns JSON in the HTTP body. You can use your favorite
|
||||||
|
HTTP/REST library for your programming language to use PeerTube. No official
|
||||||
|
SDK is currently provided.
|
||||||
|
|
||||||
|
# Authentication
|
||||||
|
When you sign up for an account, you are given the possibility to generate
|
||||||
|
sessions, and authenticate using this session token. One session token can
|
||||||
|
currently be used at a time.
|
||||||
securityDefinitions:
|
securityDefinitions:
|
||||||
OAuth2:
|
OAuth2:
|
||||||
description: 'In the header: *Authorization: Bearer mytoken*'
|
description: |
|
||||||
|
In the header: *Authorization: Bearer <token\>*
|
||||||
|
|
||||||
|
Authenticating via OAuth requires the following steps:
|
||||||
|
|
||||||
|
- Have an account with sufficient authorization levels
|
||||||
|
- [Generate](https://docs.joinpeertube.org/lang/en/devdocs/rest.html) a Bearer Token
|
||||||
|
- Make Authenticated Requests
|
||||||
type: oauth2
|
type: oauth2
|
||||||
flow: password
|
flow: password
|
||||||
# Not implemented yet
|
# Not implemented yet
|
||||||
# authorizationUrl: https://example.com/oauth/authorize
|
# authorizationUrl: https://example.com/oauth/authorize
|
||||||
tokenUrl: https://peertube.example.com/api/v1/users/token
|
tokenUrl: https://peertube.example.com/api/v1/users/token
|
||||||
|
scopes:
|
||||||
|
admin: Admin scope
|
||||||
|
moderator: Moderator scope
|
||||||
|
user: User scope
|
||||||
basePath: '/api/v1'
|
basePath: '/api/v1'
|
||||||
schemes:
|
schemes:
|
||||||
- https
|
- https
|
||||||
|
host: peertube.example.com
|
||||||
|
x-servers:
|
||||||
|
- url: 'https://peertube.cpy.re/api/v1'
|
||||||
|
description: Live Server
|
||||||
|
produces:
|
||||||
|
- application/json; charset=utf-8
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
tags:
|
||||||
|
- name: Accounts
|
||||||
|
description: |
|
||||||
|
Using some features of PeerTube require authentication, for which Accounts
|
||||||
|
provide different levels of permission as well as associated user information.
|
||||||
|
Accounts also encompass remote accounts discovered across the federation.
|
||||||
|
- name: Config
|
||||||
|
description: |
|
||||||
|
Each server exposes public information regarding supported videos and options.
|
||||||
|
- name: Feeds
|
||||||
|
description: |
|
||||||
|
Feeds of videos and feeds of comments allow to see updates and get them in
|
||||||
|
an aggregator or script of your choice.
|
||||||
|
- name: Job
|
||||||
|
description: |
|
||||||
|
Jobs are long-running tasks enqueued and processed by the instance itself.
|
||||||
|
No additional worker registration is currently available.
|
||||||
|
- name: ServerFollowing
|
||||||
|
description: |
|
||||||
|
Managing servers which the instance interacts with is crucial to the concept
|
||||||
|
of federation in PeerTube and external video indexation. The PeerTube server
|
||||||
|
then deals with inter-server ActivityPub operations and propagates
|
||||||
|
information across its social graph by posting activities to actors' inbox
|
||||||
|
endpoints.
|
||||||
|
- name: VideoAbuse
|
||||||
|
description: |
|
||||||
|
Video abuses deal with reports of local or remote videos alike.
|
||||||
|
- name: Video
|
||||||
|
description: |
|
||||||
|
Operations dealing with listing, uploading, fetching or modifying videos.
|
||||||
|
- name: Search
|
||||||
|
description: |
|
||||||
|
The search helps to find _videos_ from within the instance and beyond.
|
||||||
|
Videos from other instances federated by the instance (that is, instances
|
||||||
|
followed by the instance) can be found via keywords and other criteria of
|
||||||
|
the advanced search.
|
||||||
|
- name: VideoComment
|
||||||
|
description: |
|
||||||
|
Operations dealing with comments to a video. Comments are organized in threads.
|
||||||
|
- name: VideoChannel
|
||||||
|
description: |
|
||||||
|
Operations dealing with creation, modification and video listing of a user's
|
||||||
|
channels.
|
||||||
paths:
|
paths:
|
||||||
'/accounts/{name}':
|
'/accounts/{name}':
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Accounts
|
- Accounts
|
||||||
|
summary: Get the account by name
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
produces:
|
produces:
|
||||||
|
@ -38,6 +119,8 @@ paths:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Accounts
|
- Accounts
|
||||||
|
- Video
|
||||||
|
summary: Get videos for an account, provided the name of that account
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
produces:
|
produces:
|
||||||
|
@ -49,14 +132,24 @@ paths:
|
||||||
description: successful operation
|
description: successful operation
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/Video'
|
$ref: '#/definitions/Video'
|
||||||
|
x-code-samples:
|
||||||
|
- lang: JavaScript
|
||||||
|
source: |
|
||||||
|
fetch('https://peertube.cpy.re/api/v1/accounts/{name}/videos')
|
||||||
|
.then(function(response) {
|
||||||
|
return response.json()
|
||||||
|
}).then(function(data) {
|
||||||
|
console.log(data)
|
||||||
|
})
|
||||||
/accounts:
|
/accounts:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Accounts
|
- Accounts
|
||||||
|
summary: Get all accounts
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/jsonhttps://peertube.cpy.re/api/v1
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
|
@ -68,6 +161,7 @@ paths:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Config
|
- Config
|
||||||
|
summary: Get the configuration of the server
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
produces:
|
produces:
|
||||||
|
@ -79,6 +173,7 @@ paths:
|
||||||
$ref: '#/definitions/ServerConfig'
|
$ref: '#/definitions/ServerConfig'
|
||||||
/feeds/videos.{format}:
|
/feeds/videos.{format}:
|
||||||
get:
|
get:
|
||||||
|
summary: Get the feed of videos for the server, with optional filter by account name or id
|
||||||
tags:
|
tags:
|
||||||
- Feeds
|
- Feeds
|
||||||
produces:
|
produces:
|
||||||
|
@ -108,8 +203,9 @@ paths:
|
||||||
description: successful operation
|
description: successful operation
|
||||||
/jobs:
|
/jobs:
|
||||||
get:
|
get:
|
||||||
|
summary: Get list of jobs
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ admin ]
|
||||||
tags:
|
tags:
|
||||||
- Job
|
- Job
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -135,9 +231,10 @@ paths:
|
||||||
'/server/following/{host}':
|
'/server/following/{host}':
|
||||||
delete:
|
delete:
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ admin ]
|
||||||
tags:
|
tags:
|
||||||
- ServerFollowing
|
- ServerFollowing
|
||||||
|
summary: Unfollow a server by hostname
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
produces:
|
produces:
|
||||||
|
@ -155,6 +252,7 @@ paths:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- ServerFollowing
|
- ServerFollowing
|
||||||
|
summary: Get followers of the server
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
produces:
|
produces:
|
||||||
|
@ -174,6 +272,7 @@ paths:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- ServerFollowing
|
- ServerFollowing
|
||||||
|
summary: Get servers followed by the server
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
produces:
|
produces:
|
||||||
|
@ -191,9 +290,10 @@ paths:
|
||||||
$ref: '#/definitions/Follow'
|
$ref: '#/definitions/Follow'
|
||||||
post:
|
post:
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ admin ]
|
||||||
tags:
|
tags:
|
||||||
- ServerFollowing
|
- ServerFollowing
|
||||||
|
summary: Follow a server
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
produces:
|
produces:
|
||||||
|
@ -208,8 +308,9 @@ paths:
|
||||||
$ref: "commons.yaml#/responses/emptySuccess"
|
$ref: "commons.yaml#/responses/emptySuccess"
|
||||||
/users:
|
/users:
|
||||||
post:
|
post:
|
||||||
|
summary: Creates user
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ admin ]
|
||||||
tags:
|
tags:
|
||||||
- User
|
- User
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -229,6 +330,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/AddUserResponse'
|
$ref: '#/definitions/AddUserResponse'
|
||||||
get:
|
get:
|
||||||
|
summary: Get a list of users
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ ]
|
||||||
tags:
|
tags:
|
||||||
|
@ -250,8 +352,9 @@ paths:
|
||||||
$ref: '#/definitions/User'
|
$ref: '#/definitions/User'
|
||||||
'/users/{id}':
|
'/users/{id}':
|
||||||
delete:
|
delete:
|
||||||
|
summary: Delete a user by its id
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ admin ]
|
||||||
tags:
|
tags:
|
||||||
- User
|
- User
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -264,6 +367,7 @@ paths:
|
||||||
'204':
|
'204':
|
||||||
$ref: "commons.yaml#/responses/emptySuccess"
|
$ref: "commons.yaml#/responses/emptySuccess"
|
||||||
get:
|
get:
|
||||||
|
summary: Get user by its id
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ ]
|
||||||
tags:
|
tags:
|
||||||
|
@ -280,6 +384,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/User'
|
$ref: '#/definitions/User'
|
||||||
put:
|
put:
|
||||||
|
summary: Update user profile by its id
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ ]
|
||||||
tags:
|
tags:
|
||||||
|
@ -300,6 +405,7 @@ paths:
|
||||||
$ref: "commons.yaml#/responses/emptySuccess"
|
$ref: "commons.yaml#/responses/emptySuccess"
|
||||||
/users/me:
|
/users/me:
|
||||||
get:
|
get:
|
||||||
|
summary: Get current user information
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ ]
|
||||||
tags:
|
tags:
|
||||||
|
@ -316,6 +422,7 @@ paths:
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/User'
|
$ref: '#/definitions/User'
|
||||||
put:
|
put:
|
||||||
|
summary: Update current user information
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ ]
|
||||||
tags:
|
tags:
|
||||||
|
@ -335,6 +442,7 @@ paths:
|
||||||
$ref: "commons.yaml#/responses/emptySuccess"
|
$ref: "commons.yaml#/responses/emptySuccess"
|
||||||
/users/me/video-quota-used:
|
/users/me/video-quota-used:
|
||||||
get:
|
get:
|
||||||
|
summary: Get current user used quota
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ ]
|
||||||
tags:
|
tags:
|
||||||
|
@ -351,6 +459,7 @@ paths:
|
||||||
type: number
|
type: number
|
||||||
'/users/me/videos/{videoId}/rating':
|
'/users/me/videos/{videoId}/rating':
|
||||||
get:
|
get:
|
||||||
|
summary: Get rating of video by its id, among those of the current user
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ ]
|
||||||
tags:
|
tags:
|
||||||
|
@ -372,6 +481,7 @@ paths:
|
||||||
$ref: '#/definitions/GetMeVideoRating'
|
$ref: '#/definitions/GetMeVideoRating'
|
||||||
/users/me/videos:
|
/users/me/videos:
|
||||||
get:
|
get:
|
||||||
|
summary: Get videos of the current user
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ ]
|
||||||
tags:
|
tags:
|
||||||
|
@ -393,6 +503,7 @@ paths:
|
||||||
$ref: '#/definitions/Video'
|
$ref: '#/definitions/Video'
|
||||||
/users/register:
|
/users/register:
|
||||||
post:
|
post:
|
||||||
|
summary: Register a user
|
||||||
tags:
|
tags:
|
||||||
- User
|
- User
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -410,6 +521,7 @@ paths:
|
||||||
$ref: "commons.yaml#/responses/emptySuccess"
|
$ref: "commons.yaml#/responses/emptySuccess"
|
||||||
/users/me/avatar/pick:
|
/users/me/avatar/pick:
|
||||||
post:
|
post:
|
||||||
|
summary: Update current user avatar
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ ]
|
||||||
tags:
|
tags:
|
||||||
|
@ -430,6 +542,7 @@ paths:
|
||||||
$ref: '#/definitions/Avatar'
|
$ref: '#/definitions/Avatar'
|
||||||
/videos:
|
/videos:
|
||||||
get:
|
get:
|
||||||
|
summary: Get list of videos
|
||||||
tags:
|
tags:
|
||||||
- Video
|
- Video
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -454,6 +567,7 @@ paths:
|
||||||
$ref: '#/definitions/Video'
|
$ref: '#/definitions/Video'
|
||||||
/videos/categories:
|
/videos/categories:
|
||||||
get:
|
get:
|
||||||
|
summary: Get list of video licences known by the server
|
||||||
tags:
|
tags:
|
||||||
- Video
|
- Video
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -469,6 +583,7 @@ paths:
|
||||||
type: string
|
type: string
|
||||||
/videos/licences:
|
/videos/licences:
|
||||||
get:
|
get:
|
||||||
|
summary: Get list of video licences known by the server
|
||||||
tags:
|
tags:
|
||||||
- Video
|
- Video
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -484,6 +599,7 @@ paths:
|
||||||
type: string
|
type: string
|
||||||
/videos/languages:
|
/videos/languages:
|
||||||
get:
|
get:
|
||||||
|
summary: Get list of languages known by the server
|
||||||
tags:
|
tags:
|
||||||
- Video
|
- Video
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -499,6 +615,7 @@ paths:
|
||||||
type: string
|
type: string
|
||||||
/videos/privacies:
|
/videos/privacies:
|
||||||
get:
|
get:
|
||||||
|
summary: Get list of privacy policies supported by the server
|
||||||
tags:
|
tags:
|
||||||
- Video
|
- Video
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -514,6 +631,7 @@ paths:
|
||||||
type: string
|
type: string
|
||||||
"/videos/{id}":
|
"/videos/{id}":
|
||||||
put:
|
put:
|
||||||
|
summary: Update metadata for a video by its id
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ ]
|
||||||
tags:
|
tags:
|
||||||
|
@ -544,6 +662,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/Video'
|
$ref: '#/definitions/Video'
|
||||||
get:
|
get:
|
||||||
|
summary: Get a video by its id
|
||||||
tags:
|
tags:
|
||||||
- Video
|
- Video
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -558,6 +677,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/Video'
|
$ref: '#/definitions/Video'
|
||||||
delete:
|
delete:
|
||||||
|
summary: Delete a video by its id
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ ]
|
||||||
tags:
|
tags:
|
||||||
|
@ -573,6 +693,7 @@ paths:
|
||||||
$ref: "commons.yaml#/responses/emptySuccess"
|
$ref: "commons.yaml#/responses/emptySuccess"
|
||||||
"/videos/{id}/description":
|
"/videos/{id}/description":
|
||||||
get:
|
get:
|
||||||
|
summary: Get a video description by its id
|
||||||
tags:
|
tags:
|
||||||
- Video
|
- Video
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -588,6 +709,7 @@ paths:
|
||||||
type: string
|
type: string
|
||||||
"/videos/{id}/views":
|
"/videos/{id}/views":
|
||||||
post:
|
post:
|
||||||
|
summary: Add a view to the video by its id
|
||||||
tags:
|
tags:
|
||||||
- Video
|
- Video
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -601,6 +723,7 @@ paths:
|
||||||
$ref: "commons.yaml#/responses/emptySuccess"
|
$ref: "commons.yaml#/responses/emptySuccess"
|
||||||
/videos/upload:
|
/videos/upload:
|
||||||
post:
|
post:
|
||||||
|
summary: Upload a video file with its metadata
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ ]
|
||||||
tags:
|
tags:
|
||||||
|
@ -641,6 +764,7 @@ paths:
|
||||||
$ref: '#/definitions/VideoUploadResponse'
|
$ref: '#/definitions/VideoUploadResponse'
|
||||||
/videos/abuse:
|
/videos/abuse:
|
||||||
get:
|
get:
|
||||||
|
summary: Get list of reported video abuses
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ ]
|
||||||
tags:
|
tags:
|
||||||
|
@ -662,6 +786,7 @@ paths:
|
||||||
$ref: '#/definitions/VideoAbuse'
|
$ref: '#/definitions/VideoAbuse'
|
||||||
"/videos/{id}/abuse":
|
"/videos/{id}/abuse":
|
||||||
post:
|
post:
|
||||||
|
summary: Report an abuse, on a video by its id
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ ]
|
||||||
tags:
|
tags:
|
||||||
|
@ -677,8 +802,9 @@ paths:
|
||||||
$ref: "commons.yaml#/responses/emptySuccess"
|
$ref: "commons.yaml#/responses/emptySuccess"
|
||||||
"/videos/{id}/blacklist":
|
"/videos/{id}/blacklist":
|
||||||
post:
|
post:
|
||||||
|
summary: Put on blacklist a video by its id
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ admin, moderator ]
|
||||||
tags:
|
tags:
|
||||||
- VideoBlacklist
|
- VideoBlacklist
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -691,8 +817,9 @@ paths:
|
||||||
'204':
|
'204':
|
||||||
$ref: "commons.yaml#/responses/emptySuccess"
|
$ref: "commons.yaml#/responses/emptySuccess"
|
||||||
delete:
|
delete:
|
||||||
|
summary: Delete an entry of the blacklist of a video by its id
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ admin, moderator ]
|
||||||
tags:
|
tags:
|
||||||
- VideoBlacklist
|
- VideoBlacklist
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -706,8 +833,9 @@ paths:
|
||||||
$ref: "commons.yaml#/responses/emptySuccess"
|
$ref: "commons.yaml#/responses/emptySuccess"
|
||||||
/videos/blacklist:
|
/videos/blacklist:
|
||||||
get:
|
get:
|
||||||
|
summary: Get list of videos on blacklist
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ admin, moderator ]
|
||||||
tags:
|
tags:
|
||||||
- VideoBlacklist
|
- VideoBlacklist
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -727,6 +855,7 @@ paths:
|
||||||
$ref: '#/definitions/VideoBlacklist'
|
$ref: '#/definitions/VideoBlacklist'
|
||||||
/video-channels:
|
/video-channels:
|
||||||
get:
|
get:
|
||||||
|
summary: Get list of video channels
|
||||||
tags:
|
tags:
|
||||||
- VideoChannel
|
- VideoChannel
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -745,6 +874,7 @@ paths:
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/VideoChannel'
|
$ref: '#/definitions/VideoChannel'
|
||||||
post:
|
post:
|
||||||
|
summary: Creates a video channel for the current user
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ ]
|
||||||
tags:
|
tags:
|
||||||
|
@ -763,6 +893,7 @@ paths:
|
||||||
$ref: "commons.yaml#/responses/emptySuccess"
|
$ref: "commons.yaml#/responses/emptySuccess"
|
||||||
"/video-channels/{id}":
|
"/video-channels/{id}":
|
||||||
get:
|
get:
|
||||||
|
summary: Get a video channel by its id
|
||||||
tags:
|
tags:
|
||||||
- VideoChannel
|
- VideoChannel
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -777,6 +908,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/VideoChannel'
|
$ref: '#/definitions/VideoChannel'
|
||||||
put:
|
put:
|
||||||
|
summary: Update a video channel by its id
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ ]
|
||||||
tags:
|
tags:
|
||||||
|
@ -795,6 +927,7 @@ paths:
|
||||||
'204':
|
'204':
|
||||||
$ref: "commons.yaml#/responses/emptySuccess"
|
$ref: "commons.yaml#/responses/emptySuccess"
|
||||||
delete:
|
delete:
|
||||||
|
summary: Delete a video channel by its id
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ ]
|
||||||
tags:
|
tags:
|
||||||
|
@ -810,6 +943,7 @@ paths:
|
||||||
$ref: "commons.yaml#/responses/emptySuccess"
|
$ref: "commons.yaml#/responses/emptySuccess"
|
||||||
"/video-channels/{id}/videos":
|
"/video-channels/{id}/videos":
|
||||||
get:
|
get:
|
||||||
|
summary: Get videos of a video channel by its id
|
||||||
tags:
|
tags:
|
||||||
- VideoChannel
|
- VideoChannel
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -825,6 +959,7 @@ paths:
|
||||||
$ref: '#/definitions/Video'
|
$ref: '#/definitions/Video'
|
||||||
/accounts/{name}/video-channels:
|
/accounts/{name}/video-channels:
|
||||||
get:
|
get:
|
||||||
|
summary: Get video channels of an account by its name
|
||||||
tags:
|
tags:
|
||||||
- VideoChannel
|
- VideoChannel
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -842,6 +977,7 @@ paths:
|
||||||
$ref: '#/definitions/VideoChannel'
|
$ref: '#/definitions/VideoChannel'
|
||||||
"/videos/{id}/comment-threads":
|
"/videos/{id}/comment-threads":
|
||||||
get:
|
get:
|
||||||
|
summary: Get the comment threads of a video by its id
|
||||||
tags:
|
tags:
|
||||||
- VideoComment
|
- VideoComment
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -859,6 +995,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/CommentThreadResponse'
|
$ref: '#/definitions/CommentThreadResponse'
|
||||||
post:
|
post:
|
||||||
|
summary: Creates a comment thread, on a video by its id
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ ]
|
||||||
tags:
|
tags:
|
||||||
|
@ -876,6 +1013,7 @@ paths:
|
||||||
$ref: '#/definitions/CommentThreadPostResponse'
|
$ref: '#/definitions/CommentThreadPostResponse'
|
||||||
"/videos/{id}/comment-threads/{threadId}":
|
"/videos/{id}/comment-threads/{threadId}":
|
||||||
get:
|
get:
|
||||||
|
summary: Get the comment thread by its id, of a video by its id
|
||||||
tags:
|
tags:
|
||||||
- VideoComment
|
- VideoComment
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -892,6 +1030,7 @@ paths:
|
||||||
$ref: '#/definitions/VideoCommentThreadTree'
|
$ref: '#/definitions/VideoCommentThreadTree'
|
||||||
"/videos/{id}/comments/{commentId}":
|
"/videos/{id}/comments/{commentId}":
|
||||||
post:
|
post:
|
||||||
|
summary: Creates a comment in a comment thread by its id, of a video by its id
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ ]
|
||||||
tags:
|
tags:
|
||||||
|
@ -909,6 +1048,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/CommentThreadPostResponse'
|
$ref: '#/definitions/CommentThreadPostResponse'
|
||||||
delete:
|
delete:
|
||||||
|
summary: Delete a comment in a comment therad by its id, of a video by its id
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ ]
|
||||||
tags:
|
tags:
|
||||||
|
@ -925,6 +1065,7 @@ paths:
|
||||||
$ref: "commons.yaml#/responses/emptySuccess"
|
$ref: "commons.yaml#/responses/emptySuccess"
|
||||||
"/videos/{id}/rate":
|
"/videos/{id}/rate":
|
||||||
put:
|
put:
|
||||||
|
summary: Vote for a video by its id
|
||||||
security:
|
security:
|
||||||
- OAuth2: [ ]
|
- OAuth2: [ ]
|
||||||
tags:
|
tags:
|
||||||
|
@ -942,6 +1083,7 @@ paths:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Search
|
- Search
|
||||||
|
summary: Get the videos corresponding to a given query
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
produces:
|
produces:
|
||||||
|
|
Loading…
Reference in New Issue