# PeerTube API Reference

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

##### Version: 0.0.15-alpha

# Accounts

Accounts

## GET /accounts/{id}

id

The id of the account

type
string
in
path
200 OK
Account

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"
      }
    }

Accounts

## GET /accounts

200 OK
Account

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

# Config

Config

## GET /config

200 OK
ServerConfig

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

# Job

Job

## GET /jobs

200 OK
Job

successful operation

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

##### Response Example (200 OK)

    [
      {
        "id": "number",
        "state": "string",
        "category": "string",
        "handlerName": "string",
        "handlerInputData": "string",
        "createdAt": "string",
        "updatedAt": "string"
      }
    ]

# ServerFollowing

ServerFollowing

## DELETE /server/following/{host}

host

The host to unfollow

type
string
in
path
201 Created

successful operation

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

ServerFollowing

## GET /server/followers

200 OK
Follow

successful operation

##### 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"
      }
    ]

ServerFollowing

## GET /server/following

200 OK
Follow

successful operation

##### 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"
      }
    ]

ServerFollowing

## POST /server/following

Follow
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"
    }

204 No Content

successful operation

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

# User

User

## POST /users

AddUser
undefined

##### 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"
    }

User

## GET /users

200 OK
User

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",
            "owner": {
              "name": "string",
              "uuid": "string"
            },
            "videos": [
              {
                "id": "number",
                "uuid": "string",
                "accountName": "string",
                "createdAt": "string",
                "updatedAt": "string",
                "categoryLabel": "string",
                "category": "number",
                "licenceLabel": "string",
                "licence": "number",
                "languageLabel": "string",
                "language": "number",
                "description": "string",
                "duration": "number",
                "isLocal": "boolean",
                "name": "string",
                "serverHost": "string",
                "thumbnailPath": "string",
                "previewPath": "string",
                "embedPath": "string",
                "views": "number",
                "likes": "number",
                "dislikes": "number",
                "nsfw": "boolean"
              }
            ]
          }
        ]
      }
    ]

User

## DELETE /users/{id}

id

The user id

type
string
in
path
204 No Content

successful operation

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

User

## GET /users/{id}

id

The user id

type
string
in
path
200 OK
User

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",
          "owner": {
            "name": "string",
            "uuid": "string"
          },
          "videos": [
            {
              "id": "number",
              "uuid": "string",
              "accountName": "string",
              "createdAt": "string",
              "updatedAt": "string",
              "categoryLabel": "string",
              "category": "number",
              "licenceLabel": "string",
              "licence": "number",
              "languageLabel": "string",
              "language": "number",
              "description": "string",
              "duration": "number",
              "isLocal": "boolean",
              "name": "string",
              "serverHost": "string",
              "thumbnailPath": "string",
              "previewPath": "string",
              "embedPath": "string",
              "views": "number",
              "likes": "number",
              "dislikes": "number",
              "nsfw": "boolean"
            }
          ]
        }
      ]
    }

User

## PUT /users/{id}

UpdateUser
undefined
id

The user id

type
string
in
path

##### Request Content-Types: application/json

##### Request Example

    {
      "id": "string",
      "email": "string",
      "videoQuota": "string",
      "role": "string"
    }

204 No Content

successful operation

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

User

## GET /users/me

200 OK
User

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",
            "owner": {
              "name": "string",
              "uuid": "string"
            },
            "videos": [
              {
                "id": "number",
                "uuid": "string",
                "accountName": "string",
                "createdAt": "string",
                "updatedAt": "string",
                "categoryLabel": "string",
                "category": "number",
                "licenceLabel": "string",
                "licence": "number",
                "languageLabel": "string",
                "language": "number",
                "description": "string",
                "duration": "number",
                "isLocal": "boolean",
                "name": "string",
                "serverHost": "string",
                "thumbnailPath": "string",
                "previewPath": "string",
                "embedPath": "string",
                "views": "number",
                "likes": "number",
                "dislikes": "number",
                "nsfw": "boolean"
              }
            ]
          }
        ]
      }
    ]

