+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/VideoUploadResponse'
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ type: object
+ properties:
+ videofile:
+ description: Video file
+ type: string
+ format: binary
+ channelId:
+ description: Channel id that will contain this video
+ type: number
+ thumbnailfile:
+ description: Video thumbnail file
+ type: string
+ previewfile:
+ description: Video preview file
+ type: string
+ privacy:
+ $ref: '#/components/schemas/VideoPrivacy'
+ category:
+ description: Video category
+ type: string
+ licence:
+ description: Video licence
+ type: string
+ language:
+ description: Video language
+ type: string
+ description:
+ description: Video description
+ type: string
+ waitTranscoding:
+ description: Whether or not we wait transcoding before publish the video
+ type: string
+ support:
+ description: Text describing how to support the video uploader
+ type: string
+ nsfw:
+ description: Whether or not this video contains sensitive content
+ type: string
+ name:
+ description: Video name
+ type: string
+ tags:
+ description: Video tags
+ type: array
+ items:
+ type: string
+ commentsEnabled:
+ description: Enable or disable comments for this video
+ type: string
+ scheduleUpdate: *ref_0
+ required:
+ - videofile
+ - channelId
+ - name
+ x-code-samples:
+ - lang: Shell
+ source: |
+ ## DEPENDENCIES: httpie, jq
+ # pip install httpie
+ USERNAME="<your_username>"
+ PASSWORD="<your_password>"
+ FILE_PATH="<your_file_path>"
+ CHANNEL_ID="<your_channel_id>"
+ NAME="<video_name>"
+
+ API_PATH="https://peertube2.cpy.re/api/v1"
+ ## AUTH
+ client_id=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_id")
+ client_secret=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_secret")
+ token=$(http -b --form POST "$API_PATH/users/token" \
+ client_id="$client_id" client_secret="$client_secret" grant_type=password response_type=code \
+ username=$USERNAME \
+ password=$PASSWORD \
+ | jq -r ".access_token")
+ ## VIDEO UPLOAD
+ http -b --form POST "$API_PATH/videos/upload" \
+ videofile@$FILE_PATH \
+ channelId=$CHANNEL_ID \
+ name=$NAME \
+ "Authorization:Bearer $token"
+ /videos/abuse:
+ get:
+ summary: Get list of reported video abuses
+ security:
+ - OAuth2: []