- [Go](https://framagit.org/framasoft/peertube/clients/go)
- [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
+ See the [REST API quick start](https://docs.joinpeertube.org/api/rest-getting-started) for a few
examples of using the PeerTube API.
# Authentication
## Roles
Accounts are given permissions based on their role. There are three roles on
- PeerTube: Administrator, Moderator, and User. See the [roles guide](https://docs.joinpeertube.org/admin-managing-users?id=roles) for a detail of their permissions.
+ PeerTube: Administrator, Moderator, and User. See the [roles guide](https://docs.joinpeertube.org/admin/managing-users#roles) for a detail of their permissions.
# Errors
{
"detail": "Video not found",
- "docs": "https://docs.joinpeertube.org/api-rest-reference.html#operation/getVideo",
+ "docs": "https://docs.joinpeertube.org/api/rest-reference.html#operation/getVideo",
"status": 404,
"title": "Not Found",
"type": "about:blank"
{
"detail": "Cannot get this video regarding follow constraints",
- "docs": "https://docs.joinpeertube.org/api-rest-reference.html#operation/getVideo",
+ "docs": "https://docs.joinpeertube.org/api/rest-reference.html#operation/getVideo",
"status": 403,
"title": "Forbidden",
- "type": "https://docs.joinpeertube.org/api-rest-reference.html#section/Errors/does_not_respect_follow_constraints"
+ "type": "https://docs.joinpeertube.org/api/rest-reference.html#section/Errors/does_not_respect_follow_constraints"
}
```
{
"detail": "Incorrect request parameters: id",
- "docs": "https://docs.joinpeertube.org/api-rest-reference.html#operation/getVideo",
+ "docs": "https://docs.joinpeertube.org/api/rest-reference.html#operation/getVideo",
"instance": "/api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180",
"invalid-params": {
"id": {
In addition, all routes serving ActivityPub are CORS-enabled for all origins.
externalDocs:
- url: https://docs.joinpeertube.org/api-rest-reference.html
+ url: https://docs.joinpeertube.org/api/rest-reference.html
tags:
- name: Register
description: |
information across its social graph by posting activities to actors' inbox
endpoints.
externalDocs:
- url: https://docs.joinpeertube.org/admin-following-instances?id=instances-follows
+ url: https://docs.joinpeertube.org/admin/following-instances#instances-follows
- name: Instance Redundancy
description: >
Redundancy is part of the inter-server solidarity that PeerTube fosters.
to the policy of video selection of your choice. Note that you have a similar functionality
to mirror individual videos, see [video mirroring](#tag/Video-Mirroring).
externalDocs:
- url: https://docs.joinpeertube.org/admin-following-instances?id=instances-redundancy
+ url: https://docs.joinpeertube.org/admin/following-instances#instances-redundancy
- name: Plugins
description: >
Managing plugins installed from a local path or from NPM, or search for new ones.
externalDocs:
- url: https://docs.joinpeertube.org/api-plugins
+ url: https://docs.joinpeertube.org/api/plugins
- name: Abuses
description: |
Abuses deal with reports of local or remote videos/comments/accounts alike.
email:
type: string
description: User email
+ required:
+ - email
responses:
'204':
description: successful operation
email:
type: string
description: Registration email
+ required:
+ - email
responses:
'204':
description: successful operation
- state
- -state
responses:
- '204':
+ '200':
description: successful operation
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ total:
+ type: integer
+ example: 1
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/UserRegistration'
/api/v1/videos/ownership:
get:
/api/v1/videos/privacies:
get:
summary: List available video privacy policies
- operationId: getPrivacyPolicies
+ operationId: getVideoPrivacyPolicies
tags:
- Video
responses:
type: integer
saveReplay:
type: boolean
+ replaySettings:
+ $ref: '#/components/schemas/LiveVideoReplaySettings'
permanentLive:
description: User can stream multiple times in a permanent live
type: boolean
schema:
$ref: '#/components/schemas/VideoListResponse'
+ '/api/v1/video-channels/{channelHandle}/video-playlists':
+ get:
+ summary: List playlists of a channel
+ tags:
+ - Video Playlists
+ - Video Channels
+ parameters:
+ - $ref: '#/components/parameters/channelHandle'
+ - $ref: '#/components/parameters/start'
+ - $ref: '#/components/parameters/count'
+ - $ref: '#/components/parameters/sort'
+ - $ref: '#/components/parameters/videoPlaylistType'
+ 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'
+
'/api/v1/video-channels/{channelHandle}/followers':
get:
tags:
- $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/count'
- $ref: '#/components/parameters/sort'
+ - $ref: '#/components/parameters/videoPlaylistType'
responses:
'200':
description: successful operation
format: seconds
stopTimestamp:
type: integer
- format: seconds
+
+ '/api/v1/accounts/{name}/video-playlists':
+ get:
+ summary: List playlists of an account
+ tags:
+ - Video Playlists
+ - Accounts
+ parameters:
+ - $ref: '#/components/parameters/name'
+ - $ref: '#/components/parameters/start'
+ - $ref: '#/components/parameters/count'
+ - $ref: '#/components/parameters/sort'
+ - $ref: '#/components/parameters/search'
+ - $ref: '#/components/parameters/videoPlaylistType'
+ 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'
'/api/v1/accounts/{name}/video-channels':
get:
description: Ask the server to reinject videoFileToken in URLs in m3u8 playlist
schema:
type: boolean
-
+ videoPlaylistType:
+ name: playlistType
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/VideoPlaylistTypeSet'
+
securitySchemes:
OAuth2:
description: |
Note that the __access token is valid for 1 day__ and is given
along with a __refresh token valid for 2 weeks__.
- [Generate]: https://docs.joinpeertube.org/api-rest-getting-started
+ [Generate]: https://docs.joinpeertube.org/api/rest-getting-started
type: oauth2
flows:
password:
- 1
- 2
- 3
- description: Video playlist privacy policy (see [/video-playlists/privacies])
+ description: Video playlist privacy policy (see [/video-playlists/privacies](#operation/getPlaylistPrivacyPolicies))
VideoPlaylistPrivacyConstant:
properties:
id:
- 2
- 3
- 4
- description: privacy id of the video (see [/videos/privacies](#operation/getPrivacyPolicies))
+ description: privacy id of the video (see [/videos/privacies](#operation/getVideoPrivacyPolicies))
VideoPrivacyConstant:
properties:
id:
- 2
- 3
description: 'The live latency mode (Default = `1`, High latency = `2`, Small Latency = `3`)'
+
+ LiveVideoReplaySettings:
+ type: object
+ properties:
+ privacy:
+ # description: Video playlist privacy policy (see [../video-playlists/privacies])
+ $ref: '#/components/schemas/VideoPrivacySet'
+
VideoStateConstant:
properties:
properties:
saveReplay:
type: boolean
+ replaySettings:
+ $ref: '#/components/schemas/LiveVideoReplaySettings'
permanentLive:
description: User can stream multiple times in a permanent live
type: boolean
description: RTMP stream key to use to stream into this live video. Included in the response if an appropriate token is provided
saveReplay:
type: boolean
+ replaySettings:
+ $ref: '#/components/schemas/LiveVideoReplaySettings'
permanentLive:
description: User can stream multiple times in a permanent live
type: boolean