User

## PUT /users/me

UpdateMe
undefined

##### Request Content-Types: application/json

##### Request Example

    {
      "password": "string",
      "email": "string",
      "displayNSFW": "string",
      "autoPlayVideo": "string"
    }

204 No Content

successful operation

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

User

## GET /users/me/video-quota-used

200 OK

successful operation

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

##### Response Example (200 OK)

    "number"

User

## GET /users/me/videos/{videoId}/rating

videoId

The video id

type
string
in
path
200 OK
GetMeVideoRating

successful operation

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

##### Response Example (200 OK)

    {
      "id": "string",
      "rating": "number"
    }

User

## GET /users/me/videos

200 OK
Video

successful operation

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

##### Response Example (200 OK)

    [
      {
        "id": "number",
        "uuid": "string",
        "accountName": "string",
        "createdAt": "string",
        "updatedAt": "string",
        "categoryLabel": "string",
        "category": "number",
        "licenceLabel": "string",
        "licence": "number",
        "languageLabel": "string",
        "language": "number",
        "description": "string",
        "duration": "number",
        "isLocal": "boolean",
        "name": "string",
        "serverHost": "string",
        "thumbnailPath": "string",
        "previewPath": "string",
        "embedPath": "string",
        "views": "number",
        "likes": "number",
        "dislikes": "number",
        "nsfw": "boolean"
      }
    ]

User

## POST /users/register

RegisterUser
undefined

##### Request Content-Types: application/json

##### Request Example

    {
      "username": "string",
      "password": "string",
      "email": "string"
    }

204 No Content

successful operation

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

User

## POST /users/me/avatar/pick

avatarfile

The file to upload.

type
file
in
formData
200 OK
Avatar

successful operation

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

##### Response Example (200 OK)

    {
      "path": "string",
      "createdAt": "string",
      "updatedAt": "string"
    }

# Video

Video

## GET /video

200 OK
Video

successful operation

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

##### Response Example (200 OK)

    [
      {
        "id": "number",
        "uuid": "string",
        "accountName": "string",
        "createdAt": "string",
        "updatedAt": "string",
        "categoryLabel": "string",
        "category": "number",
        "licenceLabel": "string",
        "licence": "number",
        "languageLabel": "string",
        "language": "number",
        "description": "string",
        "duration": "number",
        "isLocal": "boolean",
        "name": "string",
        "serverHost": "string",
        "thumbnailPath": "string",
        "previewPath": "string",
        "embedPath": "string",
        "views": "number",
        "likes": "number",
        "dislikes": "number",
        "nsfw": "boolean"
      }
    ]

Video

## GET /video/categories

200 OK

successful operation

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

##### Response Example (200 OK)

    [
      "string"
    ]

Video

## GET /video/licences

200 OK

successful operation

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

##### Response Example (200 OK)

    [
      "string"
    ]

Video

## GET /video/languages

200 OK

successful operation

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

##### Response Example (200 OK)

    [
      "string"
    ]

Video

## GET /video/privacies

200 OK

successful operation

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

##### Response Example (200 OK)

    [
      "string"
    ]

Video

## GET /video/search

200 OK
Video

successful operation

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

##### Response Example (200 OK)

    [
      {
        "id": "number",
        "uuid": "string",
        "accountName": "string",
        "createdAt": "string",
        "updatedAt": "string",
        "categoryLabel": "string",
        "category": "number",
        "licenceLabel": "string",
        "licence": "number",
        "languageLabel": "string",
        "language": "number",
        "description": "string",
        "duration": "number",
        "isLocal": "boolean",
        "name": "string",
        "serverHost": "string",
        "thumbnailPath": "string",
        "previewPath": "string",
        "embedPath": "string",
        "views": "number",
        "likes": "number",
        "dislikes": "number",
        "nsfw": "boolean"
      }
    ]

