Video Upload
Initialize the resumable replacement of a video
POST
PeerTube >= 6.0 Uses a resumable protocol to initialize the replacement of a video
Body
application/json
filenamestring<filename>Video filename including extension
Example
what_is_peertube.mp4Parameters
idid | UUIDv4 | shortUUIDrequiredpathThe object id, uuid or short uuid
X-Upload-Content-LengthnumberrequiredheaderNumber of bytes that will be uploaded in subsequent requests. Set this value to the size of the file you are uploading.
X-Upload-Content-Typestring<mimetype>requiredheaderMIME type of the file that you are uploading. Depending on your instance settings, acceptable values might vary.
Response
200OK
file already exists, send a resume request instead
201Created
created
413Payload Too Large
Disambiguate via code:
max_file_size_reachedfor the absolute file size limitquota_reachedfor quota limits whether daily or global
415Unsupported Media Type
video type unsupported
Authorization
OAuth2oauth2Authenticating via OAuth requires the following steps:
- Have an activated account
- Generate an access token for that account at
/api/v1/users/token. - Make requests with the Authorization: Bearer <token> header
- Profit, depending on the role assigned to the account
Note that the access token is valid for 1 day and is given along with a refresh token valid for 2 weeks.