From 2963c3432f3967675530162b1bf87b549cc124f5 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Tue, 13 Nov 2018 23:27:58 +0100 Subject: updated REST API documentation --- support/doc/api/html/index.html | 4968 +++++++++++++++++++++------------------ support/doc/api/openapi.yaml | 168 +- 2 files changed, 2868 insertions(+), 2268 deletions(-) (limited to 'support/doc/api') diff --git a/support/doc/api/html/index.html b/support/doc/api/html/index.html index 0efc24f02..7e53ce675 100644 --- a/support/doc/api/html/index.html +++ b/support/doc/api/html/index.html @@ -25,13 +25,13 @@ Accounts @@ -39,7 +39,7 @@ Config @@ -47,7 +47,7 @@ Feeds @@ -55,7 +55,7 @@ Job @@ -63,166 +63,177 @@ ServerFollowing
- User + VideoAbuse + +
+
+ Video
- Video + Search +
+
+ VideoComment + +
+
+ VideoChannel + -
-
- VideoAbuse -
- VideoBlacklist + User -
-
- VideoChannel - -
-
- VideoComment - +
+
+ VideoBlacklist +
@@ -230,15 +241,7 @@ VideoRate - -
- Search -
@@ -283,18 +286,27 @@
-

Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.

+

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.0.0-beta + 1.1.0-alpha.2
@@ -311,8 +323,15 @@

In the header: - Authorization: Bearer mytoken + Authorization: Bearer <token>

+

Authenticating via OAuth requires the following steps:

+
    +
  • Have an account with sufficient authorization levels
  • +
  • + Generate a Bearer Token
  • +
  • Make Authenticated Requests
  • +
@@ -333,11 +352,29 @@
https://peertube.example.com/api/v1/users/token
+
+
+
scopes
+
+
+ admin +

Admin scope

+ moderator +

Moderator scope

+ user +

User 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.

+
+
@@ -348,11 +385,16 @@

- - GET - /accounts/{name} - + Get the account by name

+
+
+
+ GET + /accounts/{name} +
+
+
@@ -473,16 +515,23 @@

- - GET - /accounts/{name}/videos - + Get videos for an account, provided the name of that account

+
+
+
+ GET + /accounts/{name}/videos +
+
+
@@ -591,11 +640,16 @@

- - GET - /accounts - + Get all accounts

+
+
+
+ GET + /accounts +
+
+
@@ -632,7 +686,7 @@
Response Content-Types: - application/json + application/jsonhttps://peertube.cpy.re/api/v1
Response Example @@ -664,6 +718,11 @@

Config

+
+
+

Each server exposes public information regarding supported videos and options.

+
+
@@ -674,11 +733,16 @@

- - GET - /config - + Get the configuration of the server

+
+
+
+ GET + /config +
+
+
@@ -744,6 +808,11 @@

Feeds

+
+
+

Feeds of videos and feeds of comments allow to see updates and get them in an aggregator or script of your choice.

+
+
@@ -754,11 +823,16 @@

- - GET - /feeds/videos.{format} - + Get the feed of videos for the server, with optional filter by account name or id

+
+
+
+ GET + /feeds/videos.{format} +
+
+
@@ -836,6 +910,11 @@

Job

+
+
+

Jobs are long-running tasks enqueued and processed by the instance itself. No additional worker registration is currently available.

+
+
@@ -846,11 +925,16 @@

- - GET - /jobs - + Get list of jobs

+
+
+
+ GET + /jobs +
+
+
@@ -984,7 +1068,9 @@ OAuth2 - + + admin + @@ -993,6 +1079,11 @@

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.

+
+
@@ -1003,11 +1094,16 @@

- - DELETE - /server/following/{host} - + Unfollow a server by hostname

+
+
+
+ DELETE + /server/following/{host} +
+
+
@@ -1064,7 +1160,9 @@ OAuth2 - + + admin + @@ -1082,11 +1180,16 @@

- - GET - /server/followers - + Get followers of the server

+
+
+
+ GET + /server/followers +
+
+
@@ -1231,11 +1334,16 @@

- - GET - /server/following - + Get servers followed by the server

+
+
+
+ GET + /server/following +
+
+
@@ -1380,11 +1488,16 @@

- - POST - /server/following - + Follow a server

+
+
+
+ POST + /server/following +
+
+
@@ -1488,7 +1601,9 @@ OAuth2 - + + admin + @@ -1496,133 +1611,32 @@
-

User

-
+

VideoAbuse

+
+
+

Video abuses deal with reports of local or remote videos alike.

+
+
+

- - POST - /users - + Get list of reported video abuses

-
-
-
-
- - AddUser - -
-
-
- -

User to create

- -
-
-
-
-
-
-
Request Content-Types: - application/json -
-
Request Example
-
{
-  "username": "string",
-  "password": "string",
-  "email": "string",
-  "videoQuota": "string",
-  "role": "string"
-}
-
- -
-
-
-
-
-
-
-
-
200 OK
-
- - AddUserResponse - -
- -
-
-

successful operation

-
-
-
-
-
-
Response Content-Types: - application/json -
-
-
Response Example - (200 OK) -
-
{
-  "id": "number",
-  "uuid": "string"
-}
-
- -
-
-
-
-
-
- - - - - - - - - - - - - -
- OAuth2 -
+
+ GET + /videos/abuse
-
-
- - -
- User - -
- - -

- - GET - /users - -