Video

## PUT /video/{id}

id

The video id

type
string
in
path
200 OK
Video

successful operation

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

##### Response Example (200 OK)

    {
      "id": "number",
      "uuid": "string",
      "accountName": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "categoryLabel": "string",
      "category": "number",
      "licenceLabel": "string",
      "licence": "number",
      "languageLabel": "string",
      "language": "number",
      "description": "string",
      "duration": "number",
      "isLocal": "boolean",
      "name": "string",
      "serverHost": "string",
      "thumbnailPath": "string",
      "previewPath": "string",
      "embedPath": "string",
      "views": "number",
      "likes": "number",
      "dislikes": "number",
      "nsfw": "boolean"
    }

Video

## GET /video/{id}

id

The video id

type
string
in
path
200 OK
Video

successful operation

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

##### Response Example (200 OK)

    {
      "id": "number",
      "uuid": "string",
      "accountName": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "categoryLabel": "string",
      "category": "number",
      "licenceLabel": "string",
      "licence": "number",
      "languageLabel": "string",
      "language": "number",
      "description": "string",
      "duration": "number",
      "isLocal": "boolean",
      "name": "string",
      "serverHost": "string",
      "thumbnailPath": "string",
      "previewPath": "string",
      "embedPath": "string",
      "views": "number",
      "likes": "number",
      "dislikes": "number",
      "nsfw": "boolean"
    }

Video

## DELETE /video/{id}

id

The video id

type
string
in
path
204 No Content

successful operation

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

Video

## GET /video/{id}/description

id

The video id

type
string
in
path
200 OK

successful operation

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

##### Response Example (200 OK)

    "string"

Video

## POST /video/{id}/views

id

The video id

type
string
in
path
204 No Content

successful operation

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

Video

## POST /video/upload

videofile

The file to upload.

type
file
in
formData
200 OK
VideoUploadResponse

successful operation

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

##### Response Example (200 OK)

    {
      "id": "number",
      "uuid": "string"
    }

# VideoAbuse

VideoAbuse

## GET /video/abuse

200 OK
VideoAbuse

successful operation

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

##### Response Example (200 OK)

    [
      {
        "id": "number",
        "reason": "string",
        "reporterUsername": "string",
        "reporterServerHost": "string",
        "videoId": "number",
        "videoUUID": "string",
        "videoName": "string",
        "createdAt": "string"
      }
    ]

VideoAbuse

## POST /video/{id}/abuse

id

The video id

type
string
in
path
204 No Content

successful operation

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

# VideoBlacklist

VideoBlacklist

## POST /video/{videoId}/blacklist

videoId

The video id

type
string
in
path
204 No Content

successful operation

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

VideoBlacklist

## DELETE /video/{videoId}/blacklist

videoId

The video id

type
string
in
path
204 No Content

successful operation

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

VideoBlacklist

## GET /video/blacklist

200 OK
VideoBlacklist

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

# VideoChannel

VideoChannel

## GET /video/channels

200 OK
VideoChannel

successful operation

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

##### Response Example (200 OK)

    [
      {
        "displayName": "string",
        "description": "string",
        "isLocal": "boolean",
        "owner": {
          "name": "string",
          "uuid": "string"
        },
        "videos": [
          {
            "id": "number",
            "uuid": "string",
            "accountName": "string",
            "createdAt": "string",
            "updatedAt": "string",
            "categoryLabel": "string",
            "category": "number",
            "licenceLabel": "string",
            "licence": "number",
            "languageLabel": "string",
            "language": "number",
            "description": "string",
            "duration": "number",
            "isLocal": "boolean",
            "name": "string",
            "serverHost": "string",
            "thumbnailPath": "string",
            "previewPath": "string",
            "embedPath": "string",
            "views": "number",
            "likes": "number",
            "dislikes": "number",
            "nsfw": "boolean"
          }
        ]
      }
    ]

