openapi: 3.0.0
info:
title: PeerTube
- version: 3.2.0-rc.1
+ version: 3.2.0
contact:
name: PeerTube Community
url: https://joinpeertube.org
- [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin)
See the [REST API quick start](https://docs.joinpeertube.org/api-rest-getting-started) for a few
- examples of using with the PeerTube API.
+ examples of using the PeerTube API.
# Authentication
This API features [Cross-Origin Resource Sharing (CORS)](https://fetch.spec.whatwg.org/),
allowing cross-domain communication from the browser for some routes:
-
+
| Endpoint |
|------------------------- ---|
| `/api/*` |
- name: Register
description: |
As a visitor, you can use this API to open an account (if registrations are open on
- that PeerTube instance). As an admin, you should use the dedicated [User creation
- API](#operation/createUser) instead.
+ that PeerTube instance). As an admin, you should use the dedicated [User creation
+ API](#operation/addUser) instead.
- name: Session
x-displayName: Login/Logout
description: |
Administrators can also enable the use of a remote search system, indexing
videos and channels not could be not federated by the instance.
+ - name: Homepage
+ description: Get and update the custom homepage
- name: Video Mirroring
description: |
PeerTube instances can mirror videos from one another, and help distribute some videos.
- name: Search
tags:
- Search
+ - name: Custom pages
+ tags:
+ - Homepage
- name: Moderation
tags:
- Abuses
'200':
description: successful operation
+ /custom-pages/homepage/instance:
+ get:
+ summary: Get instance custom homepage
+ tags:
+ - Homepage
+ responses:
+ '404':
+ description: No homepage set
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CustomHomepage'
+ put:
+ summary: Set instance custom homepage
+ tags:
+ - Homepage
+ security:
+ - OAuth2:
+ - admin
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ content:
+ type: string
+ description: content of the homepage, that will be injected in the client
+ responses:
+ '204':
+ description: successful operation
+
/jobs/{state}:
get:
summary: List instance jobs
/users:
post:
summary: Create a user
- operationId: createUser
+ operationId: addUser
security:
- OAuth2:
- admin
$ref: '#/components/schemas/AddUserResponse'
links:
# GET /users/{id}
- GetUserId:
- operationId: getUserId
+ GetUser:
+ operationId: getUser
parameters:
id: '$response.body#/user/id'
# PUT /users/{id}
- PutUserId:
- operationId: putUserId
+ PutUser:
+ operationId: putUser
parameters:
id: '$response.body#/user/id'
# DELETE /users/{id}
- DelUserId:
- operationId: delUserId
+ DelUser:
+ operationId: delUser
parameters:
id: '$response.body#/user/id'
'403':
- admin
tags:
- Users
- operationId: delUserId
+ operationId: delUser
responses:
'204':
description: successful operation
- OAuth2: []
tags:
- Users
- operationId: getUserId
+ operationId: getUser
parameters:
- name: withStats
in: query
- OAuth2: []
tags:
- Users
- operationId: putUserId
+ operationId: putUser
responses:
'204':
description: successful operation
operationId: verifyUser
description: |
Following a user registration, the new user will receive an email asking to click a link
- containing a secret.
+ containing a secret.
tags:
- Users
- Register
/videos:
get:
summary: List videos
+ operationId: getVideos
tags:
- Video
parameters:
/videos/live:
post:
summary: Create a live
- operationId: createLive
+ operationId: addLive
security:
- OAuth2: []
tags:
post:
summary: Create a video playlist
description: If the video playlist is set as public, `videoChannelId` is mandatory.
- operationId: createPlaylist
+ operationId: addPlaylist
security:
- OAuth2: []
tags:
/video-playlists/{playlistId}/videos:
get:
summary: 'List videos of a playlist'
+ operationId: getVideoPlaylistVideos
tags:
- Videos
- Video Playlists
$ref: '#/components/schemas/VideoListResponse'
post:
summary: Add a video in a playlist
+ operationId: addVideoPlaylistVideo
security:
- OAuth2: []
tags:
/video-playlists/{playlistId}/videos/reorder:
post:
summary: 'Reorder a playlist'
+ operationId: reorderVideoPlaylist
security:
- OAuth2: []
tags:
/video-playlists/{playlistId}/videos/{playlistElementId}:
put:
summary: Update a playlist element
+ operationId: putVideoPlaylistVideo
security:
- OAuth2: []
tags:
description: Stop the video at this specific timestamp
delete:
summary: Delete an element from a playlist
+ operationId: delVideoPlaylistVideo
security:
- OAuth2: []
tags:
tags:
- Search
summary: Search videos
+ operationId: searchVideos
parameters:
- name: search
in: query
tags:
- Search
summary: Search channels
+ operationId: searchChannels
parameters:
- name: search
in: query
tags:
- Video Mirroring
summary: List videos being mirrored
+ operationId: getMirroredVideos
security:
- OAuth2:
- admin
tags:
- Video Mirroring
summary: Mirror a video
+ operationId: putMirroredVideo
security:
- OAuth2:
- admin
tags:
- Video Mirroring
summary: Delete a mirror done on a video
+ operationId: delMirroredVideo
security:
- OAuth2:
- admin
tags:
- Feeds
summary: List comments on videos
+ operationId: getSyndicatedComments
parameters:
- name: format
in: path
tags:
- Feeds
summary: List videos
+ operationId: getSyndicatedVideos
parameters:
- name: format
in: path
- Feeds
- Account
summary: List videos of subscriptions tied to a token
+ operationId: getSyndicatedSubscriptionVideos
parameters:
- name: format
in: path
tags:
- Plugins
summary: List plugins
+ operationId: getPlugins
security:
- OAuth2:
- admin
tags:
- Plugins
summary: List available plugins
+ operationId: getAvailablePlugins
security:
- OAuth2:
- admin
tags:
- Plugins
summary: Install a plugin
+ operationId: addPlugin
security:
- OAuth2:
- admin
tags:
- Plugins
summary: Update a plugin
+ operationId: updatePlugin
security:
- OAuth2:
- admin
tags:
- Plugins
summary: Uninstall a plugin
+ operationId: uninstallPlugin
security:
- OAuth2:
- admin
tags:
- Plugins
summary: Get a plugin
+ operationId: getPlugin
security:
- OAuth2:
- admin
required: true
description: The thread id (root comment id)
schema:
- $ref: '#/components/schemas/VideoCommentThreadTree/properties/comment/properties/id'
+ type: integer
commentId:
name: commentId
in: path
indexUrl:
type: string
format: url
+ homepage:
+ type: object
+ properties:
+ enabled:
+ type: boolean
+
ServerConfigAbout:
properties:
instance:
type: boolean
manualApproval:
type: boolean
+
+ CustomHomepage:
+ properties:
+ content:
+ type: string
+
Follow:
properties:
id:
# optionally present fields: they require WITH_STATS scope
videosCount:
type: integer
- description: Count of videos published
+ description: Count of videos published
abusesCount:
type: integer
description: Count of reports/abuses of which the user is a target