@@ -1680,7 +1694,7 @@
200 OK
@@ -1694,7 +1708,7 @@
- User + VideoAbuse @@ -1713,14 +1727,8 @@
[
   {
     "id": "number",
-    "username": "string",
-    "email": "string",
-    "displayNSFW": "boolean",
-    "autoPlayVideo": "boolean",
-    "role": "string",
-    "videoQuota": "number",
-    "createdAt": "string",
-    "account": {
+    "reason": "string",
+    "reporterAccount": {
       "displayName": "string",
       "id": "number",
       "uuid": "string",
@@ -1737,17 +1745,13 @@
         "updatedAt": "string"
       }
     },
-    "videoChannels": [
-      {
-        "displayName": "string",
-        "description": "string",
-        "isLocal": "boolean",
-        "ownerAccount": {
-          "id": "number",
-          "uuid": "string"
-        }
-      }
-    ]
+    "video": {
+      "id": "number",
+      "name": "string",
+      "uuid": "string",
+      "url": "string"
+    },
+    "createdAt": "string"
   }
 ]
 
@@ -1778,21 +1782,26 @@
-
+

- - DELETE - /users/{id} - + Report an abuse, on a video by its id

+
+
+
+ POST + /videos/{id}/abuse +
+
+
@@ -1800,7 +1809,7 @@
id: - number + string
@@ -1808,7 +1817,7 @@
in path
-

The user id

+

The video id or uuid

@@ -1857,29 +1866,42 @@
-
+

Video

+
+
+

Operations dealing with listing, uploading, fetching or modifying videos.

+
+
+
- User + Accounts + + Video

- - GET - /users/{id} - + Get videos for an account, provided the name of that account

+
+
+
+ GET + /accounts/{name}/videos +
+
+
-
id: +
name: - number + string
@@ -1887,7 +1909,8 @@
in path
-

The user id

+

The name of the account (chocobozzz or + chocobozzz@peertube.cpy.re for example)

@@ -1902,7 +1925,7 @@
200 OK
- User + Video
@@ -1923,197 +1946,133 @@
{
   "id": "number",
-  "username": "string",
-  "email": "string",
-  "displayNSFW": "boolean",
-  "autoPlayVideo": "boolean",
-  "role": "string",
-  "videoQuota": "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",
-    "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"
-      }
-    }
-  ]
+  }
 }
 
-
-
-
- - - - - - - - - - - - - -
- OAuth2 -
-
-
-
-
+
- User + Video

- - PUT - /users/{id} - + Get list of videos

-
-
+
+ GET + /videos +
+
+
+
+
+
+
-
- - UpdateUser +
category: + + number +
+
in query
-
- -

undefined

- +
+

category id of the video

-
-
-
id: +
start: number
- -
in path
+
in query
-

The user id

+

Offset

-
-
-
-
-
Request Content-Types: - application/json -
-
Request Example
-
{
-  "id": "string",
-  "email": "string",
-  "videoQuota": "string",
-  "role": "string"
-}
-
- -
-
-
-
-
-
-
204 No Content
+
count: + + number + + +
+
in query
-

Successful operation

+

Number of items

+
+
+
+
+
sort: + + string + + +
+
in query
+
+
+

Sort column (-createdAt for example)

-
-
Response Content-Types: - application/json -
-
-
-
-
-
- - - - - - - - - - - - - -
- OAuth2 -
-
-
-
-
-
- - -
- User - -
- - -

- - GET - /users/me - -

-
-
@@ -2124,7 +2083,7 @@
200 OK
- User + Video
@@ -2138,7 +2097,7 @@
- User + Video @@ -2157,41 +2116,45 @@
[
   {
     "id": "number",
-    "username": "string",
-    "email": "string",
-    "displayNSFW": "boolean",
-    "autoPlayVideo": "boolean",
-    "role": "string",
-    "videoQuota": "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",
-      "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"
-        }
-      }
-    ]
+    }
   }
 ]
 
@@ -2199,89 +2162,49 @@
-
-
-
- - - - - - - - - - - - - -
- OAuth2 -
-
-
-
-
+
- User + Video

- - PUT - /users/me - + Get list of video licences known by the server

-
-
-
-
- - UpdateMe - -
-
-
- -

undefined

- -
-
-
-
-
-
-
Request Content-Types: - application/json -
-
Request Example
-
{
-  "password": "string",
-  "email": "string",
-  "displayNSFW": "string",
-  "autoPlayVideo": "string"
-}
-
- +
+ GET + /videos/categories
+
+
+
+
-
204 No Content
+
200 OK
+
+
-

Successful operation

+

successful operation

+
+
+
+
type
+
+ string[] +
@@ -2290,46 +2213,39 @@
Response Content-Types: application/json
-
-
-
-
-
- - - - - - - - - - - - - -
- OAuth2 -
+
+
Response Example + (200 OK) +
+
[
+  "string"
+]
+
+
-
+
- User + Video

- - GET - /users/me/video-quota-used - + Get list of video licences known by the server

+
+
+
+ GET + /videos/licences +
+
+
@@ -2340,7 +2256,7 @@
200 OK
-
+
@@ -2350,7 +2266,7 @@
type
- number + string[]
@@ -2364,70 +2280,37 @@
Response Example (200 OK)
-
"number"
+                  
[
+  "string"
+]
 
-
-
-
- - - - - - - - - - - - - -
- OAuth2 -
-
-
-
-
+
- User + Video