VideoChannel

## POST /video/channels

VideoChannelInput
undefined

##### Request Content-Types: application/json

##### Request Example

    {
      "name": "string",
      "description": "string"
    }

204 No Content

successful operation

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

VideoChannel

## GET /video/channels/{id}

id

The video id

type
string
in
path
200 OK
VideoChannel

successful operation

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

##### Response Example (200 OK)

    {
      "displayName": "string",
      "description": "string",
      "isLocal": "boolean",
      "owner": {
        "name": "string",
        "uuid": "string"
      },
      "videos": [
        {
          "id": "number",
          "uuid": "string",
          "accountName": "string",
          "createdAt": "string",
          "updatedAt": "string",
          "categoryLabel": "string",
          "category": "number",
          "licenceLabel": "string",
          "licence": "number",
          "languageLabel": "string",
          "language": "number",
          "description": "string",
          "duration": "number",
          "isLocal": "boolean",
          "name": "string",
          "serverHost": "string",
          "thumbnailPath": "string",
          "previewPath": "string",
          "embedPath": "string",
          "views": "number",
          "likes": "number",
          "dislikes": "number",
          "nsfw": "boolean"
        }
      ]
    }

VideoChannel

## PUT /video/channels/{id}

VideoChannelInput
undefined
id

The video id

type
string
in
path

##### Request Content-Types: application/json

##### Request Example

    {
      "name": "string",
      "description": "string"
    }

204 No Content

successful operation

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

VideoChannel

## DELETE /video/channels/{id}

id

The video id

type
string
in
path
204 No Content

successful operation

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

VideoChannel

## GET /video/accounts/{accountId}/channels

accountId

The account id

type
string
in
path
200 OK
VideoChannel

successful operation

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

##### Response Example (200 OK)

    [
      {
        "displayName": "string",
        "description": "string",
        "isLocal": "boolean",
        "owner": {
          "name": "string",
          "uuid": "string"
        },
        "videos": [
          {
            "id": "number",
            "uuid": "string",
            "accountName": "string",
            "createdAt": "string",
            "updatedAt": "string",
            "categoryLabel": "string",
            "category": "number",
            "licenceLabel": "string",
            "licence": "number",
            "languageLabel": "string",
            "language": "number",
            "description": "string",
            "duration": "number",
            "isLocal": "boolean",
            "name": "string",
            "serverHost": "string",
            "thumbnailPath": "string",
            "previewPath": "string",
            "embedPath": "string",
            "views": "number",
            "likes": "number",
            "dislikes": "number",
            "nsfw": "boolean"
          }
        ]
      }
    ]

# VideoComment

VideoComment

## GET /video/{videoId}/comment-threads

videoId

The video id

type
string
in
path
200 OK
VideoComment

successful operation

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

##### Response Example (200 OK)

VideoComment

## POST /video/{videoId}/comment-threads

videoId

The video id

type
string
in
path
200 OK

successful operation

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

VideoComment

## GET /video/{videoId}/comment-threads/{threadId}

videoId

The video id

type
string
in
path
threadId

The thread id

type
string
in
path
200 OK
VideoCommentThreadTree

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

## POST /video/{videoId}/comments/{commentId}

videoId

The video id

type
string
in
path
commentId

The comment id

type
string
in
path
200 OK

successful operation

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

VideoComment

## DELETE /video/{videoId}/comments/{commentId}

videoId

The video id

type
string
in
path
commentId

The comment id

type
string
in
path
204 No Content

successful operation

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

# VideoRate

VideoRate

## PUT /video/{id}/rate

id

The video id

type
string
in
path
204 No Content

successful operation

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

# Schema Definitions

## Video:

id: number
uuid: string
accountName: string
createdAt: string
updatedAt: string
categoryLabel: string
category: number
licenceLabel: string
licence: number
languageLabel: string
language: number
description: string
duration: number
isLocal: boolean
name: string
serverHost: string
thumbnailPath: string
previewPath: string
embedPath: string
views: number
likes: number
dislikes: number
nsfw: boolean

##### Example

    {
      "id": "number",
      "uuid": "string",
      "accountName": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "categoryLabel": "string",
      "category": "number",
      "licenceLabel": "string",
      "licence": "number",
      "languageLabel": "string",
      "language": "number",
      "description": "string",
      "duration": "number",
      "isLocal": "boolean",
      "name": "string",
      "serverHost": "string",
      "thumbnailPath": "string",
      "previewPath": "string",
      "embedPath": "string",
      "views": "number",
      "likes": "number",
      "dislikes": "number",
      "nsfw": "boolean"
    }

## VideoAbuse:

id: number
reason: string
reporterUsername: string
reporterServerHost: string
videoId: number
videoUUID: string
videoName: string
createdAt: string

##### Example

    {
      "id": "number",
      "reason": "string",
      "reporterUsername": "string",
      "reporterServerHost": "string",
      "videoId": "number",
      "videoUUID": "string",
      "videoName": "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
owner: object
videos: Video

##### Example

    {
      "displayName": "string",
      "description": "string",
      "isLocal": "boolean",
      "owner": {
        "name": "string",
        "uuid": "string"
      },
      "videos": [
        {
          "id": "number",
          "uuid": "string",
          "accountName": "string",
          "createdAt": "string",
          "updatedAt": "string",
          "categoryLabel": "string",
          "category": "number",
          "licenceLabel": "string",
          "licence": "number",
          "languageLabel": "string",
          "language": "number",
          "description": "string",
          "duration": "number",
          "isLocal": "boolean",
          "name": "string",
          "serverHost": "string",
          "thumbnailPath": "string",
          "previewPath": "string",
          "embedPath": "string",
          "views": "number",
          "likes": "number",
          "dislikes": "number",
          "nsfw": "boolean"
        }
      ]
    }

## 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

##### 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:

Actor

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

##### 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",
          "owner": {
            "name": "string",
            "uuid": "string"
          },
          "videos": [
            {
              "id": "number",
              "uuid": "string",
              "accountName": "string",
              "createdAt": "string",
              "updatedAt": "string",
              "categoryLabel": "string",
              "category": "number",
              "licenceLabel": "string",
              "licence": "number",
              "languageLabel": "string",
              "language": "number",
              "description": "string",
              "duration": "number",
              "isLocal": "boolean",
              "name": "string",
              "serverHost": "string",
              "thumbnailPath": "string",
              "previewPath": "string",
              "embedPath": "string",
              "views": "number",
              "likes": "number",
              "dislikes": "number",
              "nsfw": "boolean"
            }
          ]
        }
      ]
    }

## ServerConfig:

signup: object
transcoding: object
avatar: object
video: object

##### Example

    {
      "signup": {
        "allowed": "boolean"
      },
      "transcoding": {
        "enabledResolutions": [
          "number"
        ]
      },
      "avatar": {
        "file": {
          "size": {
            "max": "number"
          }
        },
        "extensions": [
          "string"
        ]
      },
      "video": {
        "file": {
          "extensions": [
            "string"
          ]
        }
      }
    }

## Follow:

id: number
follower: Actor
following: Actor
score: number
state: string pending, accepted
createdAt: string
updatedAt: string

##### 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"
    }

## AddUserResponse:

id: number
uuid: string

##### Example

    {
      "id": "number",
      "uuid": "string"
    }

## VideoUploadResponse:

id: number
uuid: string

##### Example

    {
      "id": "number",
      "uuid": "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"
    }

## VideoChannelInput:

name: string
description: string

##### Example

    {
      "name": "string",
      "description": "string"
    }

Documentation by Spectacle