- [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
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.
description: Operations on video files
- name: Video Transcoding
description: Video transcoding related operations
- - name: Video stats
+ - name: Video Stats
description: Video statistics
- name: Video Feeds
description: Server syndication feeds of videos
- name: Stats
description: |
Statistics
+ - name: Runner Registration Token
+ description: |
+ Manage runner registration token
x-tagGroups:
- name: Static endpoints
- Stats
- Logs
- Job
+ - name: Remote Jobs
+ tags:
+ - Runner Registration Token
+ - Runner Jobs
+ - Runners
+
paths:
'/static/webseed/{filename}':
get:
- $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/count'
- $ref: '#/components/parameters/videosSort'
+ - $ref: '#/components/parameters/excludeAlreadyWatched'
responses:
'200':
description: successful operation
content:
'application/json':
schema:
- type: array
- items:
- $ref: '#/components/schemas/Account'
+ type: object
+ properties:
+ total:
+ type: integer
+ example: 1
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/Account'
/api/v1/config:
get:
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
- $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/count'
- $ref: '#/components/parameters/videosSort'
+ - $ref: '#/components/parameters/excludeAlreadyWatched'
responses:
'200':
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:
- $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/count'
- $ref: '#/components/parameters/videosSort'
+ - $ref: '#/components/parameters/excludeAlreadyWatched'
responses:
'200':
description: successful operation
/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
- $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/count'
- $ref: '#/components/parameters/videosSort'
+ - $ref: '#/components/parameters/excludeAlreadyWatched'
responses:
'200':
description: successful operation
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:
- $ref: '#/components/parameters/count'
- $ref: '#/components/parameters/searchTarget'
- $ref: '#/components/parameters/videosSearchSort'
+ - $ref: '#/components/parameters/excludeAlreadyWatched'
- name: startDate
in: query
description: Get videos that are published after this date
'204':
description: successful operation
-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)
-components:
- parameters:
- start:
- name: start
- in: query
- required: false
- description: Offset used to paginate results
- schema:
- type: integer
- minimum: 0
- count:
- name: count
- in: query
- required: false
- description: "Number of items to return"
- schema:
- type: integer
- default: 15
- maximum: 100
- minimum: 1
- sort:
- name: sort
- in: query
- required: false
- description: Sort column
- schema:
- type: string
- example: -createdAt
- search:
- name: search
- in: query
- required: false
- description: Plain text search, applied to various parts of the model depending on endpoint
- 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.
+ /api/v1/runners/registration-tokens/generate:
+ post:
+ summary: Generate registration token
+ description: Generate a new runner registration token
+ security:
+ - OAuth2:
+ - admin
+ tags:
+ - Runner Registration Token
+ responses:
+ '204':
+ description: successful operation
+ /api/v1/runners/registration-tokens/{registrationTokenId}:
+ delete:
+ summary: Remove registration token
+ description: Remove a registration token. Runners that used this token for their registration are automatically removed.
+ security:
+ - OAuth2:
+ - admin
+ tags:
+ - Runner Registration Token
+ parameters:
+ - $ref: '#/components/parameters/registrationTokenId'
+ responses:
+ '204':
+ description: successful operation
- **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
- It means the instance may not yet 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 doesn't have 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
- required: false
- schema:
- type: string
- enum:
- - name
- - -duration
- - -createdAt
- - -publishedAt
- - -views
- - -likes
- - -trending
- - -hot
- - -best
- description: >
- Sort videos by criteria (prefixing with `-` means `DESC` order):
- * `hot` - Adaptation of Reddit "hot" algorithm taking into account video views, likes, dislikes and comments and publication date
- * `best` - Same than `hot`, but also takes into account user video history
- * `trending` - Sort videos by recent views ("recent" is defined by the admin)
- * `views` - Sort videos using their `views` counter
- * `publishedAt` - Sort by video publication date (when it became publicly available)
- videosSearchSort:
- name: sort
- in: query
- required: false
- description: >
- Sort videos by criteria (prefixing with `-` means `DESC` order):
- schema:
- type: string
- enum:
- - name
- - -duration
- - -createdAt
- - -publishedAt
- - -views
- - -likes
- - -match
- commentsSort:
- name: sort
- in: query
- required: false
- description: Sort comments by criteria
- schema:
- type: string
- enum:
- - -createdAt
- - -totalReplies
- blacklistsSort:
- name: sort
- in: query
- required: false
- description: Sort blocklists by criteria
- schema:
- type: string
- enum:
- - -id
- - name
- - -duration
- - -views
- - -likes
- - -dislikes
- - -uuid
- - -createdAt
- usersSearch:
- name: search
- in: query
- required: false
- description: Plain text search that will match with user usernames or emails
- schema:
- type: string
- usersBlocked:
- name: blocked
- in: query
- required: false
- description: Filter results down to (un)banned users
- schema:
- type: boolean
- usersSort:
- name: sort
- in: query
- required: false
- description: Sort users by criteria
- schema:
- type: string
- enum:
- - -id
- - -username
- - -createdAt
- abusesSort:
- name: sort
- in: query
- required: false
- description: Sort abuses by criteria
- schema:
- type: string
- enum:
- - -id
+ /api/v1/runners/registration-tokens:
+ get:
+ summary: List registration tokens
+ security:
+ - OAuth2:
+ - admin
+ tags:
+ - Runner Registration Token
+ parameters:
+ - $ref: '#/components/parameters/start'
+ - $ref: '#/components/parameters/count'
+ - $ref: '#/components/parameters/registrationTokenSort'
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ total:
+ type: integer
+ example: 1
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/RunnerRegistrationToken'
+
+ /api/v1/runners/register:
+ post:
+ summary: Register a new runner
+ description: API used by PeerTube runners
+ tags:
+ - Runners
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ registrationToken:
+ type: string
+ name:
+ type: string
+ description:
+ type: string
+ required:
+ - registrationToken
+ - name
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ id:
+ type: integer
+ description: Runner id
+ runnerToken:
+ type: string
+
+ /api/v1/runners/unregister:
+ post:
+ summary: Unregister a runner
+ description: API used by PeerTube runners
+ tags:
+ - Runners
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ runnerToken:
+ type: string
+ required:
+ - runnerToken
+ responses:
+ '204':
+ description: successful operation
+
+ /api/v1/runners/{runnerId}:
+ delete:
+ summary: Delete a runner
+ security:
+ - OAuth2:
+ - admin
+ tags:
+ - Runners
+ parameters:
+ - $ref: '#/components/parameters/runnerId'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ runnerToken:
+ type: string
+ required:
+ - runnerToken
+ responses:
+ '204':
+ description: successful operation
+
+ /api/v1/runners:
+ get:
+ summary: List runners
+ security:
+ - OAuth2:
+ - admin
+ tags:
+ - Runners
+ parameters:
+ - $ref: '#/components/parameters/start'
+ - $ref: '#/components/parameters/count'
+ - $ref: '#/components/parameters/runnerSort'
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ total:
+ type: integer
+ example: 1
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/Runner'
+
+
+ /api/v1/runners/jobs/request:
+ post:
+ summary: Request a new job
+ description: API used by PeerTube runners
+ tags:
+ - Runner Jobs
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ runnerToken:
+ type: string
+ required:
+ - runnerToken
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ availableJobs:
+ type: array
+ items:
+ type: object
+ properties:
+ uuid:
+ $ref: '#/components/schemas/UUIDv4'
+ type:
+ $ref: '#/components/schemas/RunnerJobType'
+ payload:
+ $ref: '#/components/schemas/RunnerJobPayload'
+
+ /api/v1/runners/jobs/{jobUUID}/accept:
+ post:
+ summary: Accept job
+ description: API used by PeerTube runners
+ tags:
+ - Runner Jobs
+ parameters:
+ - $ref: '#/components/parameters/jobUUID'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ runnerToken:
+ type: string
+ required:
+ - runnerToken
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ job:
+ allOf:
+ - $ref: '#/components/schemas/RunnerJob'
+ - type: object
+ properties:
+ jobToken:
+ type: string
+
+ /api/v1/runners/jobs/{jobUUID}/abort:
+ post:
+ summary: Abort job
+ description: API used by PeerTube runners
+ tags:
+ - Runner Jobs
+ parameters:
+ - $ref: '#/components/parameters/jobUUID'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ runnerToken:
+ type: string
+ jobToken:
+ type: string
+ reason:
+ type: string
+ description: Why the runner aborts this job
+ required:
+ - runnerToken
+ - jobToken
+ - reason
+ responses:
+ '204':
+ description: successful operation
+
+ /api/v1/runners/jobs/{jobUUID}/update:
+ post:
+ summary: Update job
+ description: API used by PeerTube runners
+ tags:
+ - Runner Jobs
+ parameters:
+ - $ref: '#/components/parameters/jobUUID'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ runnerToken:
+ type: string
+ jobToken:
+ type: string
+ progress:
+ type: integer
+ description: Update job progression percentage (optional)
+ payload:
+ anyOf:
+ - type: object
+ description: Provide live transcoding chunks update
+ properties:
+ type:
+ type: string
+ enum:
+ - 'add-chunk'
+ - 'remove-chunk'
+ masterPlaylistFile:
+ type: string
+ format: binary
+ resolutionPlaylistFile:
+ type: string
+ format: binary
+ resolutionPlaylistFilename:
+ type: string
+ videoChunkFile:
+ type: string
+ format: binary
+ videoChunkFilename:
+ type: string
+ required:
+ - runnerToken
+ - jobToken
+ responses:
+ '204':
+ description: successful operation
+
+ /api/v1/runners/jobs/{jobUUID}/error:
+ post:
+ summary: Post job error
+ description: API used by PeerTube runners
+ tags:
+ - Runner Jobs
+ parameters:
+ - $ref: '#/components/parameters/jobUUID'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ runnerToken:
+ type: string
+ jobToken:
+ type: string
+ message:
+ type: string
+ description: Why the runner failed to process this job
+ required:
+ - runnerToken
+ - jobToken
+ - message
+ responses:
+ '204':
+ description: successful operation
+
+ /api/v1/runners/jobs/{jobUUID}/success:
+ post:
+ summary: Post job success
+ description: API used by PeerTube runners
+ tags:
+ - Runner Jobs
+ parameters:
+ - $ref: '#/components/parameters/jobUUID'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ runnerToken:
+ type: string
+ jobToken:
+ type: string
+ payload:
+ anyOf:
+ - type: object
+ title: VOD web video transcoding
+ properties:
+ videoFile:
+ type: string
+ format: binary
+ - type: object
+ title: VOD HLS transcoding
+ properties:
+ videoFile:
+ type: string
+ format: binary
+ resolutionPlaylistFile:
+ type: string
+ format: binary
+ - type: object
+ title: VOD audio merge transcoding
+ properties:
+ videoFile:
+ type: string
+ format: binary
+ - type: object
+ title: Live RTMP to HLS transcoding
+ required:
+ - runnerToken
+ - jobToken
+ - payload
+ responses:
+ '204':
+ description: successful operation
+
+ /api/v1/runners/jobs/{jobUUID}/cancel:
+ get:
+ summary: Cancel a job
+ security:
+ - OAuth2:
+ - admin
+ tags:
+ - Runner Jobs
+ parameters:
+ - $ref: '#/components/parameters/jobUUID'
+ responses:
+ '204':
+ description: successful operation
+
+ /api/v1/runners/jobs:
+ get:
+ summary: List jobs
+ security:
+ - OAuth2:
+ - admin
+ tags:
+ - Runner Jobs
+ parameters:
+ - $ref: '#/components/parameters/start'
+ - $ref: '#/components/parameters/count'
+ - $ref: '#/components/parameters/runnerJobSort'
+ - $ref: '#/components/parameters/search'
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ total:
+ type: integer
+ example: 1
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/RunnerJobAdmin'
+
+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)
+components:
+ parameters:
+ start:
+ name: start
+ in: query
+ required: false
+ description: Offset used to paginate results
+ schema:
+ type: integer
+ minimum: 0
+ count:
+ name: count
+ in: query
+ required: false
+ description: "Number of items to return"
+ schema:
+ type: integer
+ default: 15
+ maximum: 100
+ minimum: 1
+ sort:
+ name: sort
+ in: query
+ required: false
+ description: Sort column
+ schema:
+ type: string
+ example: -createdAt
+ search:
+ name: search
+ in: query
+ required: false
+ description: Plain text search, applied to various parts of the model depending on endpoint
+ 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 yet 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 doesn't have 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
+ required: false
+ schema:
+ type: string
+ enum:
+ - name
+ - -duration
+ - -createdAt
+ - -publishedAt
+ - -views
+ - -likes
+ - -trending
+ - -hot
+ - -best
+ description: >
+ Sort videos by criteria (prefixing with `-` means `DESC` order):
+ * `hot` - Adaptation of Reddit "hot" algorithm taking into account video views, likes, dislikes and comments and publication date
+ * `best` - Same than `hot`, but also takes into account user video history
+ * `trending` - Sort videos by recent views ("recent" is defined by the admin)
+ * `views` - Sort videos using their `views` counter
+ * `publishedAt` - Sort by video publication date (when it became publicly available)
+ videosSearchSort:
+ name: sort
+ in: query
+ required: false
+ description: >
+ Sort videos by criteria (prefixing with `-` means `DESC` order):
+ schema:
+ type: string
+ enum:
+ - name
+ - -duration
+ - -createdAt
+ - -publishedAt
+ - -views
+ - -likes
+ - -match
+ commentsSort:
+ name: sort
+ in: query
+ required: false
+ description: Sort comments by criteria
+ schema:
+ type: string
+ enum:
+ - -createdAt
+ - -totalReplies
+ blacklistsSort:
+ name: sort
+ in: query
+ required: false
+ description: Sort blocklists by criteria
+ schema:
+ type: string
+ enum:
+ - -id
+ - name
+ - -duration
+ - -views
+ - -likes
+ - -dislikes
+ - -uuid
+ - -createdAt
+ usersSearch:
+ name: search
+ in: query
+ required: false
+ description: Plain text search that will match with user usernames or emails
+ schema:
+ type: string
+ usersBlocked:
+ name: blocked
+ in: query
+ required: false
+ description: Filter results down to (un)banned users
+ schema:
+ type: boolean
+ usersSort:
+ name: sort
+ in: query
+ required: false
+ description: Sort users by criteria
+ schema:
+ type: string
+ enum:
+ - -id
+ - -username
+ - -createdAt
+ abusesSort:
+ name: sort
+ in: query
+ required: false
+ description: Sort abuses by criteria
+ schema:
+ type: string
+ enum:
+ - -id
- -createdAt
- -state
videoRedundanciesSort:
type: string
enum:
- createdAt
+ registrationTokenSort:
+ name: sort
+ in: query
+ required: false
+ description: Sort registration tokens by criteria
+ schema:
+ type: string
+ enum:
+ - createdAt
+ runnerSort:
+ name: sort
+ in: query
+ required: false
+ description: Sort runners by criteria
+ schema:
+ type: string
+ enum:
+ - createdAt
+ runnerJobSort:
+ name: sort
+ in: query
+ required: false
+ description: Sort runner jobs by criteria
+ schema:
+ type: string
+ enum:
+ - updatedAt
+ - createdAt
+ - priority
+ - state
+ - progress
name:
name: name
schema:
$ref: '#/components/schemas/VideoPrivacySet'
description: '**PeerTube >= 4.0** Display only videos in this specific privacy/privacies'
+ excludeAlreadyWatched:
+ name: excludeAlreadyWatched
+ in: query
+ description: Whether or not to exclude videos that are in the user's video history
+ schema:
+ type: boolean
uuids:
name: uuids
in: query
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'
+ registrationTokenId:
+ name: registrationTokenId
+ in: path
+ required: true
+ schema:
+ type: integer
+ runnerId:
+ name: runnerId
+ in: path
+ required: true
+ schema:
+ type: integer
+ jobUUID:
+ name: jobUUID
+ in: path
+ required: true
+ schema:
+ $ref: '#/components/schemas/UUIDv4'
securitySchemes:
OAuth2:
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:
- 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:
id:
- username
- password
- email
- - videoQuota
- - videoQuotaDaily
- role
UpdateUser:
properties:
uuid:
$ref: '#/components/schemas/UUIDv4'
+ VideoChannelEdit:
+ properties:
+ displayName:
+ description: Channel display name
+ description:
+ description: Channel description
+ support:
+ description: How to support/fund the channel
+
VideoChannelCreate:
allOf:
- - $ref: '#/components/schemas/VideoChannel'
+ - $ref: '#/components/schemas/VideoChannelEdit'
- properties:
name:
description: username of the channel to create
- displayName
VideoChannelUpdate:
allOf:
- - $ref: '#/components/schemas/VideoChannel'
+ - $ref: '#/components/schemas/VideoChannelEdit'
- properties:
bulkVideosSupportUpdate:
type: boolean
description: Update the support field for all videos of this channel
+
VideoChannelList:
properties:
total:
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
- uploadedBytesP2P
- videoId
+ RunnerRegistrationToken:
+ properties:
+ id:
+ type: integer
+ registrationToken:
+ type: string
+ createdAt:
+ type: string
+ format: date-time
+ updatedAt:
+ type: string
+ format: date-time
+ registeredRunnersCount:
+ type: integer
+
+ Runner:
+ properties:
+ id:
+ type: integer
+ name:
+ type: string
+ description:
+ type: string
+ ip:
+ type: string
+ updatedAt:
+ type: string
+ format: date-time
+ createdAt:
+ type: string
+ format: date-time
+ lastContact:
+ type: string
+ format: date-time
+
+ RunnerJobType:
+ type: string
+ enum:
+ - vod-web-video-transcoding
+ - vod-hls-transcoding
+ - vod-audio-merge-transcoding
+ - live-rtmp-hls-transcoding
+
+ RunnerJobState:
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ - 4
+ - 5
+ - 6
+ - 7
+ - 8
+ description: >
+ The runner job state:
+ - `1` Pending
+ - `2` Processing
+ - `3` Completed
+ - `4` Errored
+ - `5` Waiting for a parent job
+ - `6` Cancelled
+ - `7` Parent had an error
+ - `8` Parent has been cancelled
+
+ RunnerJobStateConstant:
+ type: object
+ properties:
+ id:
+ $ref: '#/components/schemas/RunnerJobState'
+ label:
+ type: string
+ example: 'Processing'
+
+ RunnerJobPayload:
+ anyOf:
+ - type: object
+ title: VOD web video transcoding
+ properties:
+ input:
+ type: object
+ properties:
+ videoFileUrl:
+ type: string
+ output:
+ type: object
+ properties:
+ resolution:
+ type: number
+ fps:
+ type: number
+ - type: object
+ title: VOD HLS transcoding
+ properties:
+ input:
+ type: object
+ properties:
+ videoFileUrl:
+ type: string
+ output:
+ type: object
+ properties:
+ resolution:
+ type: number
+ fps:
+ type: number
+ - type: object
+ title: VOD audio merge transcoding
+ properties:
+ input:
+ type: object
+ properties:
+ audioFileUrl:
+ type: string
+ previewFileUrl:
+ type: string
+ output:
+ type: object
+ properties:
+ resolution:
+ type: number
+ fps:
+ type: number
+
+ RunnerJob:
+ properties:
+ uuid:
+ $ref: '#/components/schemas/UUIDv4'
+ type:
+ $ref: '#/components/schemas/RunnerJobType'
+ state:
+ $ref: '#/components/schemas/RunnerJobStateConstant'
+ payload:
+ $ref: '#/components/schemas/RunnerJobPayload'
+ failures:
+ type: integer
+ description: Number of times a remote runner failed to process this job. After too many failures, the job in "error" state
+ error:
+ nullable: true
+ type: string
+ description: Error message if the job is errored
+ progress:
+ type: integer
+ description: Percentage progress
+ priority:
+ type: integer
+ description: Job priority (less has more priority)
+ updatedAt:
+ type: string
+ format: date-time
+ createdAt:
+ type: string
+ format: date-time
+ startedAt:
+ type: string
+ format: date-time
+ finishedAt:
+ type: string
+ format: date-time
+ parent:
+ nullable: true
+ description: If job has a parent job
+ type: object
+ properties:
+ type:
+ $ref: '#/components/schemas/RunnerJobType'
+ state:
+ $ref: '#/components/schemas/RunnerJobStateConstant'
+ uuid:
+ $ref: '#/components/schemas/UUIDv4'
+ runner:
+ nullable: true
+ description: If job is associated to a runner
+ properties:
+ id:
+ type: number
+ name:
+ type: string
+ description:
+ type: string
+
+ RunnerJobAdmin:
+ allOf:
+ - $ref: '#/components/schemas/RunnerJob'
+ - type: object
+ properties:
+ privatePayload:
+ type: object
+
callbacks:
searchIndex:
'https://search.example.org/api/v1/search/videos':