- - GET - /users/me/videos/{videoId}/rating - + Get list of languages known by the server

-
-
-
-
videoId: - - string - - -
- -
in path
-
-
-

The video id

-
-
+
+ GET + /videos/languages
+
+
+
@@ -2436,17 +2319,20 @@
200 OK
- +

successful operation

+
+
type
+
+ string[] + +
+
@@ -2457,100 +2343,37 @@
Response Example (200 OK)
-
{
-  "id": "string",
-  "rating": "number"
-}
+                  
[
+  "string"
+]
 
+
+
+ + +
+ Video + +
+ + +

+ Get list of privacy policies supported by the server +

-
- - - - - - - - - - - - - -
- OAuth2 -
+
+ GET + /videos/privacies
-
-
- - -
- User - -
- - -

- - GET - /users/me/videos - -

-
-
-
-
-
start: - - number - - -
-
in query
-
-
-

Offset

-
-
-
-
-
count: - - number - - -
-
in query
-
-
-

Number of items

-
-
-
-
-
sort: - - string - - -
-
in query
-
-
-

Sort column (-createdAt for example)

-
-
-
-
+
@@ -2559,11 +2382,7 @@
200 OK
-
- - Video - -
+
@@ -2573,11 +2392,7 @@
type
- - - Video - - + string[]
@@ -2592,168 +2407,69 @@ (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"
-      }
-    }
-  }
+  "string"
 ]
 
-
-
-
- - - - - - - - - - - - - -
- OAuth2 -
-
-
-
-
+
- User + Video

- - POST - /users/register - + Update metadata for a video by its id

-
-
+
+ PUT + /videos/{id} +
+
+
+
+
+
+
-
- - RegisterUser +
id: + + string +
+ +
in path
-
- -

undefined

- +
+

The video id or uuid

-
-
-
-
-
Request Content-Types: - application/json -
-
Request Example
-
{
-  "username": "string",
-  "password": "string",
-  "email": "string"
-}
-
- -
-
-
-
-
-
-
204 No Content
+
thumbnailfile: + + file + + +
+
in formData
-

Successful operation

+

Video thumbnail file

-
-
-
-
Response Content-Types: - application/json -
-
-
-
-
- - -
- User - -
- - -

- - POST - /users/me/avatar/pick - -

-
-
-
-
avatarfile: +
previewfile: file @@ -2762,146 +2478,179 @@
in formData
-

The file to upload.

+

Video preview file

-
-
-
-
-
-
-
-
200 OK
-
- - Avatar +
category: + + number +
- +
in formData
-

successful operation

+

Video category

-
-
-
-
Response Content-Types: - application/json -
-
-
Response Example - (200 OK) -
-
{
-  "path": "string",
-  "createdAt": "string",
-  "updatedAt": "string"
-}
-
- -
-
-
-
-
-
- - - - - - - - - - - - - -
- OAuth2 -
-
-
-
-
-

Video

-
- - -
- Video - -
- - -

- - GET - /videos - -

-
-
-
-
category: +
licence: number
-
in query
+
in formData
-

category id of the video

+

Video licence

-
start: +
language: - number + string
-
in query
+
in formData
-

Offset

+

Video language

-
count: +
description: - number + string
-
in query
+
in formData
-

Number of items

+

Video description

-
sort: +
waitTranscoding: + + boolean + + +
+
in formData
+
+
+

Whether or not we wait transcoding before publish the video

+
+
+
+
+
support: string
-
in query
+
in formData
-

Sort column (-createdAt for example)

+

Text describing how to support the video uploader

+
+
+
+
+
nsfw: + + boolean + + +
+
in formData
+
+
+

Whether or not this video contains sensitive content

+
+
+
+
+
name: + + string + + +
+
in formData
+
+
+

Video name

+
+
+
+
+
tags: + + string[] + + +
+
in formData
+
+
+

Video tags

+
+
+
+
+
commentsEnabled: + + boolean + + +
+
in formData
+
+
+

Enable or disable comments for this video

+
+
+
+
+
privacy: + + string + + Public, + Unlisted + + + +
+
in formData
+
+
+

Video privacy

+
+
+
+
+
scheduleUpdate: + + object + + +
+
in formData
+
+
+

Schedule an update at a specific datetime

@@ -2915,7 +2664,7 @@
200 OK
- + Video
@@ -2925,17 +2674,6 @@

successful operation

-
-
type
-
- - - Video - - - -
-
@@ -2946,57 +2684,77 @@
Response Example (200 OK)
-
[
-  {
+                  
{
+  "id": "number",
+  "uuid": "string",
+  "createdAt": "string",
+  "publishedAt": "string",
+  "updatedAt": "string",
+  "category": {
     "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",
+    "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",
-    "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"
-      }
+    "displayName": "string",
+    "url": "string",
+    "host": "string",
+    "avatar": {
+      "path": "string",
+      "createdAt": "string",
+      "updatedAt": "string"
     }
   }
-]
+}
 
+
+
+
+ + + + + + + + + + + + + +
+ OAuth2 +
+
+
+
-
+
@@ -3006,71 +2764,36 @@

- - GET - /videos/categories - + Get a video by its id

-
-
+
+
+ GET + /videos/{id} +
+
-
+
-
200 OK
-
- -
-
-

successful operation

+
id: + + string + + +
+ +
in path
-
-
-
type
- string[] - +

The video id or uuid

