openapi: 3.0.0
info:
title: PeerTube
- version: 1.3.1
+ version: 1.4.0
contact:
name: PeerTube Community
url: 'https://joinpeertube.org'
tags:
- Accounts
- User
+ - My User
- name: Videos
tags:
- Video
summary: Get the account by name
parameters:
- $ref: '#/components/parameters/name'
- - $ref: '#/components/parameters/start'
- - $ref: '#/components/parameters/count'
- - $ref: '#/components/parameters/sort'
responses:
'200':
description: successful operation
tags:
- Accounts
summary: Get all accounts
+ parameters:
+ - $ref: '#/components/parameters/start'
+ - $ref: '#/components/parameters/count'
+ - $ref: '#/components/parameters/sort'
responses:
'200':
description: successful operation
responses:
'200':
description: successful operation
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ServerConfigAbout'
/config/custom:
get:
summary: Get the runtime configuration of the server
responses:
'200':
description: successful operation
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ServerConfigCustom'
put:
summary: Set the runtime configuration of the server
tags:
schema:
$ref: '#/components/schemas/UpdateUser'
required: true
+ /users/register:
+ post:
+ summary: Register a user
+ tags:
+ - User
+ responses:
+ '204':
+ $ref: '#/paths/~1users~1me/put/responses/204'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RegisterUser'
+ required: true
/users/me:
get:
summary: Get current user information
- OAuth2:
- user
tags:
- - User
+ - My User
responses:
'200':
description: successful operation
- OAuth2:
- user
tags:
- - User
+ - My User
responses:
'204':
- description: Successful operation
+ description: successful operation
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateMe'
required: true
+ /users/me/videos/imports:
+ get:
+ summary: Get video imports of current user
+ security:
+ - OAuth2:
+ - user
+ tags:
+ - My User
+ parameters:
+ - $ref: '#/components/parameters/start'
+ - $ref: '#/components/parameters/count'
+ - $ref: '#/components/parameters/sort'
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/VideoImport'
/users/me/video-quota-used:
get:
summary: Get current user used quota
- OAuth2:
- user
tags:
- - User
+ - My User
responses:
'200':
description: successful operation
security:
- OAuth2: []
tags:
- - User
+ - My User
parameters:
- name: videoId
in: path
- OAuth2:
- user
tags:
- - User
+ - My User
parameters:
- $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/count'
- OAuth2:
- user
tags:
- - User
+ - My User
parameters:
- $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/count'
- OAuth2:
- user
tags:
- - User
+ - My User
responses:
'200':
description: successful operation
- OAuth2:
- user
tags:
- - User
+ - My User
parameters:
- $ref: '#/components/parameters/subscriptionsUris'
responses:
- OAuth2:
- user
tags:
- - User
+ - My User
parameters:
- $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/count'
- OAuth2:
- user
tags:
- - User
+ - My User
parameters:
- $ref: '#/components/parameters/subscriptionHandle'
responses:
- OAuth2:
- user
tags:
- - User
+ - My User
parameters:
- $ref: '#/components/parameters/subscriptionHandle'
responses:
'200':
description: successful operation
- /users/register:
- post:
- summary: Register a user
- tags:
- - User
- responses:
- '204':
- $ref: '#/paths/~1users~1me/put/responses/204'
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RegisterUser'
- required: true
/users/me/avatar/pick:
post:
summary: Update current user avatar
security:
- OAuth2: []
tags:
- - User
+ - My User
responses:
'200':
description: successful operation
type: string
format: binary
encoding:
- profileImage:
- # only accept png/jpeg
+ avatarfile:
contentType: image/png, image/jpeg
/videos:
get:
parameters:
- $ref: '#/components/parameters/idOrUUID'
responses:
- '200':
+ '204':
description: successful operation
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Video'
requestBody:
content:
multipart/form-data:
thumbnailfile:
description: Video thumbnail file
type: string
+ format: binary
previewfile:
description: Video preview file
type: string
+ format: binary
category:
description: Video category
type: string
tags:
description: Video tags (maximum 5 tags each between 2 and 30 characters)
type: array
+ minItems: 1
+ maxItems: 5
items:
type: string
+ minLength: 2
+ maxLength: 30
commentsEnabled:
description: Enable or disable comments for this video
type: string
+ originallyPublishedAt:
+ description: Date when the content was originally published
+ type: string
+ format: date-time
scheduleUpdate:
$ref: '#/components/schemas/VideoScheduledUpdate'
+ encoding:
+ thumbnailfile:
+ contentType: image/jpeg
+ previewfile:
+ contentType: image/jpeg
get:
summary: Get a video by its id
tags:
thumbnailfile:
description: Video thumbnail file
type: string
+ format: binary
previewfile:
description: Video preview file
type: string
+ format: binary
privacy:
$ref: '#/components/schemas/VideoPrivacySet'
category:
description: Video name
type: string
tags:
- description: Video tags
+ description: Video tags (maximum 5 tags each between 2 and 30 characters)
type: array
+ minItems: 1
+ maxItems: 5
items:
type: string
+ minLength: 2
+ maxLength: 30
commentsEnabled:
description: Enable or disable comments for this video
type: string
+ originallyPublishedAt:
+ description: Date when the content was originally published
+ type: string
+ format: date-time
scheduleUpdate:
$ref: '#/components/schemas/VideoScheduledUpdate'
required:
- videofile
- channelId
- name
+ encoding:
+ videofile:
+ contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
+ thumbnailfile:
+ contentType: image/jpeg
+ previewfile:
+ contentType: image/jpeg
x-code-samples:
- lang: Shell
source: |
"Authorization:Bearer $token"
/videos/imports:
post:
- summary: Import a torrent or magnetURI or HTTP ressource (if enabled by the instance administrator)
+ summary: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
security:
- OAuth2: []
tags:
thumbnailfile:
description: Video thumbnail file
type: string
+ format: binary
previewfile:
description: Video preview file
type: string
+ format: binary
privacy:
$ref: '#/components/schemas/VideoPrivacySet'
category:
description: Video name
type: string
tags:
- description: Video tags
+ description: Video tags (maximum 5 tags each between 2 and 30 characters)
type: array
+ minItems: 1
+ maxItems: 5
items:
type: string
+ minLength: 2
+ maxLength: 30
commentsEnabled:
description: Enable or disable comments for this video
type: string
required:
- channelId
- name
+ encoding:
+ torrentfile:
+ contentType: application/x-bittorrent
+ thumbnailfile:
+ contentType: image/jpeg
+ previewfile:
+ contentType: image/jpeg
/videos/abuse:
get:
summary: Get list of reported video abuses
description: The file to upload.
type: string
format: binary
+ encoding:
+ captionfile:
+ contentType: text/vtt, application/x-subrip
responses:
'204':
$ref: '#/paths/~1users~1me/put/responses/204'
- name: rating
in: query
required: false
- description: Optionaly filter which ratings to retrieve
+ description: Optionally filter which ratings to retrieve
schema:
type: string
enum:
type: number
stopTimestamp:
type: number
+ video:
+ nullable: true
+ $ref: '#/components/schemas/Video'
VideoFile:
properties:
magnetUri:
description: 'Video file size in bytes'
torrentUrl:
type: string
- torrentDownaloadUrl:
+ torrentDownloadUrl:
type: string
fileUrl:
type: string
properties:
currentTime:
type: number
- playlistElement:
- nullable: true
- $ref: '#/components/schemas/PlaylistElement'
VideoDetails:
allOf:
- $ref: '#/components/schemas/Video'
type: array
items:
$ref: '#/components/schemas/VideoStreamingPlaylists'
+ VideoImportStateConstant:
+ properties:
+ id:
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ description: 'The video import state (Pending = 1, Success = 2, Failed = 3)'
+ label:
+ type: string
+ VideoImport:
+ properties:
+ id:
+ type: number
+ targetUrl:
+ type: string
+ magnetUri:
+ type: string
+ torrentName:
+ type: string
+ state:
+ type: object
+ properties:
+ id:
+ $ref: '#/components/schemas/VideoImportStateConstant'
+ label:
+ type: string
+ error:
+ type: string
+ createdAt:
+ type: string
+ updatedAt:
+ type: string
+ video:
+ $ref: '#/components/schemas/Video'
VideoAbuse:
properties:
id:
properties:
id:
type: number
- uuid:
- type: string
url:
type: string
name:
allOf:
- $ref: '#/components/schemas/Actor'
- properties:
+ userId:
+ type: string
displayName:
type: string
+ description:
+ type: string
User:
properties:
id:
type: number
ServerConfig:
properties:
+ instance:
+ type: object
+ properties:
+ name:
+ type: string
+ shortDescription:
+ type: string
+ defaultClientRoute:
+ type: string
+ isNSFW:
+ type: boolean
+ defaultNSFWPolicy:
+ type: string
+ customizations:
+ type: object
+ properties:
+ javascript:
+ type: string
+ css:
+ type: string
+ plugin:
+ type: object
+ properties:
+ registered:
+ type: array
+ items:
+ type: string
+ theme:
+ type: object
+ properties:
+ registered:
+ type: array
+ items:
+ type: string
+ email:
+ type: object
+ properties:
+ enabled:
+ type: boolean
+ contactForm:
+ type: object
+ properties:
+ enabled:
+ type: boolean
+ serverVersion:
+ type: string
+ serverCommit:
+ type: string
signup:
type: object
properties:
allowed:
type: boolean
+ allowedForCurrentIP:
+ type: boolean
+ requiresEmailVerification:
+ type: boolean
transcoding:
type: object
properties:
+ hls:
+ type: object
+ properties:
+ enabled:
+ type: boolean
enabledResolutions:
type: array
items:
type: number
+ import:
+ type: object
+ properties:
+ videos:
+ type: object
+ properties:
+ http:
+ type: object
+ properties:
+ enabled:
+ type: boolean
+ torrent:
+ type: object
+ properties:
+ enabled:
+ type: boolean
+ autoBlacklist:
+ type: object
+ properties:
+ videos:
+ type: object
+ properties:
+ ofUsers:
+ type: object
+ properties:
+ enabled:
+ type: boolean
avatar:
type: object
properties:
items:
type: string
video:
+ type: object
+ properties:
+ image:
+ type: object
+ properties:
+ extensions:
+ type: array
+ items:
+ type: string
+ size:
+ type: object
+ properties:
+ max:
+ type: number
+ file:
+ type: object
+ properties:
+ extensions:
+ type: array
+ items:
+ type: string
+ videoCaption:
type: object
properties:
file:
type: object
properties:
+ size:
+ type: object
+ properties:
+ max:
+ type: number
extensions:
type: array
items:
type: string
+ user:
+ type: object
+ properties:
+ videoQuota:
+ type: number
+ videoQuotaDaily:
+ type: number
+ trending:
+ type: object
+ properties:
+ videos:
+ type: object
+ properties:
+ intervalDays:
+ type: number
+ tracker:
+ ype: object
+ properties:
+ enabled:
+ type: boolean
+ ServerConfigAbout:
+ properties:
+ instance:
+ type: object
+ properties:
+ name:
+ type: string
+ shortDescription:
+ type: string
+ description:
+ type: string
+ terms:
+ type: string
+ ServerConfigCustom:
+ properties:
+ instance:
+ type: object
+ properties:
+ name:
+ type: string
+ shortDescription:
+ type: string
+ description:
+ type: string
+ terms:
+ type: string
+ defaultClientRoute:
+ type: string
+ isNSFW:
+ type: boolean
+ defaultNSFWPolicy:
+ type: string
+ customizations:
+ type: object
+ properties:
+ javascript:
+ type: string
+ css:
+ type: string
+ theme:
+ type: object
+ properties:
+ default:
+ type: string
+ services:
+ type: object
+ properties:
+ twitter:
+ type: object
+ properties:
+ username:
+ type: string
+ whitelisted:
+ type: boolean
+ cache:
+ type: object
+ properties:
+ previews:
+ type: object
+ properties:
+ size:
+ type: number
+ captions:
+ type: object
+ properties:
+ size:
+ type: number
+ signup:
+ type: object
+ properties:
+ enabled:
+ type: boolean
+ limit:
+ type: number
+ requiresEmailVerification:
+ type: boolean
+ admin:
+ type: object
+ properties:
+ email:
+ type: string
+ contactForm:
+ type: object
+ properties:
+ enabled:
+ type: boolean
+ user:
+ type: object
+ properties:
+ videoQuota:
+ type: number
+ videoQuotaDaily:
+ type: number
+ transcoding:
+ type: object
+ properties:
+ enabled:
+ type: boolean
+ allowAdditionalExtensions:
+ type: boolean
+ allowAudioFiles:
+ type: boolean
+ threads:
+ type: number
+ resolutions:
+ type: object
+ properties:
+ 240p:
+ type: boolean
+ 360p:
+ type: boolean
+ 480p:
+ type: boolean
+ 720p:
+ type: boolean
+ 1080p:
+ type: boolean
+ 2160p:
+ type: boolean
+ hls:
+ type: object
+ properties:
+ enabled:
+ type: boolean
+ import:
+ type: object
+ properties:
+ videos:
+ type: object
+ properties:
+ http:
+ type: object
+ properties:
+ enabled:
+ type: boolean
+ torrent:
+ type: object
+ properties:
+ enabled:
+ type: boolean
+ autoBlacklist:
+ type: object
+ properties:
+ videos:
+ type: object
+ properties:
+ ofUsers:
+ type: object
+ properties:
+ enabled:
+ type: boolean
+ followers:
+ type: object
+ properties:
+ instance:
+ type: object
+ properties:
+ enabled:
+ type: boolean
+ manualApproval:
+ type: boolean
Follow:
properties:
id: