{
"errors": {
- "id": { //
+ "id": {
"value": "a117eb-c6a9-4756-bb09-2a956239f",
"msg": "Should have a valid id",
"param": "id",
tags:
- Accounts
summary: Get an account
+ operationId: getAccount
parameters:
- $ref: '#/components/parameters/name'
responses:
$ref: '#/components/schemas/Account'
'404':
description: account not found
+
'/accounts/{name}/videos':
get:
tags:
- Accounts
- Video
summary: 'List videos of an account'
+ operationId: getAccountVideos
parameters:
- $ref: '#/components/parameters/name'
- $ref: '#/components/parameters/categoryOneOf'
json = r.json()
print(json)
+
/accounts:
get:
tags:
- Accounts
summary: List accounts
+ operationId: getAccounts
parameters:
- $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/count'
type: array
items:
$ref: '#/components/schemas/Account'
+
/config:
get:
tags:
- Config
summary: Get instance public configuration
+ operationId: getConfig
responses:
'200':
description: successful operation
examples:
nightly:
externalValue: https://peertube2.cpy.re/api/v1/config
+
/config/about:
get:
summary: Get instance "About" information
+ operationId: getAbout
tags:
- Config
responses:
examples:
nightly:
externalValue: https://peertube2.cpy.re/api/v1/config/about
+
/config/custom:
get:
summary: Get instance runtime configuration
+ operationId: getCustomConfig
tags:
- Config
security:
$ref: '#/components/schemas/ServerConfigCustom'
put:
summary: Set instance runtime configuration
+ operationId: putCustomConfig
tags:
- Config
security:
- webtorrent and hls are disabled with transcoding enabled - you need at least one enabled
delete:
summary: Delete instance runtime configuration
+ operationId: delCustomConfig
tags:
- Config
security:
responses:
'200':
description: successful operation
+
/jobs/{state}:
get:
summary: List instance jobs
+ operationId: getJobs
security:
- OAuth2:
- admin
type: array
items:
$ref: '#/components/schemas/Follow'
+
'/server/followers/{nameWithHost}':
delete:
summary: Remove or reject a follower to your server
description: successful operation
'404':
description: follower not found
+
'/server/followers/{nameWithHost}/reject':
post:
summary: Reject a pending follower to your server
description: successful operation
'404':
description: follower not found
+
'/server/followers/{nameWithHost}/accept':
post:
summary: Accept a pending follower to your server
type: string
format: hostname
uniqueItems: true
+
'/server/following/{host}':
delete:
summary: Unfollow a server
required: true
get:
summary: List users
+ operationId: getUsers
security:
- OAuth2:
- admin
type: array
items:
$ref: '#/components/schemas/User'
+
'/users/{id}':
parameters:
- $ref: '#/components/parameters/id'
/oauth-clients/local:
get:
summary: Login prerequisite
- description: You need to retrieve a client id and secret before [logging in](#operation/getOauthToken).
+ description: You need to retrieve a client id and secret before [logging in](#operation/getOAuthToken).
operationId: getOAuthClient
tags:
- Session
## AUTH
curl -s "$API/oauth-clients/local"
+
/users/token:
post:
summary: Login
--data username="$USERNAME" \
--data password="$PASSWORD" \
| jq -r ".access_token"
+
/users/revoke-token:
post:
summary: Logout
/users/register:
post:
summary: Register a user
+ operationId: registerUser
tags:
- Users
- Register
schema:
$ref: '#/components/schemas/RegisterUser'
required: true
+
/users/{id}/verify-email:
post:
summary: Verify a user
+ operationId: verifyUser
description: |
Following a user registration, the new user will receive an email asking to click a link
containing a secret.
description: invalid verification string
'404':
description: user not found
+
/users/ask-send-verify-email:
post:
summary: Resend user verification link
+ operationId: resendEmailToVerifyUser
tags:
- Users
- Register
/users/me:
get:
summary: Get my user information
+ operationId: getUserInfo
security:
- OAuth2:
- user
$ref: '#/components/schemas/User'
put:
summary: Update my user information
+ operationId: putUserInfo
security:
- OAuth2:
- user
schema:
$ref: '#/components/schemas/UpdateMe'
required: true
+
/users/me/videos/imports:
get:
summary: Get video imports of my user
application/json:
schema:
$ref: '#/components/schemas/VideoImportsList'
+
/users/me/video-quota-used:
get:
summary: Get my user used quota
type: number
description: The user video quota used today in bytes
example: 1681014151
+
'/users/me/videos/{videoId}/rating':
get:
summary: Get rate of my user for a video
application/json:
schema:
$ref: '#/components/schemas/GetMeVideoRating'
+
/users/me/videos:
get:
summary: Get videos of my user
application/json:
schema:
$ref: '#/components/schemas/VideoListResponse'
+
/users/me/subscriptions:
get:
summary: Get my user subscriptions
responses:
'200':
description: successful operation
+
/users/me/subscriptions/exist:
get:
summary: Get if subscriptions exist for my user
application/json:
schema:
type: object
+
/users/me/subscriptions/videos:
get:
summary: List videos of subscriptions of my user
application/json:
schema:
$ref: '#/components/schemas/VideoListResponse'
+
'/users/me/subscriptions/{subscriptionHandle}':
get:
summary: Get subscription of my user
responses:
'200':
description: successful operation
+
/users/me/notifications:
get:
summary: List my notifications
application/json:
schema:
$ref: '#/components/schemas/NotificationListResponse'
+
/users/me/notifications/read:
post:
summary: Mark notifications as read by their id
responses:
'204':
description: successful operation
+
/users/me/notifications/read-all:
post:
summary: Mark all my notification as read
responses:
'204':
description: successful operation
+
/users/me/notification-settings:
put:
summary: Update my notification settings
responses:
'204':
description: successful operation
+
/users/me/history/videos:
get:
summary: List watched videos history
application/json:
schema:
$ref: '#/components/schemas/VideoListResponse'
+
/users/me/history/videos/remove:
post:
summary: Clear video history
responses:
'204':
description: successful operation
+
/users/me/avatar/pick:
post:
summary: Update my user avatar
encoding:
avatarfile:
contentType: image/png, image/jpeg
+
/users/me/avatar:
delete:
summary: Delete my avatar
responses:
'200':
description: successful operation
+
'/videos/ownership/{id}/accept':
post:
summary: Accept ownership change request
description: cannot terminate an ownership change of another user
'404':
description: video owneship change not found
+
'/videos/ownership/{id}/refuse':
post:
summary: Refuse ownership change request
description: cannot terminate an ownership change of another user
'404':
description: video owneship change not found
+
'/videos/{id}/give-ownership':
post:
summary: Request ownership change
description: changing video ownership to a remote account is not supported yet
'404':
description: video not found
+
/videos:
get:
summary: List videos
application/json:
schema:
$ref: '#/components/schemas/VideoListResponse'
+
/videos/categories:
get:
summary: List available video categories
examples:
nightly:
externalValue: https://peertube2.cpy.re/api/v1/videos/categories
+
/videos/licences:
get:
summary: List available video licences
examples:
nightly:
externalValue: https://peertube2.cpy.re/api/v1/videos/licences
+
/videos/languages:
get:
summary: List available video languages
examples:
nightly:
externalValue: https://peertube2.cpy.re/api/v1/videos/languages
+
/videos/privacies:
get:
summary: List available video privacy policies
examples:
nightly:
externalValue: https://peertube2.cpy.re/api/v1/videos/privacies
+
'/videos/{id}':
put:
summary: Update a video
+ operationId: putVideo
security:
- OAuth2: []
tags:
contentType: image/jpeg
get:
summary: Get a video
+ operationId: getVideo
tags:
- Video
parameters:
$ref: '#/components/schemas/VideoDetails'
delete:
summary: Delete a video
+ operationId: delVideo
security:
- OAuth2: []
tags:
responses:
'204':
description: successful operation
+
'/videos/{id}/description':
get:
summary: Get complete video description
+ operationId: getVideoDesc
tags:
- Video
parameters:
maxLength: 10000
example: |
**[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n**Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**
+
'/videos/{id}/views':
post:
summary: Add a view to a video
responses:
'204':
description: successful operation
+
'/videos/{id}/watching':
put:
summary: Set watching progress of a video
responses:
'204':
description: successful operation
+
/videos/upload:
post:
summary: Upload a video
--form videofile=@"$FILE_PATH" \
--form channelId=$CHANNEL_ID \
--form name="$NAME"
+
/videos/upload-resumable:
post:
summary: Initialize the resumable upload of a video
schema:
type: number
example: 0
+
/videos/imports:
post:
summary: Import a video
type: array
items:
$ref: '#/components/schemas/Abuse'
-
post:
summary: Report an abuse
security:
$ref: '#/components/schemas/id'
'400':
description: incorrect request parameters
+
'/abuses/{abuseId}':
put:
summary: Update an abuse
description: successful operation
'404':
description: block not found
+
'/abuses/{abuseId}/messages':
get:
summary: List messages of an abuse
type: array
items:
$ref: '#/components/schemas/AbuseMessage'
-
post:
summary: Add message to an abuse
security:
description: successful operation
'400':
description: incorrect request parameters
+
'/abuses/{abuseId}/messages/{abuseMessageId}':
delete:
summary: Delete an abuse message
'/videos/{id}/blacklist':
post:
summary: Block a video
+ operationId: addVideoBlock
security:
- OAuth2:
- admin
description: successful operation
delete:
summary: Unblock a video by its id
+ operationId: delVideoBlock
security:
- OAuth2:
- admin
description: successful operation
'404':
description: block not found
+
/videos/blacklist:
get:
tags:
- Video Blocks
summary: List video blocks
+ operationId: getVideoBlocks
security:
- OAuth2:
- admin
type: array
items:
$ref: '#/components/schemas/VideoBlacklist'
+
/videos/{id}/captions:
get:
summary: List captions of a video
+ operationId: getVideoCaptions
tags:
- Video Captions
parameters:
type: array
items:
$ref: '#/components/schemas/VideoCaption'
+
/videos/{id}/captions/{captionLanguage}:
put:
summary: Add or replace a video caption
+ operationId: addVideoCaption
security:
- OAuth2:
- user
description: video or language not found
delete:
summary: Delete a video caption
+ operationId: delVideoCaption
security:
- OAuth2:
- user
description: successful operation
'404':
description: video or language or caption for that language not found
+
/video-channels:
get:
summary: List video channels
$ref: '#/components/schemas/VideoChannelList'
post:
summary: Create a video channel
- operationId: createVideoChannel
+ operationId: addVideoChannel
security:
- OAuth2: []
tags:
application/json:
schema:
$ref: '#/components/schemas/VideoChannelCreate'
+
'/video-channels/{channelHandle}':
get:
summary: Get a video channel
$ref: '#/components/schemas/VideoChannel'
put:
summary: Update a video channel
+ operationId: putVideoChannel
security:
- OAuth2: []
tags:
$ref: '#/components/schemas/VideoChannelUpdate'
delete:
summary: Delete a video channel
+ operationId: delVideoChannel
security:
- OAuth2: []
tags:
responses:
'204':
description: successful operation
+
'/video-channels/{channelHandle}/videos':
get:
summary: List videos of a video channel
+ operationId: getVideoChannelVideos
tags:
- Video
- Video Channels
application/json:
schema:
$ref: '#/components/schemas/VideoListResponse'
+
'/video-channels/{channelHandle}/avatar/pick':
post:
summary: Update channel avatar
encoding:
avatarfile:
contentType: image/png, image/jpeg
+
'/video-channels/{channelHandle}/avatar':
delete:
summary: Delete channel avatar
'204':
description: successful operation
-
'/video-channels/{channelHandle}/banner/pick':
post:
summary: Update channel banner
encoding:
bannerfile:
contentType: image/png, image/jpeg
+
'/video-channels/{channelHandle}/banner':
delete:
summary: Delete channel banner
application/json:
schema:
$ref: '#/components/schemas/VideoChannelList'
+
'/accounts/{name}/ratings':
get:
summary: List ratings of an account
type: array
items:
$ref: '#/components/schemas/VideoRating'
+
'/videos/{id}/comment-threads':
get:
summary: List threads of a video
application/json:
schema:
$ref: '#/components/schemas/VideoCommentThreadTree'
+
'/videos/{id}/comments/{commentId}':
post:
summary: Reply to a thread of a video
maxLength: 10000
required:
- text
-
delete:
summary: Delete a comment or a reply
security:
description: comment or video does not exist
'409':
description: comment is already deleted
+
'/videos/{id}/rate':
put:
summary: Like/dislike a video
description: successful operation
'404':
description: video does not exist
+
/search/videos:
get:
tags:
$ref: '#/components/schemas/VideoListResponse'
'500':
description: search index unavailable
+
/search/video-channels:
get:
tags:
description: successful operation
'409':
description: self-blocking forbidden
+
'/server/blocklist/accounts/{accountName}':
delete:
tags:
description: successful operation
'409':
description: self-blocking forbidden
+
'/server/blocklist/servers/{host}':
delete:
tags:
description: successful operation
'404':
description: server is not already known
+
/server/redundancy/videos:
get:
tags:
description: video does not exist
'409':
description: video is already mirrored
+
/server/redundancy/videos/{redundancyId}:
delete:
tags:
description: video, video channel or account not found
'406':
description: accept header unsupported
+
'/feeds/videos.{format}':
get:
tags:
description: video channel or account not found
'406':
description: accept header unsupported
+
'/feeds/subscriptions.{format}':
get:
tags:
type: object
'406':
description: accept header unsupported
+
/plugins:
get:
tags:
application/json:
schema:
$ref: '#/components/schemas/PluginResponse'
+
/plugins/available:
get:
tags:
$ref: '#/components/schemas/PluginResponse'
'503':
description: plugin index unavailable
+
/plugins/install:
post:
tags:
description: successful operation
'400':
description: should have either `npmName` or `path` set
+
/plugins/update:
post:
tags:
description: should have either `npmName` or `path` set
'404':
description: existing plugin not found
+
/plugins/uninstall:
post:
tags:
description: successful operation
'404':
description: existing plugin not found
+
/plugins/{npmName}:
get:
tags:
$ref: '#/components/schemas/Plugin'
'404':
description: plugin not found
+
/plugins/{npmName}/settings:
put:
tags:
description: successful operation
'404':
description: plugin not found
+
/plugins/{npmName}/public-settings:
get:
tags:
additionalProperties: true
'404':
description: plugin not found
+
/plugins/{npmName}/registered-settings:
get:
tags:
additionalProperties: true
'404':
description: plugin not found
+
servers:
- url: 'https://peertube2.cpy.re/api/v1'
description: Live Test Server (live data - latest nightly version)