-
-
Response Content-Types: - application/json -
-
-
Response Example - (200 OK) -
-
[
-  "string"
-]
-
- -
-
-
-
-
- - -
- Video - -
- - -

- - GET - /videos/licences - -

-
-
@@ -3079,20 +2802,17 @@
200 OK
-
+
+ + Video + +

successful operation

-
-
type
-
- string[] - -
-
@@ -3103,16 +2823,55 @@
Response Example (200 OK)
-
[
-  "string"
-]
+                  
{
+  "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"
+    }
+  }
+}
 
-
+
@@ -3122,33 +2881,47 @@

- - GET - /videos/languages - + Delete a video by its id

-
-
+
+
+ DELETE + /videos/{id} +
+
-
+
-
200 OK
-
- +
id: + + string + + +
+ +
in path
-

successful operation

+

The video id or uuid

-
-
type
+
+
+
+
+
+
+
+
+
+
204 No Content
+
- string[] - +

Successful operation

@@ -3157,20 +2930,32 @@
Response Content-Types: application/json
-
-
Response Example - (200 OK) -
-
[
-  "string"
-]
-
- +
+
+
+
+
+ + + + + + + + + + + + + +
+ OAuth2 +
-
+
@@ -3180,13 +2965,36 @@

- - GET - /videos/privacies - + Get a video description by its id

-
+
+
+ GET + /videos/{id}/description +
+
+
+
+
+
+
+
+
id: + + string + + +
+ +
in path
+
+
+

The video id or uuid

+
+
+
+
@@ -3195,7 +3003,7 @@
200 OK
-
+
@@ -3205,7 +3013,7 @@
type
- string[] + string
@@ -3219,16 +3027,14 @@
Response Example (200 OK)
-
[
-  "string"
-]
+                  
"string"
 
-
+
@@ -3238,11 +3044,16 @@

- - PUT - /videos/{id} - + Add a view to the video by its id

+
+
+
+ POST + /videos/{id}/views +
+
+
@@ -3261,6 +3072,83 @@

The video id or uuid

+ +
+
+
+
+
+
+
+
+
204 No Content
+
+
+

Successful operation

+
+
+
+
+
+
Response Content-Types: + application/json +
+
+
+
+
+ + +
+ Video + +
+ + +

+ Upload a video file with its metadata +

+
+
+
+ POST + /videos/upload +
+
+
+
+
+
+
+
+
videofile: + + file + + +
+ +
in formData
+
+
+

Video file

+
+
+
+
+
channelId: + + number + + +
+ +
in formData
+
+
+

Channel id that will contain this video

+
+
thumbnailfile: @@ -3473,7 +3361,7 @@
200 OK
@@ -3493,45 +3381,9 @@ (200 OK)
{
-  "id": "number",
-  "uuid": "string",
-  "createdAt": "string",
-  "publishedAt": "string",
-  "updatedAt": "string",
-  "category": {
-    "id": "number",
-    "label": "string"
-  },
-  "licence": {
+  "video": {
     "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"
-    }
+    "uuid": "string"
   }
 }
 
@@ -3562,37 +3414,91 @@
-
+

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 - /videos/{id} - + Get the videos corresponding to a given query

+
+
+
+ GET + /search/videos +
+
+
-
id: +
start: + + number + + +
+
in query
+
+
+

Offset

+
+
+
+
+
count: + + number + + +
+
in query
+
+
+

Number of items

+
+
+
+
+
sort: + + string + + +
+
in query
+
+
+

Sort column (-createdAt for example)

+
+
+
+
+
search: string
-
in path
+
in query
-

The video id or uuid

+

String to search

@@ -3606,7 +3512,7 @@
200 OK
- + Video
@@ -3616,6 +3522,17 @@

successful operation

+
+
type
+
+ + + Video + + + +
+
@@ -3626,69 +3543,82 @@
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": {
+    "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",
-    "displayName": "string",
-    "url": "string",
-    "host": "string",
-    "avatar": {
-      "path": "string",
-      "createdAt": "string",
-      "updatedAt": "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.

+
+
+

- - DELETE - /videos/{id} - + Get the comment threads of a video by its id

+
+
+
+ GET + /videos/{id}/comment-threads +
+
+
@@ -3707,83 +3637,46 @@

The video id or uuid

- -
-
-
-
-
-
-
204 No Content
+
start: + + number + + +
+
in query
-

Successful operation

+

Offset

-
-
-
-
Response Content-Types: - application/json -
-
-
-
-
-
- - - - - - - - - - - - - -
- OAuth2 -
-
-
-
-
-
- - -
- Video - -
- - -

- - GET - /videos/{id}/description - -

-
-
-
-
id: +
count: + + number + + +
+
in query
+
+
+

Number of items

+
+
+
+
+
sort: string
- -
in path
+
in query
-

The video id or uuid

+

Sort column (-createdAt for example)

@@ -3796,20 +3689,17 @@
200 OK
-
+

successful operation

-
-
type
-
- string - -
-
@@ -3820,28 +3710,65 @@
Response Example (200 OK)
-
"string"
+                  
{
+  "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"
+        }
+      }
+    }
+  ]
+}
 
-
+

- - POST - /videos/{id}/views - + Creates a comment thread, on a video by its id

+
+
+
+ POST + /videos/{id}/comment-threads +
+
+
@@ -3869,10 +3796,16 @@
-
204 No Content
+
200 OK
+ +
-

Successful operation

+

successful operation

