swagger: '2.0'
info:
title: PeerTube
- version: 0.0.15-alpha
+ version: 1.0.0-alpha
description: Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.
+host: peertube.example.com
+basePath: '/api/v1'
+schemes:
+ - https
paths:
'/accounts/{id}':
get:
required: true
type: string
description: 'The id of the account'
+ - name: start
+ in: query
+ required: false
+ type: number
+ description: 'starting page'
+ - name: stop
+ in: query
+ required: false
+ type: number
+ description: 'stoping page'
+ - name: sort
+ in: query
+ required: false
+ type: number
+ description: 'sorting'
responses:
'200':
description: successful operation
- application/json
produces:
- application/json
+ parameters:
+ - name: state
+ in: path
+ required: true
+ type: string
+ description: 'The id of the account'
+ - name: start
+ in: query
+ required: false
+ type: number
+ description: 'starting page'
+ - name: count
+ in: query
+ required: false
+ type: number
+ description: ''
+ - name: sort
+ in: query
+ required: false
+ type: number
+ description: 'sorting'
responses:
'200':
description: successful operation
- application/json
produces:
- application/json
+ parameters:
+ - name: start
+ in: query
+ required: false
+ type: number
+ description: 'starting page'
+ - name: stop
+ in: query
+ required: false
+ type: number
+ description: 'stoping page'
+ - name: sort
+ in: query
+ required: false
+ type: number
+ description: 'sorting'
responses:
'200':
description: successful operation
- application/json
produces:
- application/json
+ parameters:
+ - name: start
+ in: query
+ required: false
+ type: number
+ description: 'starting page'
+ - name: stop
+ in: query
+ required: false
+ type: number
+ description: 'stoping page'
+ - name: sort
+ in: query
+ required: false
+ type: number
+ description: 'sorting'
responses:
'200':
description: successful operation
- application/json
produces:
- application/json
+ parameters:
+ - name: start
+ in: query
+ required: false
+ type: number
+ description: 'starting page'
+ - name: stop
+ in: query
+ required: false
+ type: number
+ description: 'stoping page'
+ - name: sort
+ in: query
+ required: false
+ type: number
+ description: 'sorting'
responses:
'200':
description: successful operation
- application/json
produces:
- application/json
+ parameters:
+ - name: start
+ in: query
+ required: false
+ type: number
+ description: 'starting page'
+ - name: stop
+ in: query
+ required: false
+ type: number
+ description: 'stoping page'
+ - name: sort
+ in: query
+ required: false
+ type: number
+ description: 'sorting'
responses:
'200':
description: successful operation
description: successful operation
schema:
$ref: '#/definitions/Avatar'
- /video:
+ /videos:
get:
tags:
- Video
- application/json
produces:
- application/json
+ parameters:
+ - name: start
+ in: query
+ required: false
+ type: number
+ description: 'starting page'
+ - name: stop
+ in: query
+ required: false
+ type: number
+ description: 'stoping page'
+ - name: sort
+ in: query
+ required: false
+ type: number
+ description: 'sorting'
responses:
'200':
description: successful operation
type: array
items:
$ref: '#/definitions/Video'
- /video/categories:
+ /videos/categories:
get:
tags:
- Video
type: array
items:
type: string
- /video/licences:
+ /videos/licences:
get:
tags:
- Video
type: array
items:
type: string
- /video/languages:
+ /videos/languages:
get:
tags:
- Video
type: array
items:
type: string
- /video/privacies:
+ /videos/privacies:
get:
tags:
- Video
type: array
items:
type: string
- /video/search:
+ /videos/search:
get:
tags:
- Video
- application/json
produces:
- application/json
+ parameters:
+ - name: start
+ in: query
+ required: false
+ type: number
+ description: 'starting page'
+ - name: stop
+ in: query
+ required: false
+ type: number
+ description: 'stoping page'
+ - name: sort
+ in: query
+ required: false
+ type: number
+ description: 'sorting'
responses:
'200':
description: successful operation
type: array
items:
$ref: '#/definitions/Video'
- "/video/{id}":
+ "/videos/{id}":
put:
tags:
- Video
responses:
'204':
description: successful operation
- "/video/{id}/description":
+ "/videos/{id}/description":
get:
tags:
- Video
description: successful operation
schema:
type: string
- "/video/{id}/views":
+ "/videos/{id}/views":
post:
tags:
- Video
responses:
'204':
description: successful operation
- /video/upload:
+ /videos/upload:
post:
tags:
- Video
description: successful operation
schema:
$ref: '#/definitions/VideoUploadResponse'
- /video/abuse:
+ /videos/abuse:
get:
tags:
- VideoAbuse
- application/json
produces:
- application/json
+ parameters:
+ - name: start
+ in: query
+ required: false
+ type: number
+ description: 'starting page'
+ - name: stop
+ in: query
+ required: false
+ type: number
+ description: 'stoping page'
+ - name: sort
+ in: query
+ required: false
+ type: number
+ description: 'sorting'
responses:
'200':
description: successful operation
type: array
items:
$ref: '#/definitions/VideoAbuse'
- "/video/{id}/abuse":
+ "/videos/{id}/abuse":
post:
tags:
- VideoAbuse
responses:
'204':
description: successful operation
- "/video/{videoId}/blacklist":
+ "/videos/{videoId}/blacklist":
post:
tags:
- VideoBlacklist
responses:
'204':
description: successful operation
- /video/blacklist:
+ /videos/blacklist:
get:
tags:
- VideoBlacklist
- application/json
produces:
- application/json
+ parameters:
+ - name: start
+ in: query
+ required: false
+ type: number
+ description: 'starting page'
+ - name: stop
+ in: query
+ required: false
+ type: number
+ description: 'stoping page'
+ - name: sort
+ in: query
+ required: false
+ type: number
+ description: 'sorting'
responses:
'200':
description: successful operation
type: array
items:
$ref: '#/definitions/VideoBlacklist'
- /video/channels:
+ /videos/channels:
get:
tags:
- VideoChannel
- application/json
produces:
- application/json
+ parameters:
+ - name: start
+ in: query
+ required: false
+ type: number
+ description: 'starting page'
+ - name: stop
+ in: query
+ required: false
+ type: number
+ description: 'stoping page'
+ - name: sort
+ in: query
+ required: false
+ type: number
+ description: 'sorting'
responses:
'200':
description: successful operation
responses:
'204':
description: successful operation
- "/video/channels/{id}":
+ "/videos/channels/{id}":
get:
tags:
- VideoChannel
responses:
'204':
description: successful operation
- /video/accounts/{accountId}/channels:
+ /videos/accounts/{accountId}/channels:
get:
tags:
- VideoChannel
type: array
items:
$ref: '#/definitions/VideoChannel'
- "/video/{videoId}/comment-threads":
+ "/videos/{videoId}/comment-threads":
get:
tags:
- VideoComment
required: true
type: string
description: 'The video id '
+ - name: start
+ in: query
+ required: false
+ type: number
+ description: 'starting page'
+ - name: stop
+ in: query
+ required: false
+ type: number
+ description: 'stoping page'
+ - name: sort
+ in: query
+ required: false
+ type: number
+ description: 'sorting'
responses:
'200':
description: successful operation
schema:
- items:
- type: array
- $ref: '#/definitions/VideoComment'
+ $ref: '#/definitions/CommentThreadResponse'
post:
tags:
- VideoComment
responses:
'200':
description: successful operation
- "/video/{videoId}/comment-threads/{threadId}":
+ schema:
+ $ref: '#/definitions/CommentThreadPostResponse'
+ "/videos/{videoId}/comment-threads/{threadId}":
get:
tags:
- VideoComment
description: successful operation
schema:
$ref: '#/definitions/VideoCommentThreadTree'
- "/video/{videoId}/comments/{commentId}":
+ "/videos/{videoId}/comments/{commentId}":
post:
tags:
- VideoComment
responses:
'200':
description: successful operation
+ schema:
+ $ref: '#/definitions/CommentThreadPostResponse'
delete:
tags:
- VideoComment
responses:
'204':
description: successful operation
- "/video/{id}/rate":
+ "/videos/{id}/rate":
put:
tags:
- VideoRate
type: number
uuid:
type: string
- accountName:
- type: string
createdAt:
type: string
updatedAt:
type: boolean
name:
type: string
- serverHost:
- type: string
thumbnailPath:
type: string
previewPath:
type: number
nsfw:
type: boolean
+ account:
+ name: string
+ displayName: string
+ url: string
+ host: string
+ avatar:
+ $ref: "#/definitions/Avatar"
VideoAbuse:
properties:
id:
type: number
reason:
type: string
- reporterUsername:
- type: string
- reporterServerHost:
- type: string
- videoId:
- type: number
- videoUUID:
- type: string
- videoName:
- type: string
+ reporterAccount:
+ $ref: "#/definitions/Account"
+ video:
+ id: number
+ name: string
+ uuid: string
+ url: string
createdAt:
type: string
VideoBlacklist:
type: number
uuid:
type: string
+ CommentThreadResponse:
+ properties:
+ total:
+ type: number
+ data:
+ type: array
+ items:
+ $ref: "#/definitions/VideoComment"
+ CommentThreadPostResponse:
+ properties:
+ comment:
+ $ref: "#/definitions/VideoComment"
-#input bodies
+#request bodies
AddUser:
properties:
username: