PeerTube API Reference
Introduction
The PeerTube API is built on HTTP(S). Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use PeerTube. No official SDK is currently provided.
Authentication
When you sign up for an account, you are given the possibility to generate sessions, and authenticate using this session token. One session token can currently be used at a time.
API Endpoint
https://peertube.example.com/api/v1
Request Content-Types: application/json
Response Content-Types: application/json; charset=utf-8
Schemes: https
Version: 1.1.0-alpha.2
Authentication
OAuth2
In the header: Authorization: Bearer <token>
Authenticating via OAuth requires the following steps:
- Have an account with sufficient authorization levels
- Generate a Bearer Token
- Make Authenticated Requests
Admin scope
moderatorModerator scope
userUser scope
Accounts
Using some features of PeerTube require authentication, for which Accounts provide different levels of permission as well as associated user information. Accounts also encompass remote accounts discovered across the federation.
Get the account by name
The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for example)
Offset
Number of items
Sort column (-createdAt for example)
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"displayName": "string",
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
Get videos for an account, provided the name of that account
The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for example)
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"id": "number",
"uuid": "string",
"createdAt": "string",
"publishedAt": "string",
"updatedAt": "string",
"category": {
"id": "number",
"label": "string"
},
"licence": {
"id": "number",
"label": "string"
},
"language": {
"id": "string",
"label": "string"
},
"privacy": "string",
"description": "string",
"duration": "number",
"isLocal": "boolean",
"name": "string",
"thumbnailPath": "string",
"previewPath": "string",
"embedPath": "string",
"views": "number",
"likes": "number",
"dislikes": "number",
"nsfw": "boolean",
"account": {
"name": "string",
"displayName": "string",
"url": "string",
"host": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
}
Get all accounts
Response Content-Types: application/jsonhttps://peertube.cpy.re/api/v1
Response Example (200 OK)
[
{
"displayName": "string",
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
]
Config
Each server exposes public information regarding supported videos and options.
Get the configuration of the server
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"signup": {
"allowed": "boolean"
},
"transcoding": {
"enabledResolutions": [
"number"
]
},
"avatar": {
"file": {
"size": {
"max": "number"
}
},
"extensions": [
"string"
]
},
"video": {
"file": {
"extensions": [
"string"
]
}
}
}
Feeds
Feeds of videos and feeds of comments allow to see updates and get them in an aggregator or script of your choice.
Get the feed of videos for the server, with optional filter by account name or id
The format expected (xml defaults to RSS 2.0, atom to ATOM 1.0 and json to JSON FEED 1.0
The id of the local account to filter to (beware, users IDs and not actors IDs which will return empty feeds
The name of the local account to filter to
successful operation
Response Content-Types: application/atom+xml, application/rss+xml, application/json
Job
Jobs are long-running tasks enqueued and processed by the instance itself. No additional worker registration is currently available.
Get list of jobs
The state of the job
Offset
Number of items
Sort column (-createdAt for example)
Response Content-Types: application/json
Response Example (200 OK)
[
{
"id": "number",
"state": "string",
"category": "string",
"handlerName": "string",
"handlerInputData": "string",
"createdAt": "string",
"updatedAt": "string"
}
]
ServerFollowing
Managing servers which the instance interacts with is crucial to the concept of federation in PeerTube and external video indexation. The PeerTube server then deals with inter-server ActivityPub operations and propagates information across its social graph by posting activities to actors' inbox endpoints.
Unfollow a server by hostname
The host to unfollow
successful operation
Response Content-Types: application/json
Get followers of the server
Offset
Number of items
Sort column (-createdAt for example)
Response Content-Types: application/json
Response Example (200 OK)
[
{
"id": "number",
"follower": {
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
},
"following": {
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
},
"score": "number",
"state": "string",
"createdAt": "string",
"updatedAt": "string"
}
]
Get servers followed by the server
Offset
Number of items
Sort column (-createdAt for example)
Response Content-Types: application/json
Response Example (200 OK)
[
{
"id": "number",
"follower": {
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
},
"following": {
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
},
"score": "number",
"state": "string",
"createdAt": "string",
"updatedAt": "string"
}
]
Follow a server
undefined
Request Content-Types: application/json
Request Example
{
"id": "number",
"follower": {
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
},
"following": {
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
},
"score": "number",
"state": "string",
"createdAt": "string",
"updatedAt": "string"
}
Successful operation
Response Content-Types: application/json
VideoAbuse
Video abuses deal with reports of local or remote videos alike.
Get list of reported video abuses
Offset
Number of items
Sort column (-createdAt for example)
successful operation
Response Content-Types: application/json
Response Example (200 OK)
[
{
"id": "number",
"reason": "string",
"reporterAccount": {
"displayName": "string",
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
},
"video": {
"id": "number",
"name": "string",
"uuid": "string",
"url": "string"
},
"createdAt": "string"
}
]
Report an abuse, on a video by its id
The video id or uuid
Successful operation
Response Content-Types: application/json
Video
Operations dealing with listing, uploading, fetching or modifying videos.
Get videos for an account, provided the name of that account
The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for example)
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"id": "number",
"uuid": "string",
"createdAt": "string",
"publishedAt": "string",
"updatedAt": "string",
"category": {
"id": "number",
"label": "string"
},
"licence": {
"id": "number",
"label": "string"
},
"language": {
"id": "string",
"label": "string"
},
"privacy": "string",
"description": "string",
"duration": "number",
"isLocal": "boolean",
"name": "string",
"thumbnailPath": "string",
"previewPath": "string",
"embedPath": "string",
"views": "number",
"likes": "number",
"dislikes": "number",
"nsfw": "boolean",
"account": {
"name": "string",
"displayName": "string",
"url": "string",
"host": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
}
Get list of videos
category id of the video
Offset
Number of items
Sort column (-createdAt for example)
Response Content-Types: application/json
Response Example (200 OK)
[
{
"id": "number",
"uuid": "string",
"createdAt": "string",
"publishedAt": "string",
"updatedAt": "string",
"category": {
"id": "number",
"label": "string"
},
"licence": {
"id": "number",
"label": "string"
},
"language": {
"id": "string",
"label": "string"
},
"privacy": "string",
"description": "string",
"duration": "number",
"isLocal": "boolean",
"name": "string",
"thumbnailPath": "string",
"previewPath": "string",
"embedPath": "string",
"views": "number",
"likes": "number",
"dislikes": "number",
"nsfw": "boolean",
"account": {
"name": "string",
"displayName": "string",
"url": "string",
"host": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
}
]
Get list of video licences known by the server
successful operation
Response Content-Types: application/json
Response Example (200 OK)
[
"string"
]
Get list of video licences known by the server
successful operation
Response Content-Types: application/json
Response Example (200 OK)
[
"string"
]
Get list of languages known by the server
successful operation
Response Content-Types: application/json
Response Example (200 OK)
[
"string"
]
Get list of privacy policies supported by the server
successful operation
Response Content-Types: application/json
Response Example (200 OK)
[
"string"
]
Update metadata for a video by its id
The video id or uuid
Video thumbnail file
Video preview file
Video category
Video licence
Video language
Video description
Whether or not we wait transcoding before publish the video
Text describing how to support the video uploader
Whether or not this video contains sensitive content
Video name
Video tags
Enable or disable comments for this video
Video privacy
Schedule an update at a specific datetime
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"id": "number",
"uuid": "string",
"createdAt": "string",
"publishedAt": "string",
"updatedAt": "string",
"category": {
"id": "number",
"label": "string"
},
"licence": {
"id": "number",
"label": "string"
},
"language": {
"id": "string",
"label": "string"
},
"privacy": "string",
"description": "string",
"duration": "number",
"isLocal": "boolean",
"name": "string",
"thumbnailPath": "string",
"previewPath": "string",
"embedPath": "string",
"views": "number",
"likes": "number",
"dislikes": "number",
"nsfw": "boolean",
"account": {
"name": "string",
"displayName": "string",
"url": "string",
"host": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
}
Get a video by its id
The video id or uuid
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"id": "number",
"uuid": "string",
"createdAt": "string",
"publishedAt": "string",
"updatedAt": "string",
"category": {
"id": "number",
"label": "string"
},
"licence": {
"id": "number",
"label": "string"
},
"language": {
"id": "string",
"label": "string"
},
"privacy": "string",
"description": "string",
"duration": "number",
"isLocal": "boolean",
"name": "string",
"thumbnailPath": "string",
"previewPath": "string",
"embedPath": "string",
"views": "number",
"likes": "number",
"dislikes": "number",
"nsfw": "boolean",
"account": {
"name": "string",
"displayName": "string",
"url": "string",
"host": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
}
Delete a video by its id
The video id or uuid
Successful operation
Response Content-Types: application/json
Get a video description by its id
The video id or uuid
successful operation
Response Content-Types: application/json
Response Example (200 OK)
"string"
Add a view to the video by its id
The video id or uuid
Successful operation
Response Content-Types: application/json
Upload a video file with its metadata
Video file
Channel id that will contain this video
Video thumbnail file
Video preview file
Video category
Video licence
Video language
Video description
Whether or not we wait transcoding before publish the video
Text describing how to support the video uploader
Whether or not this video contains sensitive content
Video name
Video tags
Enable or disable comments for this video
Video privacy
Schedule an update at a specific datetime
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"video": {
"id": "number",
"uuid": "string"
}
}
Search
The search helps to find videos from within the instance and beyond. Videos from other instances federated by the instance (that is, instances followed by the instance) can be found via keywords and other criteria of the advanced search.
Get the videos corresponding to a given query
Offset
Number of items
Sort column (-createdAt for example)
String to search
Response Content-Types: application/json
Response Example (200 OK)
[
{
"id": "number",
"uuid": "string",
"createdAt": "string",
"publishedAt": "string",
"updatedAt": "string",
"category": {
"id": "number",
"label": "string"
},
"licence": {
"id": "number",
"label": "string"
},
"language": {
"id": "string",
"label": "string"
},
"privacy": "string",
"description": "string",
"duration": "number",
"isLocal": "boolean",
"name": "string",
"thumbnailPath": "string",
"previewPath": "string",
"embedPath": "string",
"views": "number",
"likes": "number",
"dislikes": "number",
"nsfw": "boolean",
"account": {
"name": "string",
"displayName": "string",
"url": "string",
"host": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
}
]
VideoComment
Operations dealing with comments to a video. Comments are organized in threads.
Get the comment threads of a video by its id
The video id or uuid
Offset
Number of items
Sort column (-createdAt for example)
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"total": "number",
"data": [
{
"id": "number",
"url": "string",
"text": "string",
"threadId": "number",
"inReplyToCommentId": "number",
"videoId": "number",
"createdAt": "string",
"updatedAt": "string",
"totalReplies": "number",
"account": {
"displayName": "string",
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
}
]
}
Creates a comment thread, on a video by its id
The video id or uuid
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"comment": {
"id": "number",
"url": "string",
"text": "string",
"threadId": "number",
"inReplyToCommentId": "number",
"videoId": "number",
"createdAt": "string",
"updatedAt": "string",
"totalReplies": "number",
"account": {
"displayName": "string",
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
}
}
Get the comment thread by its id, of a video by its id
The video id or uuid
The thread id (root comment id)
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"comment": {
"id": "number",
"url": "string",
"text": "string",
"threadId": "number",
"inReplyToCommentId": "number",
"videoId": "number",
"createdAt": "string",
"updatedAt": "string",
"totalReplies": "number",
"account": {
"displayName": "string",
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
},
"children": [
{
"comment": {
"id": "number",
"url": "string",
"text": "string",
"threadId": "number",
"inReplyToCommentId": "number",
"videoId": "number",
"createdAt": "string",
"updatedAt": "string",
"totalReplies": "number",
"account": {
"displayName": "string",
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
},
"children": [
{
"comment": {
"id": "number",
"url": "string",
"text": "string",
"threadId": "number",
"inReplyToCommentId": "number",
"videoId": "number",
"createdAt": "string",
"updatedAt": "string",
"totalReplies": "number",
"account": {
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
}
}
]
}
]
}
Creates a comment in a comment thread by its id, of a video by its id
The video id or uuid
The comment id
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"comment": {
"id": "number",
"url": "string",
"text": "string",
"threadId": "number",
"inReplyToCommentId": "number",
"videoId": "number",
"createdAt": "string",
"updatedAt": "string",
"totalReplies": "number",
"account": {
"displayName": "string",
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
}
}
Delete a comment in a comment therad by its id, of a video by its id
The video id or uuid
The comment id
Successful operation
Response Content-Types: application/json
VideoChannel
Operations dealing with creation, modification and video listing of a user's channels.
Get list of video channels
Offset
Number of items
Sort column (-createdAt for example)
successful operation
Response Content-Types: application/json
Response Example (200 OK)
[
{
"displayName": "string",
"description": "string",
"isLocal": "boolean",
"ownerAccount": {
"id": "number",
"uuid": "string"
}
}
]
Creates a video channel for the current user
undefined
Request Content-Types: application/json
Request Example
{
"name": "string",
"description": "string"
}
Successful operation
Response Content-Types: application/json
Get a video channel by its id
The video channel id or uuid
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"displayName": "string",
"description": "string",
"isLocal": "boolean",
"ownerAccount": {
"id": "number",
"uuid": "string"
}
}
Update a video channel by its id
undefined
The video channel id or uuid
Request Content-Types: application/json
Request Example
{
"name": "string",
"description": "string"
}
Successful operation
Response Content-Types: application/json
Delete a video channel by its id
The video channel id or uuid
Successful operation
Response Content-Types: application/json
Get videos of a video channel by its id
The video channel id or uuid
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"id": "number",
"uuid": "string",
"createdAt": "string",
"publishedAt": "string",
"updatedAt": "string",
"category": {
"id": "number",
"label": "string"
},
"licence": {
"id": "number",
"label": "string"
},
"language": {
"id": "string",
"label": "string"
},
"privacy": "string",
"description": "string",
"duration": "number",
"isLocal": "boolean",
"name": "string",
"thumbnailPath": "string",
"previewPath": "string",
"embedPath": "string",
"views": "number",
"likes": "number",
"dislikes": "number",
"nsfw": "boolean",
"account": {
"name": "string",
"displayName": "string",
"url": "string",
"host": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
}
Get video channels of an account by its name
The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for example)
successful operation
Response Content-Types: application/json
Response Example (200 OK)
[
{
"displayName": "string",
"description": "string",
"isLocal": "boolean",
"ownerAccount": {
"id": "number",
"uuid": "string"
}
}
]
User
Creates user
User to create
Request Content-Types: application/json
Request Example
{
"username": "string",
"password": "string",
"email": "string",
"videoQuota": "string",
"role": "string"
}
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"id": "number",
"uuid": "string"
}
Get a list of users
Offset
Number of items
Sort column (-createdAt for example)
Response Content-Types: application/json
Response Example (200 OK)
[
{
"id": "number",
"username": "string",
"email": "string",
"displayNSFW": "boolean",
"autoPlayVideo": "boolean",
"role": "string",
"videoQuota": "number",
"createdAt": "string",
"account": {
"displayName": "string",
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
},
"videoChannels": [
{
"displayName": "string",
"description": "string",
"isLocal": "boolean",
"ownerAccount": {
"id": "number",
"uuid": "string"
}
}
]
}
]
Delete a user by its id
The user id
Successful operation
Response Content-Types: application/json
Get user by its id
The user id
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"id": "number",
"username": "string",
"email": "string",
"displayNSFW": "boolean",
"autoPlayVideo": "boolean",
"role": "string",
"videoQuota": "number",
"createdAt": "string",
"account": {
"displayName": "string",
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
},
"videoChannels": [
{
"displayName": "string",
"description": "string",
"isLocal": "boolean",
"ownerAccount": {
"id": "number",
"uuid": "string"
}
}
]
}
Update user profile by its id
undefined
The user id
Request Content-Types: application/json
Request Example
{
"id": "string",
"email": "string",
"videoQuota": "string",
"role": "string"
}
Successful operation
Response Content-Types: application/json
Get current user information
Response Content-Types: application/json
Response Example (200 OK)
[
{
"id": "number",
"username": "string",
"email": "string",
"displayNSFW": "boolean",
"autoPlayVideo": "boolean",
"role": "string",
"videoQuota": "number",
"createdAt": "string",
"account": {
"displayName": "string",
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
},
"videoChannels": [
{
"displayName": "string",
"description": "string",
"isLocal": "boolean",
"ownerAccount": {
"id": "number",
"uuid": "string"
}
}
]
}
]
Update current user information
undefined
Request Content-Types: application/json
Request Example
{
"password": "string",
"email": "string",
"displayNSFW": "string",
"autoPlayVideo": "string"
}
Successful operation
Response Content-Types: application/json
Get current user used quota
successful operation
Response Content-Types: application/json
Response Example (200 OK)
"number"
Get rating of video by its id, among those of the current user
The video id
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"id": "string",
"rating": "number"
}
Get videos of the current user
Offset
Number of items
Sort column (-createdAt for example)
Response Content-Types: application/json
Response Example (200 OK)
[
{
"id": "number",
"uuid": "string",
"createdAt": "string",
"publishedAt": "string",
"updatedAt": "string",
"category": {
"id": "number",
"label": "string"
},
"licence": {
"id": "number",
"label": "string"
},
"language": {
"id": "string",
"label": "string"
},
"privacy": "string",
"description": "string",
"duration": "number",
"isLocal": "boolean",
"name": "string",
"thumbnailPath": "string",
"previewPath": "string",
"embedPath": "string",
"views": "number",
"likes": "number",
"dislikes": "number",
"nsfw": "boolean",
"account": {
"name": "string",
"displayName": "string",
"url": "string",
"host": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
}
]
Register a user
undefined
Request Content-Types: application/json
Request Example
{
"username": "string",
"password": "string",
"email": "string"
}
Successful operation
Response Content-Types: application/json
Update current user avatar
The file to upload.
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
VideoBlacklist
Put on blacklist a video by its id
The video id or uuid
Successful operation
Response Content-Types: application/json
Delete an entry of the blacklist of a video by its id
The video id or uuid
Successful operation
Response Content-Types: application/json
Get list of videos on blacklist
Offset
Number of items
Sort column (-createdAt for example)
successful operation
Response Content-Types: application/json
Response Example (200 OK)
[
{
"id": "number",
"videoId": "number",
"createdAt": "string",
"updatedAt": "string",
"name": "string",
"uuid": "string",
"description": "string",
"duration": "number",
"views": "number",
"likes": "number",
"dislikes": "number",
"nsfw": "boolean"
}
]
VideoRate
Vote for a video by its id
The video id or uuid
Successful operation
Response Content-Types: application/json
Schema Definitions
Video:
- id: number
- uuid: string
- createdAt: string
- publishedAt: string
- updatedAt: string
- category: VideoConstantNumber
- licence: VideoConstantNumber
- language: VideoConstantString
- privacy: VideoPrivacy
- description: string
- duration: number
- isLocal: boolean
- name: string
- thumbnailPath: string
- previewPath: string
- embedPath: string
- views: number
- likes: number
- dislikes: number
- nsfw: boolean
- account: object
-
- name: string
- displayName: string
- url: string
- host: string
- avatar: Avatar
Example
{
"id": "number",
"uuid": "string",
"createdAt": "string",
"publishedAt": "string",
"updatedAt": "string",
"category": {
"id": "number",
"label": "string"
},
"licence": {
"id": "number",
"label": "string"
},
"language": {
"id": "string",
"label": "string"
},
"privacy": "string",
"description": "string",
"duration": "number",
"isLocal": "boolean",
"name": "string",
"thumbnailPath": "string",
"previewPath": "string",
"embedPath": "string",
"views": "number",
"likes": "number",
"dislikes": "number",
"nsfw": "boolean",
"account": {
"name": "string",
"displayName": "string",
"url": "string",
"host": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
}
VideoAbuse:
- id: number
- reason: string
- reporterAccount: Account
- video: object
-
- id: number
- name: string
- uuid: string
- url: string
- createdAt: string
Example
{
"id": "number",
"reason": "string",
"reporterAccount": {
"displayName": "string",
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
},
"video": {
"id": "number",
"name": "string",
"uuid": "string",
"url": "string"
},
"createdAt": "string"
}
VideoBlacklist:
- id: number
- videoId: number
- createdAt: string
- updatedAt: string
- name: string
- uuid: string
- description: string
- duration: number
- views: number
- likes: number
- dislikes: number
- nsfw: boolean
Example
{
"id": "number",
"videoId": "number",
"createdAt": "string",
"updatedAt": "string",
"name": "string",
"uuid": "string",
"description": "string",
"duration": "number",
"views": "number",
"likes": "number",
"dislikes": "number",
"nsfw": "boolean"
}
VideoChannel:
- displayName: string
- description: string
- isLocal: boolean
- ownerAccount: object
-
- id: number
- uuid: string
Example
{
"displayName": "string",
"description": "string",
"isLocal": "boolean",
"ownerAccount": {
"id": "number",
"uuid": "string"
}
}
VideoComment:
- id: number
- url: string
- text: string
- threadId: number
- inReplyToCommentId: number
- videoId: number
- createdAt: string
- updatedAt: string
- totalReplies: number
- account: Account
Example
{
"id": "number",
"url": "string",
"text": "string",
"threadId": "number",
"inReplyToCommentId": "number",
"videoId": "number",
"createdAt": "string",
"updatedAt": "string",
"totalReplies": "number",
"account": {
"displayName": "string",
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
}
VideoCommentThreadTree:
- comment: VideoComment
- children: VideoCommentThreadTree
-
VideoCommentThreadTree
Example
{
"comment": {
"id": "number",
"url": "string",
"text": "string",
"threadId": "number",
"inReplyToCommentId": "number",
"videoId": "number",
"createdAt": "string",
"updatedAt": "string",
"totalReplies": "number",
"account": {
"displayName": "string",
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
},
"children": [
{
"comment": {
"id": "number",
"url": "string",
"text": "string",
"threadId": "number",
"inReplyToCommentId": "number",
"videoId": "number",
"createdAt": "string",
"updatedAt": "string",
"totalReplies": "number",
"account": {
"displayName": "string",
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
},
"children": [
{
"comment": {
"id": "number",
"url": "string",
"text": "string",
"threadId": "number",
"inReplyToCommentId": "number",
"videoId": "number",
"createdAt": "string",
"updatedAt": "string",
"totalReplies": "number",
"account": {
"displayName": "string",
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
}
}
]
}
]
}
Avatar:
- path: string
- createdAt: string
- updatedAt: string
Example
{
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
Actor:
- id: number
- uuid: string
- url: string
- name: string
- host: string
- followingCount: number
- followersCount: number
- createdAt: string
- updatedAt: string
- avatar: Avatar
Example
{
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
Account:
- displayName: string
Example
{
"displayName": "string",
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
User:
- id: number
- username: string
- email: string
- displayNSFW: boolean
- autoPlayVideo: boolean
- role: string User, Moderator, Administrator
- videoQuota: number
- createdAt: string
- account: Account
- videoChannels: VideoChannel
-
VideoChannel
Example
{
"id": "number",
"username": "string",
"email": "string",
"displayNSFW": "boolean",
"autoPlayVideo": "boolean",
"role": "string",
"videoQuota": "number",
"createdAt": "string",
"account": {
"displayName": "string",
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
},
"videoChannels": [
{
"displayName": "string",
"description": "string",
"isLocal": "boolean",
"ownerAccount": {
"id": "number",
"uuid": "string"
}
}
]
}
ServerConfig:
- signup: object
-
- allowed: boolean
- transcoding: object
-
- enabledResolutions: number[]
-
number
- avatar: object
-
- file: object
-
- size: object
-
- max: number
- extensions: string[]
-
string
- video: object
-
- file: object
-
- extensions: string[]
-
string
Example
{
"signup": {
"allowed": "boolean"
},
"transcoding": {
"enabledResolutions": [
"number"
]
},
"avatar": {
"file": {
"size": {
"max": "number"
}
},
"extensions": [
"string"
]
},
"video": {
"file": {
"extensions": [
"string"
]
}
}
}
Follow:
Example
{
"id": "number",
"follower": {
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
},
"following": {
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
},
"score": "number",
"state": "string",
"createdAt": "string",
"updatedAt": "string"
}
Job:
- id: number
- state: string pending, processing, error, success
- category: string transcoding, activitypub-http
- handlerName: string
- handlerInputData: string
- createdAt: string
- updatedAt: string
Example
{
"id": "number",
"state": "string",
"category": "string",
"handlerName": "string",
"handlerInputData": "string",
"createdAt": "string",
"updatedAt": "string"
}
VideoUploadResponse:
- video: object
-
- id: number
- uuid: string
Example
{
"video": {
"id": "number",
"uuid": "string"
}
}
CommentThreadResponse:
- total: number
- data: VideoComment
-
VideoComment
Example
{
"total": "number",
"data": [
{
"id": "number",
"url": "string",
"text": "string",
"threadId": "number",
"inReplyToCommentId": "number",
"videoId": "number",
"createdAt": "string",
"updatedAt": "string",
"totalReplies": "number",
"account": {
"displayName": "string",
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
}
]
}
CommentThreadPostResponse:
- comment: VideoComment
Example
{
"comment": {
"id": "number",
"url": "string",
"text": "string",
"threadId": "number",
"inReplyToCommentId": "number",
"videoId": "number",
"createdAt": "string",
"updatedAt": "string",
"totalReplies": "number",
"account": {
"displayName": "string",
"id": "number",
"uuid": "string",
"url": "string",
"name": "string",
"host": "string",
"followingCount": "number",
"followersCount": "number",
"createdAt": "string",
"updatedAt": "string",
"avatar": {
"path": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
}
}
AddUser:
- username: string
-
The user username
- password: string
-
The user password
- email: string
-
The user email
- videoQuota: string
-
The user videoQuota
- role: string
-
The user role
Example
{
"username": "string",
"password": "string",
"email": "string",
"videoQuota": "string",
"role": "string"
}
UpdateUser:
- id: string
-
The user id
- email: string
-
The updated email of the user
- videoQuota: string
-
The updated videoQuota of the user
- role: string
-
The updated role of the user
Example
{
"id": "string",
"email": "string",
"videoQuota": "string",
"role": "string"
}
UpdateMe:
- password: string
-
Your new password
- email: string
-
Your new email
- displayNSFW: string
-
Your new displayNSFW
- autoPlayVideo: string
-
Your new autoPlayVideo
Example
{
"password": "string",
"email": "string",
"displayNSFW": "string",
"autoPlayVideo": "string"
}
GetMeVideoRating:
- id: string
-
Id of the video
- rating: number
-
Rating of the video
Example
{
"id": "string",
"rating": "number"
}
RegisterUser:
- username: string
-
The username of the user
- password: string
-
The password of the user
- email: string
-
The email of the user
Example
{
"username": "string",
"password": "string",
"email": "string"
}