@@ -3881,255 +3814,561 @@
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"
+      }
+    }
+  }
+}
+
+ +
+
+
+
+
+
+ + + + + + + + + + + + + +
+ OAuth2 +
+
-
+

- - POST - /videos/upload - + Get the comment thread by its id, of a video by its id

+
+
+
+ GET + /videos/{id}/comment-threads/{threadId} +
+
+
-
videofile: +
id: - file + string
-
in formData
+
in path
-

Video file

+

The video id or uuid

-
channelId: +
threadId: number
-
in formData
-
-
-

Channel id that will contain this video

-
-
-
-
-
thumbnailfile: - - file - - -
-
in formData
-
-
-

Video thumbnail file

-
-
-
-
-
previewfile: - - file - - -
-
in formData
-
-
-

Video preview file

-
-
-
-
-
category: - - number - - -
-
in formData
+
in path
-

Video category

+

The thread id (root comment id)

+
+
+
+
+
+
+
-
licence: - - number - +
200 OK
+ -
in formData
+
-

Video licence

+

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"
+              }
+            }
+          }
+        }
+      ]
+    }
+  ]
+}
+
+ +
+
+
+
+
+ + +
+ VideoComment + +
+ + +

+ Creates a comment in a comment thread by its id, of a video by its id +

+
+
+
+ POST + /videos/{id}/comments/{commentId} +
+
+
+
+
+
-
language: +
id: string
-
in formData
+ +
in path
-

Video language

+

The video id or uuid

-
description: +
threadId: - string + number
-
in formData
+ +
in path
-

Video description

+

The comment id

+
+
+
+
+
+
+
-
waitTranscoding: - - boolean - +
200 OK
+ -
in formData
+
-

Whether or not we wait transcoding before publish the video

+

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"
+      }
+    }
+  }
+}
+
+ +
+
+
+
+
+
+ + + + + + + + + + + + + +
+ OAuth2 +
+
+
+
+
+
+ + +
+ VideoComment + +
+ + +

+ Delete a comment in a comment therad by its id, of a video by its id +

+
+
+
+ DELETE + /videos/{id}/comments/{commentId} +
+
+
+
+
+
-
support: +
id: string
-
in formData
+ +
in path
-

Text describing how to support the video uploader

+

The video id or uuid

-
nsfw: +
threadId: - boolean + number
-
in formData
+ +
in path
-

Whether or not this video contains sensitive content

+

The comment id

+
+
+
+
+
+
+
-
name: - - string - - -
-
in formData
+
204 No Content
-

Video name

+

Successful operation

+
+
+
+
Response Content-Types: + application/json +
+
+
+
+
+
+ + + + + + + + + + + + + +
+ OAuth2 +
+
+
+
+
+

VideoChannel

+
+
+

Operations dealing with creation, modification and video listing of a user's channels.

+
+
+
+ + +
+ VideoChannel + +
+ + +

+ Get list of video channels +

+
+
+
+ GET + /video-channels +
+
+
+
+
+
-
tags: +
start: - string[] + number
-
in formData
+
in query
-

Video tags

+

Offset

-
commentsEnabled: +
count: - boolean + number
-
in formData
+
in query
-

Enable or disable comments for this video

+

Number of items

-
privacy: +
sort: string - - Public, - Unlisted -
-
in formData
-
-
-

Video privacy

-
-
-
-
-
scheduleUpdate: - - object - - -
-
in formData
+
in query
-

Schedule an update at a specific datetime

+

Sort column (-createdAt for example)

@@ -4143,8 +4382,8 @@
200 OK
@@ -4153,6 +4392,17 @@

successful operation

