+ type: string
+ examples:
+ nightly:
+ externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies
+
+ /video-playlists:
+ get:
+ summary: List video playlists
+ tags:
+ - Video Playlists
+ parameters:
+ - $ref: '#/components/parameters/start'
+ - $ref: '#/components/parameters/count'
+ - $ref: '#/components/parameters/sort'
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ total:
+ type: integer
+ example: 1
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/VideoPlaylist'
+ post:
+ summary: Create a video playlist
+ description: 'If the video playlist is set as public, the videoChannelId is mandatory.'
+ security:
+ - OAuth2: []
+ tags:
+ - Video Playlists
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ videoPlaylist:
+ type: object
+ properties:
+ id:
+ type: integer
+ uuid:
+ $ref: '#/components/schemas/UUIDv4'
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ type: object
+ properties:
+ displayName:
+ description: Video playlist display name
+ type: string
+ minLength: 1
+ maxLength: 120
+ thumbnailfile:
+ description: Video playlist thumbnail file
+ type: string
+ format: binary
+ privacy:
+ $ref: '#/components/schemas/VideoPlaylistPrivacySet'
+ description:
+ description: Video playlist description
+ type: string
+ videoChannelId:
+ description: Video channel in which the playlist will be published
+ type: integer
+ required:
+ - displayName
+ encoding:
+ thumbnailfile:
+ contentType: image/jpeg
+
+ /video-playlists/{id}:
+ get:
+ summary: Get a video playlist
+ tags:
+ - Video Playlists
+ parameters:
+ - $ref: '#/components/parameters/idOrUUID'
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/VideoPlaylist'
+ put:
+ summary: Update a video playlist
+ description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
+ security:
+ - OAuth2: []
+ tags:
+ - Video Playlists
+ responses:
+ '204':
+ description: successful operation
+ parameters:
+ - $ref: '#/components/parameters/idOrUUID'
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ type: object
+ properties:
+ displayName:
+ description: Video playlist display name
+ type: string
+ minLength: 1
+ maxLength: 120
+ thumbnailfile:
+ description: Video playlist thumbnail file
+ type: string
+ format: binary
+ privacy:
+ $ref: '#/components/schemas/VideoPlaylistPrivacySet'
+ description:
+ description: Video playlist description
+ type: string
+ videoChannelId:
+ description: Video channel in which the playlist will be published
+ type: integer
+ encoding:
+ thumbnailfile:
+ contentType: image/jpeg
+ delete:
+ summary: Delete a video playlist
+ security:
+ - OAuth2: []
+ tags:
+ - Video Playlists
+ parameters:
+ - $ref: '#/components/parameters/idOrUUID'
+ responses:
+ '204':
+ description: successful operation
+
+ /video-playlists/{id}/videos:
+ get:
+ summary: 'List videos of a playlist'
+ tags:
+ - Videos
+ - Video Playlists
+ parameters:
+ - $ref: '#/components/parameters/idOrUUID'
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/VideoListResponse'
+ post:
+ summary: 'Add a video in a playlist'
+ security:
+ - OAuth2: []
+ tags:
+ - Videos
+ - Video Playlists
+ parameters:
+ - $ref: '#/components/parameters/idOrUUID'
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ videoPlaylistElement:
+ type: object
+ properties:
+ id:
+ type: integer
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ videoId:
+ type: integer
+ description: 'Video to add in the playlist'
+ startTimestamp:
+ type: integer
+ description: 'Start the video at this specific timestamp (in seconds)'
+ stopTimestamp:
+ type: integer
+ description: 'Stop the video at this specific timestamp (in seconds)'
+ required:
+ - videoId
+
+ /video-playlists/{id}/videos/reorder:
+ post:
+ summary: 'Reorder a playlist'
+ security:
+ - OAuth2: []
+ tags:
+ - Video Playlists
+ parameters:
+ - $ref: '#/components/parameters/idOrUUID'
+ responses:
+ '204':
+ description: successful operation
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ startPosition:
+ type: integer
+ description: 'Start position of the element to reorder'
+ minimum: 1
+ insertAfterPosition:
+ type: integer
+ description: 'New position for the block to reorder, to add the block before the first element'
+ minimum: 0
+ reorderLength:
+ type: integer
+ description: 'How many element from `startPosition` to reorder'
+ minimum: 1
+ required:
+ - startPosition
+ - insertAfterPosition
+
+ /video-playlists/{id}/videos/{playlistElementId}:
+ put:
+ summary: 'Update a playlist element'
+ security:
+ - OAuth2: []
+ tags:
+ - Video Playlists
+ parameters:
+ - $ref: '#/components/parameters/idOrUUID'
+ - $ref: '#/components/parameters/playlistElementId'
+ responses:
+ '204':
+ description: successful operation
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ startTimestamp:
+ type: integer
+ description: 'Start the video at this specific timestamp (in seconds)'
+ stopTimestamp:
+ type: integer
+ description: 'Stop the video at this specific timestamp (in seconds)'
+ delete:
+ summary: 'Delete an element from a playlist'
+ security:
+ - OAuth2: []
+ tags:
+ - Video Playlists
+ parameters:
+ - $ref: '#/components/parameters/idOrUUID'
+ - $ref: '#/components/parameters/playlistElementId'
+ responses:
+ '204':
+ description: successful operation
+
+ '/users/me/video-playlists/videos-exist':
+ get:
+ summary: 'Check video exists in my playlists'
+ security:
+ - OAuth2: []
+ tags:
+ - Video Playlists
+ parameters:
+ - name: videoIds
+ in: query
+ required: true
+ description: The video ids to check
+ schema:
+ type: array
+ items:
+ type: integer
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ videoId:
+ type: array
+ items:
+ type: object
+ properties:
+ playlistElementId:
+ type: integer
+ playlistId:
+ type: integer
+ startTimestamp:
+ type: integer
+ stopTimestamp:
+ type: integer
+
+ '/accounts/{name}/video-channels':
+ get:
+ summary: List video channels of an account
+ tags:
+ - Video Channels
+ - Accounts
+ parameters:
+ - $ref: '#/components/parameters/name'
+ - name: withStats
+ in: query
+ description: include view statistics for the last 30 days (only if authentified as the account user)
+ schema:
+ type: boolean
+ - $ref: '#/components/parameters/start'
+ - $ref: '#/components/parameters/count'
+ - $ref: '#/components/parameters/sort'
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ properties:
+ total:
+ type: integer
+ example: 1
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/VideoChannel'
+ '/accounts/{name}/ratings':
+ get:
+ summary: List ratings of an account
+ security:
+ - OAuth2: []
+ tags:
+ - Accounts
+ parameters:
+ - $ref: '#/components/parameters/name'
+ - $ref: '#/components/parameters/start'
+ - $ref: '#/components/parameters/count'
+ - $ref: '#/components/parameters/sort'
+ - name: rating
+ in: query
+ required: false
+ description: Optionally filter which ratings to retrieve
+ schema:
+ type: string
+ enum:
+ - like
+ - dislike
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/VideoRating'
+ '/videos/{id}/comment-threads':
+ get:
+ summary: List threads of a video
+ tags:
+ - Video Comments
+ parameters:
+ - $ref: '#/components/parameters/idOrUUID'
+ - $ref: '#/components/parameters/start'
+ - $ref: '#/components/parameters/count'
+ - $ref: '#/components/parameters/commentsSort'
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CommentThreadResponse'
+ post:
+ summary: Create a thread
+ security:
+ - OAuth2: []
+ tags:
+ - Video Comments
+ parameters:
+ - $ref: '#/components/parameters/idOrUUID'
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CommentThreadPostResponse'
+ '404':
+ description: video does not exist
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ text:
+ type: string
+ description: 'Text comment'
+ required:
+ - text
+
+ '/videos/{id}/comment-threads/{threadId}':
+ get:
+ summary: Get a thread
+ tags:
+ - Video Comments
+ parameters:
+ - $ref: '#/components/parameters/idOrUUID'
+ - $ref: '#/components/parameters/threadId'
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/VideoCommentThreadTree'
+ '/videos/{id}/comments/{commentId}':
+ post:
+ summary: Reply to a thread of a video
+ security:
+ - OAuth2: []
+ tags:
+ - Video Comments
+ parameters:
+ - $ref: '#/components/parameters/idOrUUID'
+ - $ref: '#/components/parameters/commentId'
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CommentThreadPostResponse'
+ '404':
+ description: thread or video does not exist
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ text:
+ type: string
+ description: 'Text comment'
+ required:
+ - text
+
+ delete:
+ summary: Delete a comment or a reply
+ security:
+ - OAuth2: []
+ tags:
+ - Video Comments
+ parameters:
+ - $ref: '#/components/parameters/idOrUUID'
+ - $ref: '#/components/parameters/commentId'
+ responses:
+ '204':
+ description: successful operation
+ '403':
+ description: cannot remove comment of another user
+ '404':
+ description: comment or video does not exist
+ '409':
+ description: comment is already deleted
+ '/videos/{id}/rate':
+ put:
+ summary: Like/dislike a video
+ security:
+ - OAuth2: []
+ tags:
+ - Video Rates
+ parameters:
+ - $ref: '#/components/parameters/idOrUUID'
+ responses:
+ '204':
+ description: successful operation
+ '404':
+ description: video does not exist
+ /search/videos:
+ get:
+ tags:
+ - Search
+ summary: Search videos
+ parameters:
+ - name: search
+ in: query
+ required: true
+ allowEmptyValue: false
+ description: >
+ String to search. If the user can make a remote URI search, and the string is an URI then the
+ PeerTube instance will fetch the remote object and add it to its database. Then,
+ you can use the REST API to fetch the complete video information and interact with it.
+ schema:
+ type: string
+ - $ref: '#/components/parameters/categoryOneOf'
+ - $ref: '#/components/parameters/isLive'
+ - $ref: '#/components/parameters/tagsOneOf'
+ - $ref: '#/components/parameters/tagsAllOf'
+ - $ref: '#/components/parameters/licenceOneOf'
+ - $ref: '#/components/parameters/languageOneOf'
+ - $ref: '#/components/parameters/nsfw'
+ - $ref: '#/components/parameters/filter'
+ - $ref: '#/components/parameters/skipCount'
+ - $ref: '#/components/parameters/start'
+ - $ref: '#/components/parameters/count'
+ - $ref: '#/components/parameters/searchTarget'
+ - $ref: '#/components/parameters/videosSearchSort'
+ - name: startDate
+ in: query
+ description: Get videos that are published after this date
+ schema:
+ type: string
+ format: date-time
+ - name: endDate
+ in: query
+ description: Get videos that are published before this date
+ schema:
+ type: string
+ format: date-time
+ - name: originallyPublishedStartDate
+ in: query
+ description: Get videos that are originally published after this date
+ schema:
+ type: string
+ format: date-time
+ - name: originallyPublishedEndDate
+ in: query
+ description: Get videos that are originally published before this date
+ schema:
+ type: string
+ format: date-time
+ - name: durationMin
+ in: query
+ description: Get videos that have this minimum duration
+ schema:
+ type: integer
+ - name: durationMax
+ in: query
+ description: Get videos that have this maximum duration
+ schema:
+ type: integer
+ callbacks:
+ 'searchTarget === search-index':
+ $ref: '#/components/callbacks/searchIndex'
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/VideoListResponse'
+ '500':
+ description: search index unavailable
+ /search/video-channels:
+ get:
+ tags:
+ - Search
+ summary: Search channels
+ parameters:
+ - name: search
+ in: query
+ required: true
+ description: >
+ String to search. If the user can make a remote URI search, and the string is an URI then the
+ PeerTube instance will fetch the remote object and add it to its database. Then,
+ you can use the REST API to fetch the complete channel information and interact with it.
+ schema:
+ type: string
+ - $ref: '#/components/parameters/start'
+ - $ref: '#/components/parameters/count'
+ - $ref: '#/components/parameters/searchTarget'
+ - $ref: '#/components/parameters/sort'
+ callbacks:
+ 'searchTarget === search-index':
+ $ref: '#/components/callbacks/searchIndex'
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/VideoChannel'
+ '500':
+ description: search index unavailable
+ /blocklist/accounts:
+ get:
+ tags:
+ - Account Blocks
+ summary: List account blocks
+ security:
+ - OAuth2:
+ - admin
+ parameters:
+ - $ref: '#/components/parameters/start'
+ - $ref: '#/components/parameters/count'
+ - $ref: '#/components/parameters/sort'
+ responses:
+ '200':
+ description: successful operation
+ post:
+ tags:
+ - Account Blocks
+ summary: Block an account
+ security:
+ - OAuth2:
+ - admin
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ accountName:
+ type: string
+ example: chocobozzz@example.org
+ description: account to block, in the form `username@domain`
+ required:
+ - accountName
+ responses:
+ '200':
+ description: successful operation
+ '409':
+ description: self-blocking forbidden
+ '/blocklist/accounts/{accountName}':
+ delete:
+ tags:
+ - Account Blocks
+ summary: Unblock an account by its handle
+ security:
+ - OAuth2:
+ - admin
+ parameters:
+ - name: accountName
+ in: path
+ required: true
+ description: account to unblock, in the form `username@domain`
+ schema:
+ type: string
+ responses:
+ '201':
+ description: successful operation
+ '404':
+ description: account or account block does not exist
+ /blocklist/servers:
+ get:
+ tags:
+ - Server Blocks
+ summary: List server blocks
+ security:
+ - OAuth2:
+ - admin
+ parameters:
+ - $ref: '#/components/parameters/start'
+ - $ref: '#/components/parameters/count'
+ - $ref: '#/components/parameters/sort'
+ responses:
+ '200':
+ description: successful operation
+ post:
+ tags:
+ - Server Blocks
+ summary: Block a server
+ security:
+ - OAuth2:
+ - admin
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ host:
+ type: string
+ format: hostname
+ description: server domain to block
+ required:
+ - host
+ responses:
+ '200':
+ description: successful operation
+ '409':
+ description: self-blocking forbidden
+ '/blocklist/servers/{host}':
+ delete:
+ tags:
+ - Server Blocks
+ summary: Unblock a server by its domain
+ security:
+ - OAuth2:
+ - admin
+ parameters:
+ - name: host
+ in: path
+ required: true
+ description: server domain to unblock
+ schema:
+ type: string
+ format: hostname
+ responses:
+ '201':
+ description: successful operation
+ '404':
+ 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
+ format: hostname
+ 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: integer
+ 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}':
+ get:
+ tags:
+ - Feeds
+ summary: List comments on videos
+ parameters:
+ - name: format
+ in: path
+ required: true
+ description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
+ schema:
+ type: string
+ enum:
+ - xml
+ - rss
+ - rss2
+ - atom
+ - atom1
+ - json
+ - json1
+ - name: videoId
+ in: query
+ description: 'limit listing to a specific video'
+ schema:
+ type: string
+ - name: accountId
+ in: query
+ description: 'limit listing to a specific account'
+ schema:
+ type: string
+ - name: accountName
+ in: query
+ description: 'limit listing to a specific account'
+ schema:
+ type: string
+ - name: videoChannelId
+ in: query
+ description: 'limit listing to a specific video channel'
+ schema:
+ type: string
+ - name: videoChannelName
+ in: query
+ description: 'limit listing to a specific video channel'
+ schema:
+ type: string
+ responses:
+ '204':
+ description: successful operation
+ headers:
+ Cache-Control:
+ schema:
+ type: string
+ default: 'max-age=900' # 15 min cache
+ content:
+ application/xml:
+ schema:
+ $ref: '#/components/schemas/VideoCommentsForXML'
+ examples:
+ nightly:
+ externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
+ application/rss+xml:
+ schema:
+ $ref: '#/components/schemas/VideoCommentsForXML'
+ examples:
+ nightly:
+ externalValue: https://peertube2.cpy.re/feeds/video-comments.rss?filter=local
+ text/xml:
+ schema:
+ $ref: '#/components/schemas/VideoCommentsForXML'
+ examples:
+ nightly:
+ externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
+ application/atom+xml:
+ schema:
+ $ref: '#/components/schemas/VideoCommentsForXML'
+ examples:
+ nightly:
+ externalValue: https://peertube2.cpy.re/feeds/video-comments.atom?filter=local
+ application/json:
+ schema:
+ type: object
+ examples:
+ nightly:
+ externalValue: https://peertube2.cpy.re/feeds/video-comments.json?filter=local
+ '400':
+ x-summary: field inconsistencies
+ description: >
+ Arises when:
+ - videoId filter is mixed with a channel filter
+ '404':
+ description: video, video channel or account not found
+ '406':
+ description: accept header unsupported
+ '/feeds/videos.{format}':
+ get:
+ tags:
+ - Feeds
+ summary: List videos
+ parameters:
+ - name: format
+ in: path
+ required: true
+ description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
+ schema:
+ type: string
+ enum:
+ - xml
+ - rss
+ - rss2
+ - atom
+ - atom1
+ - json
+ - json1
+ - name: accountId
+ in: query
+ description: 'limit listing to a specific account'
+ schema:
+ type: string
+ - name: accountName
+ in: query
+ description: 'limit listing to a specific account'
+ schema:
+ type: string
+ - name: videoChannelId
+ in: query
+ description: 'limit listing to a specific video channel'
+ schema:
+ type: string
+ - name: videoChannelName
+ in: query
+ description: 'limit listing to a specific video channel'
+ schema:
+ type: string
+ - $ref: '#/components/parameters/sort'
+ - $ref: '#/components/parameters/nsfw'
+ - $ref: '#/components/parameters/filter'
+ responses:
+ '204':
+ description: successful operation
+ headers:
+ Cache-Control:
+ schema:
+ type: string
+ default: 'max-age=900' # 15 min cache
+ content:
+ application/xml:
+ schema:
+ $ref: '#/components/schemas/VideosForXML'
+ examples:
+ nightly:
+ externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
+ application/rss+xml:
+ schema:
+ $ref: '#/components/schemas/VideosForXML'
+ examples:
+ nightly:
+ externalValue: https://peertube2.cpy.re/feeds/videos.rss?filter=local
+ text/xml:
+ schema:
+ $ref: '#/components/schemas/VideosForXML'
+ examples:
+ nightly:
+ externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
+ application/atom+xml:
+ schema:
+ $ref: '#/components/schemas/VideosForXML'
+ examples:
+ nightly:
+ externalValue: https://peertube2.cpy.re/feeds/videos.atom?filter=local
+ application/json:
+ schema:
+ type: object
+ examples:
+ nightly:
+ externalValue: https://peertube2.cpy.re/feeds/videos.json?filter=local
+ '404':
+ description: video channel or account not found
+ '406':
+ description: accept header unsupported
+ '/feeds/subscriptions.{format}':
+ get:
+ tags:
+ - Feeds
+ - Account
+ summary: List videos of subscriptions tied to a token
+ parameters:
+ - name: format
+ in: path
+ required: true
+ description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
+ schema:
+ type: string
+ enum:
+ - xml
+ - rss
+ - rss2
+ - atom
+ - atom1
+ - json
+ - json1
+ - name: accountId
+ in: query
+ description: limit listing to a specific account
+ schema:
+ type: string
+ required: true
+ - name: token
+ in: query
+ description: private token allowing access
+ schema:
+ type: string
+ required: true
+ - $ref: '#/components/parameters/sort'
+ - $ref: '#/components/parameters/nsfw'
+ - $ref: '#/components/parameters/filter'
+ responses:
+ '204':
+ description: successful operation
+ headers:
+ Cache-Control:
+ schema:
+ type: string
+ default: 'max-age=900' # 15 min cache
+ content:
+ application/xml:
+ schema:
+ $ref: '#/components/schemas/VideosForXML'
+ application/rss+xml:
+ schema:
+ $ref: '#/components/schemas/VideosForXML'
+ text/xml:
+ schema:
+ $ref: '#/components/schemas/VideosForXML'
+ application/atom+xml:
+ schema:
+ $ref: '#/components/schemas/VideosForXML'
+ application/json:
+ schema:
+ type: object
+ '406':
+ description: accept header unsupported
+ /plugins:
+ get:
+ tags:
+ - Plugins
+ summary: List plugins
+ security:
+ - OAuth2:
+ - admin
+ parameters:
+ - name: pluginType
+ in: query
+ schema:
+ type: integer
+ - name: uninstalled
+ in: query
+ schema:
+ type: boolean
+ - $ref: '#/components/parameters/start'
+ - $ref: '#/components/parameters/count'
+ - $ref: '#/components/parameters/sort'
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PluginResponse'
+ /plugins/available:
+ get:
+ tags:
+ - Plugins
+ summary: List available plugins
+ security:
+ - OAuth2:
+ - admin
+ parameters:
+ - name: search
+ in: query
+ schema:
+ type: string
+ - name: pluginType
+ in: query
+ schema:
+ type: integer
+ - name: currentPeerTubeEngine
+ in: query
+ schema:
+ type: string
+ - $ref: '#/components/parameters/start'
+ - $ref: '#/components/parameters/count'
+ - $ref: '#/components/parameters/sort'
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PluginResponse'
+ '503':
+ description: plugin index unavailable
+ /plugins/install:
+ post:
+ tags:
+ - Plugins
+ summary: Install a plugin
+ security:
+ - OAuth2:
+ - admin
+ requestBody:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - type: object
+ properties:
+ npmName:
+ type: string
+ example: peertube-plugin-auth-ldap
+ required:
+ - npmName
+ additionalProperties: false
+ - type: object
+ properties:
+ path:
+ type: string
+ required:
+ - path
+ additionalProperties: false
+ responses:
+ '204':
+ description: successful operation
+ '400':
+ description: should have either `npmName` or `path` set
+ /plugins/update:
+ post:
+ tags:
+ - Plugins
+ summary: Update a plugin
+ security:
+ - OAuth2:
+ - admin
+ requestBody:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - type: object
+ properties:
+ npmName:
+ type: string
+ example: peertube-plugin-auth-ldap
+ required:
+ - npmName
+ additionalProperties: false
+ - type: object
+ properties:
+ path:
+ type: string
+ required:
+ - path
+ additionalProperties: false
+ responses:
+ '204':
+ description: successful operation
+ '400':
+ description: should have either `npmName` or `path` set
+ '404':
+ description: existing plugin not found
+ /plugins/uninstall:
+ post:
+ tags:
+ - Plugins
+ summary: Uninstall a plugin
+ security:
+ - OAuth2:
+ - admin
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ npmName:
+ type: string
+ description: name of the plugin/theme in its package.json
+ example: peertube-plugin-auth-ldap
+ required:
+ - npmName
+ responses:
+ '204':
+ description: successful operation
+ '404':
+ description: existing plugin not found
+ /plugins/{npmName}:
+ get:
+ tags:
+ - Plugins
+ summary: Get a plugin
+ security:
+ - OAuth2:
+ - admin
+ parameters:
+ - $ref: '#/components/parameters/npmName'
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Plugin'
+ '404':
+ description: plugin not found
+ /plugins/{npmName}/settings:
+ put:
+ tags:
+ - Plugins
+ summary: Set a plugin's settings
+ security:
+ - OAuth2:
+ - admin
+ parameters:
+ - $ref: '#/components/parameters/npmName'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ settings:
+ type: object
+ additionalProperties: true
+ responses:
+ '204':
+ description: successful operation
+ '404':
+ description: plugin not found
+ /plugins/{npmName}/public-settings:
+ get:
+ tags:
+ - Plugins
+ summary: Get a plugin's public settings
+ parameters:
+ - $ref: '#/components/parameters/npmName'
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties: true
+ '404':
+ description: plugin not found
+ /plugins/{npmName}/registered-settings:
+ get:
+ tags:
+ - Plugins
+ summary: Get a plugin's registered settings
+ security:
+ - OAuth2:
+ - admin
+ parameters:
+ - $ref: '#/components/parameters/npmName'
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties: true
+ '404':
+ description: plugin not found
+servers:
+ - url: 'https://peertube2.cpy.re/api/v1'
+ description: Live Test Server (live data - latest nightly version)
+ - url: 'https://peertube3.cpy.re/api/v1'
+ description: Live Test Server (live data - latest RC version)
+ - url: 'https://peertube.cpy.re/api/v1'
+ description: Live Test Server (live data - stable version)