+ /search/video-channels:
+ get:
+ tags:
+ - Search
+ summary: Search channels
+ parameters:
+ - $ref: '#/components/parameters/start'
+ - $ref: '#/components/parameters/count'
+ - $ref: '#/components/parameters/searchTarget'
+ - $ref: '#/components/parameters/sort'
+ - 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
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/VideoChannel'
+ /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
+ 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:
+ accountName:
+ type: string
+ description: server domain to block
+ required:
+ - accountName
+ 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
+ responses:
+ '201':
+ description: successful operation
+ '404':
+ description: account block does not exist
+ '/feeds/video-comments.{format}':
+ get:
+ tags:
+ - Feeds
+ summary: List comments on videos
+ servers:
+ - url: 'https://peertube2.cpy.re'
+ description: Live Test Server (live data - latest nightly version)
+ - url: 'https://peertube3.cpy.re'
+ description: Live Test Server (live data - latest RC version)
+ - url: 'https://peertube.cpy.re'
+ description: Live Test Server (live data - stable version)
+ parameters:
+ - name: format
+ in: path
+ required: true
+ description: 'format expected (we focus on making `rss` the most featureful ; it serves 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
+ 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'
+ application/rss+xml:
+ schema:
+ $ref: '#/components/schemas/VideoCommentsForXML'
+ text/xml:
+ schema:
+ $ref: '#/components/schemas/VideoCommentsForXML'
+ application/atom+xml:
+ schema:
+ $ref: '#/components/schemas/VideoCommentsForXML'
+ application/json:
+ schema:
+ type: object
+ '406':
+ description: accept header unsupported
+ '/feeds/videos.{format}':
+ get:
+ tags:
+ - Feeds
+ summary: List videos
+ servers:
+ - url: 'https://peertube2.cpy.re'
+ description: Live Test Server (live data - latest nightly version)
+ - url: 'https://peertube3.cpy.re'
+ description: Live Test Server (live data - latest RC version)
+ - url: 'https://peertube.cpy.re'
+ description: Live Test Server (live data - stable version)
+ parameters:
+ - name: format
+ in: path
+ required: true
+ description: 'format expected (we focus on making `rss` the most featureful ; it serves 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
+ 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
+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)
+components:
+ parameters:
+ start:
+ name: start
+ in: query
+ required: false
+ description: Offset used to paginate results
+ schema:
+ type: integer
+ count:
+ name: count
+ in: query
+ required: false
+ description: "Number of items to return"
+ schema:
+ type: integer
+ maximum: 100
+ minimum: 1
+ sort:
+ name: sort
+ in: query
+ required: false
+ description: Sort column (`-createdAt` for example)
+ schema:
+ type: string
+ searchTarget:
+ name: searchTarget
+ in: query
+ required: false
+ description: >
+ If the administrator enabled search index support, you can override the default search target.
+
+
+ **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
+ It means the instance may not know the objects you fetched. If you want to load video/channel information:
+ * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
+ then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
+ After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
+ * If the current user has not the ability to make a remote URI search, then redirect the user on the origin instance or fetch
+ the data from the origin instance API
+ schema:
+ type: string
+ enum:
+ - 'local'
+ - 'search-index'
+ videosSort:
+ name: sort
+ in: query