+
+
type
+
+ + + VideoChannel + + + +
+
@@ -4163,17 +4413,96 @@
Response Example (200 OK)
-
{
-  "video": {
-    "id": "number",
-    "uuid": "string"
+                  
[
+  {
+    "displayName": "string",
+    "description": "string",
+    "isLocal": "boolean",
+    "ownerAccount": {
+      "id": "number",
+      "uuid": "string"
+    }
   }
+]
+
+ + +
+
+
+
+ + +
+ VideoChannel + +
+ + +

+ Creates a video channel for the current user +

+
+
+
+ POST + /video-channels +
+
+
+
+
+
+
+
+ +
+
+ +

undefined

+ +
+
+
+
+
+
+
Request Content-Types: + application/json +
+
Request Example
+
{
+  "name": "string",
+  "description": "string"
 }
 
+
+
+
+
+
+
204 No Content
+
+
+

Successful operation

+
+
+
+
+
+
Response Content-Types: + application/json +
+
+
@@ -4197,65 +4526,42 @@
-

VideoAbuse

-
+

- - GET - /videos/abuse - + Get a video channel by its id

+
+
+
+ GET + /video-channels/{id} +
+
+
-
start: - - number - - -
-
in query
-
-
-

Offset

-
-
-
-
-
count: - - number - - -
-
in query
-
-
-

Number of items

-
-
-
-
-
sort: +
id: string
-
in query
+ +
in path
-

Sort column (-createdAt for example)

+

The video channel id or uuid

@@ -4269,8 +4575,8 @@
200 OK
@@ -4279,17 +4585,6 @@

successful operation

-
-
type
-
- - - VideoAbuse - - - -
-
@@ -4300,41 +4595,111 @@
Response Example (200 OK)
-
[
-  {
+                  
{
+  "displayName": "string",
+  "description": "string",
+  "isLocal": "boolean",
+  "ownerAccount": {
     "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"
+    "uuid": "string"
   }
-]
+}
+
+ + +
+
+
+
+ + +
+ VideoChannel + +
+ + +

+ Update a video channel by its id +

+
+
+
+ PUT + /video-channels/{id} +
+
+
+
+
+
+
+
+ +
+
+ +

undefined

+ +
+
+
+
+
+
+
id: + + string + + +
+ +
in path
+
+
+

The video channel id or uuid

+
+
+
+
+
+
+
Request Content-Types: + application/json +
+
Request Example
+
{
+  "name": "string",
+  "description": "string"
+}
 
+
+
+
+
+
+
204 No Content
+
+
+

Successful operation

+
+
+
+
+
+
Response Content-Types: + application/json +
+
+
@@ -4358,21 +4723,26 @@
-
+

- - POST - /videos/{id}/abuse - + Delete a video channel by its id

+
+
+
+ DELETE + /video-channels/{id} +
+
+
@@ -4388,7 +4758,7 @@
in path
-

The video id or uuid

+

The video channel id or uuid

@@ -4437,22 +4807,26 @@
-

VideoBlacklist

-
+

- - POST - /videos/{id}/blacklist - + Get videos of a video channel by its id

+
+
+
+ GET + /video-channels/{id}/videos +
+
+
@@ -4468,7 +4842,7 @@
in path
-

The video id or uuid

+

The video channel id or uuid

@@ -4480,10 +4854,16 @@
-
204 No Content
+
200 OK
+
+ + Video + +
+
-

Successful operation

+

successful operation

@@ -4492,52 +4872,84 @@
Response Content-Types: application/json
-
-
-
-
-
- - - - - - - - - - - - - -
- OAuth2 -
+
+
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 - /videos/{id}/blacklist - + Get video channels of an account by its name

+
+
+
+ GET + /accounts/{name}/video-channels +
+
+
-
id: +
name: string @@ -4547,7 +4959,8 @@
in path
-

The video id or uuid

+

The name of the account (chocobozzz or + chocobozzz@peertube.cpy.re for example)

@@ -4559,10 +4972,129 @@
-
204 No Content
+
200 OK
+
+ + VideoChannel + +
+ +
+
+

successful operation

+
+
+
+
type
+
+ + + VideoChannel + + + +
+
+
+
+
+
Response Content-Types: + application/json +
+
+
Response Example + (200 OK) +
+
[
+  {
+    "displayName": "string",
+    "description": "string",
+    "isLocal": "boolean",
+    "ownerAccount": {
+      "id": "number",
+      "uuid": "string"
+    }
+  }
+]
+
+ +
+
+
+
+

User

+
+ + +
+ User + +
+ + +

+ Creates user +

+
+
+
+ POST + /users +
+
+
+
+
+
+
+
+
+ + AddUser + +
+
+
+ +

User to create

+ +
+
+
+
+
+
+
Request Content-Types: + application/json +
+
Request Example
+
{
+  "username": "string",
+  "password": "string",
+  "email": "string",
+  "videoQuota": "string",
+  "role": "string"
+}
+
+ +
+
+
+
+
+
+
+
+
200 OK
+
+ + AddUserResponse + +
+
-

Successful operation

+

successful operation

@@ -4571,6 +5103,17 @@
Response Content-Types: application/json
+
+
Response Example + (200 OK) +
+
{
+  "id": "number",
+  "uuid": "string"
+}
+
+ +
@@ -4588,7 +5131,9 @@ OAuth2 - + + admin + @@ -4596,21 +5141,26 @@
-
+

- - GET - /videos/blacklist - + Get a list of users

+
+
+
+ GET + /users +
+
+
@@ -4668,7 +5218,7 @@
200 OK
@@ -4682,7 +5232,7 @@
- VideoBlacklist + User @@ -4701,17 +5251,41 @@
[
   {
     "id": "number",
-    "videoId": "number",
+    "username": "string",
+    "email": "string",
+    "displayNSFW": "boolean",
+    "autoPlayVideo": "boolean",
+    "role": "string",
+    "videoQuota": "number",
     "createdAt": "string",
-    "updatedAt": "string",
-    "name": "string",
-    "uuid": "string",
-    "description": "string",
-    "duration": "number",
-    "views": "number",
-    "likes": "number",
-    "dislikes": "number",
-    "nsfw": "boolean"
+    "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"
+        }
+      }
+    ]
   }
 ]
 
@@ -4742,174 +5316,47 @@
-

VideoChannel

-
+

- - GET - /video-channels - + Delete a user by its id

-
-
-
-
start: - - number - - -
-
in query
-
-
-

Offset

-
-
-
-
-
count: - - number - - -
-
in query
-
-
-

Number of items

-
-
-
-
-
sort: - - string - - -
-
in query
-
-
-

Sort column (-createdAt for example)

-
-
+
+ DELETE + /users/{id}
-
-
+
-
200 OK
-
- - VideoChannel +
id: + + number +
- -
-
-

successful operation

+ +
in path
-
-
-
type
- - - VideoChannel - - - -
-
-
-
-
-
Response Content-Types: - application/json -
-
-
Response Example - (200 OK) -
-
[
-  {
-    "displayName": "string",
-    "description": "string",
-    "isLocal": "boolean",
-    "ownerAccount": {
-      "id": "number",
-      "uuid": "string"
-    }
-  }
-]
-
- -
-
-
-
-
- - -
- VideoChannel - -
- - -

- - POST - /video-channels - -

-
-
-
-
-
- -
-
- -

undefined

- +

The user id

-
-
-
Request Content-Types: - application/json -
-
Request Example
-
{
-  "name": "string",
-  "description": "string"
-}
-
- -
-
+
@@ -4945,7 +5392,9 @@ OAuth2 - + + admin + @@ -4953,21 +5402,26 @@
-
+

- - GET - /video-channels/{id} - + Get user by its id

+
+
+
+ GET + /users/{id} +
+
+
@@ -4975,7 +5429,7 @@
id: - string + number
@@ -4983,7 +5437,7 @@
in path
-

The video channel id or uuid

+

The user id

@@ -4998,7 +5452,7 @@
200 OK
@@ -5018,35 +5472,91 @@ (200 OK)
{
-  "displayName": "string",
-  "description": "string",
-  "isLocal": "boolean",
-  "ownerAccount": {
+  "id": "number",
+  "username": "string",
+  "email": "string",
+  "displayNSFW": "boolean",
+  "autoPlayVideo": "boolean",
+  "role": "string",
+  "videoQuota": "number",
+  "createdAt": "string",
+  "account": {
+    "displayName": "string",
     "id": "number",
-    "uuid": "string"
-  }
+    "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"
+      }
+    }
+  ]
 }
 
+
+
+
+ + + + + + + + + + + + + +
+ OAuth2 +
+
+
+
-
+

- - PUT - /video-channels/{id} - + Update user profile by its id

+
+
+
+ PUT + /users/{id} +
+
+
@@ -5054,7 +5564,7 @@ @@ -5070,7 +5580,7 @@
id: - string + number
@@ -5078,7 +5588,7 @@
in path
-

The video channel id or uuid

+

The user id

@@ -5090,8 +5600,10 @@
Request Example
{
-  "name": "string",
-  "description": "string"
+  "id": "string",
+  "email": "string",
+  "videoQuota": "string",
+  "role": "string"
 }
 
@@ -5140,41 +5652,28 @@
-
+

- - DELETE - /video-channels/{id} - + Get current user information

-
-
-
-
id: - - string - - -
- -
in path
-
-
-

The video channel id or uuid

-
-
+
+ GET + /users/me
+
+
+
@@ -5182,10 +5681,27 @@
-
204 No Content
+
200 OK
+
+ + User + +
+
-

Successful operation

+

successful operation

+
+
+
+
type
+
+ + + User + + +
@@ -5194,6 +5710,53 @@
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"
+        }
+      }
+    ]
+  }
+]
+
+ +
@@ -5219,154 +5782,126 @@
-
+

- - GET - /video-channels/{id}/videos - + Update current user information

-
-
-
-
id: - - string - - -
- -
in path
-
-
-

The video channel id or uuid

-
-
+
+ PUT + /users/me
-
-
-
+
+
-
200 OK
-
+ -
-
-

successful operation

+
+ +

undefined

+
-
Response Content-Types: - application/json -
-
Response Example - (200 OK) +
Request Content-Types: + application/json
+
Request 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"
-    }
-  }
+  "password": "string",
+  "email": "string",
+  "displayNSFW": "string",
+  "autoPlayVideo": "string"
 }
 
+
+
+
+
+
+
204 No Content
+
+
+

Successful operation

+
+
+
+
+
+
Response Content-Types: + application/json +
+
+
+
+
+
+ + + + + + + + + + + + + +
+ OAuth2 +
+
+
+
-
+

- - GET - /accounts/{name}/video-channels - + Get current user used quota

-
-
-
-
name: - - string - - -
- -
in path
-
-
-

The name of the account (chocobozzz or - chocobozzz@peertube.cpy.re for example)

-
-
+
+ GET + /users/me/video-quota-used
+
+
+
@@ -5375,11 +5910,7 @@
200 OK
-
- - VideoChannel - -
+
@@ -5389,11 +5920,7 @@
type
- - - VideoChannel - - + number
@@ -5407,45 +5934,61 @@
Response Example (200 OK)
-
[
-  {
-    "displayName": "string",
-    "description": "string",
-    "isLocal": "boolean",
-    "ownerAccount": {
-      "id": "number",
-      "uuid": "string"
-    }
-  }
-]
+                  
"number"
 
+
+
+
+ + + + + + + + + + + + + +
+ OAuth2 +
+
+
+
-

VideoComment

-
+

- - GET - /videos/{id}/comment-threads - + Get rating of video by its id, among those of the current user

+
+
+
+ GET + /users/me/videos/{videoId}/rating +
+
+
-
id: +
videoId: string @@ -5455,49 +5998,7 @@
in path
-

The video id or uuid

-
-
-
-
-
start: - - number - - -
-
in query
-
-
-

Offset

-
-
-
-
-
count: - - number - - -
-
in query
-
-
-

Number of items

-
-
-
-
-
sort: - - string - - -
-
in query
-
-
-

Sort column (-createdAt for example)

+

The video id

@@ -5512,7 +6013,7 @@
200 OK
@@ -5532,75 +6033,100 @@ (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"
-        }
-      }
-    }
-  ]
+  "id": "string",
+  "rating": "number"
 }
 
+
+
+
+ + + + + + + + + + + + + +
+ OAuth2 +
+
+
+
-
+

- - POST - /videos/{id}/comment-threads - + Get videos of the current user

+
+
+
+ GET + /users/me/videos +
+
+
-
id: +
start: - string + number
- -
in path
+
in query
+
+
+

Offset

+
+
+
+
+
count: + + number + + +
+
in query
+
+
+

Number of items

+
+
+
+
+
sort: + + string + + +
+
in query
-

The video id or uuid

+

Sort column (-createdAt for example)

@@ -5614,8 +6140,8 @@
200 OK
@@ -5624,6 +6150,17 @@

successful operation

+
+
type
+
+ + + Video + + + +
+
@@ -5634,28 +6171,42 @@
Response Example (200 OK)
-
{
-  "comment": {
+                  
[
+  {
     "id": "number",
-    "url": "string",
-    "text": "string",
-    "threadId": "number",
-    "inReplyToCommentId": "number",
-    "videoId": "number",
+    "uuid": "string",
     "createdAt": "string",
+    "publishedAt": "string",
     "updatedAt": "string",
-    "totalReplies": "number",
+    "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",
-      "id": "number",
-      "uuid": "string",
       "url": "string",
-      "name": "string",
       "host": "string",
-      "followingCount": "number",
-      "followersCount": "number",
-      "createdAt": "string",
-      "updatedAt": "string",
       "avatar": {
         "path": "string",
         "createdAt": "string",
@@ -5663,7 +6214,7 @@
       }
     }
   }
-}
+]
 
@@ -5692,73 +6243,70 @@
-
+

- - GET - /videos/{id}/comment-threads/{threadId} - + Register a user

-
-
-
-
id: - - string - - -
- -
in path
-
-
-

The video id or uuid

-
-
-
+
+ POST + /users/register +
+
+
+
+
+
+
-
threadId: - - number - + - -
in path
-
-

The thread id (root comment id)

+
+ +

undefined

+
-
+
+
+
Request Content-Types: + application/json +
+
Request Example
+
{
+  "username": "string",
+  "password": "string",
+  "email": "string"
+}
+
+ +
+
-
200 OK
- - +
204 No Content
-

successful operation

+

Successful operation

@@ -5767,155 +6315,44 @@
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"
-              }
-            }
-          }
-        }
-      ]
-    }
-  ]
-}
-
- -
-
+

- - POST - /videos/{id}/comments/{commentId} - + Update current user avatar

-
-
-
-
id: - - string - - -
- -
in path
-
-
-

The video id or uuid

-
-
+
+ POST + /users/me/avatar/pick +
+
+
+
+
+
-
threadId: +
avatarfile: - number + file
- -
in path
+
in formData
-

The comment id

+

The file to upload.

@@ -5930,7 +6367,7 @@
200 OK
@@ -5950,34 +6387,9 @@ (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"
-      }
-    }
-  }
+  "path": "string",
+  "createdAt": "string",
+  "updatedAt": "string"
 }
 
@@ -6007,21 +6419,27 @@
-
+

VideoBlacklist

+

- - DELETE - /videos/{id}/comments/{commentId} - + Put on blacklist a video by its id

+
+
+
+ POST + /videos/{id}/blacklist +
+
+
@@ -6040,21 +6458,6 @@

The video id or uuid

-
-
-
threadId: - - number - - -
- -
in path
-
-
-

The comment id

-
-
@@ -6093,7 +6496,10 @@ OAuth2 - + + admin, + moderator + @@ -6101,22 +6507,26 @@
-

VideoRate

-
+

- - PUT - /videos/{id}/rate - + Delete an entry of the blacklist of a video by its id

+
+
+
+ DELETE + /videos/{id}/blacklist +
+
+
@@ -6173,7 +6583,10 @@ OAuth2 - + + admin, + moderator + @@ -6181,22 +6594,26 @@
-

Search

-
+

- - GET - /search/videos - + Get list of videos on blacklist

+
+
+
+ GET + /videos/blacklist +
+
+
@@ -6242,21 +6659,6 @@

Sort column (-createdAt for example)

-
-
-
search: - - string - - -
- -
in query
-
-
-

String to search

-
-
@@ -6269,7 +6671,7 @@
200 OK
@@ -6283,7 +6685,7 @@
- Video + VideoBlacklist @@ -6302,45 +6704,17 @@
[
   {
     "id": "number",
-    "uuid": "string",
+    "videoId": "number",
     "createdAt": "string",
-    "publishedAt": "string",
     "updatedAt": "string",
-    "category": {
-      "id": "number",
-      "label": "string"
-    },
-    "licence": {
-      "id": "number",
-      "label": "string"
-    },
-    "language": {
-      "id": "string",
-      "label": "string"
-    },
-    "privacy": "string",
+    "name": "string",
+    "uuid": "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"
-      }
-    }
+    "nsfw": "boolean"
   }
 ]
 
@@ -6348,13 +6722,122 @@
+
+
+
+ + + + + + + + + + + + + +
+ OAuth2 + + admin, + moderator +
+
+
+
+
+

VideoRate

+
+ + +
+ VideoRate + +
+ + +

+ Vote for a video by its id +

+
+
+
+ PUT + /videos/{id}/rate +
+
+
+
+
+
+
+
+
id: + + string + + +
+ +
in path
+
+
+

The video id or uuid

+
+
+
+
+
+
+
+
+
+
+
+
204 No Content
+
+
+

Successful operation

+
+
+
+
+
+
Response Content-Types: + application/json +
+
+
+
+
+
+ + + + + + + + + + + + + +
+ OAuth2 +
+
+
+

Schema Definitions

VideoConstantNumber: -