Video

Duplicate a video

POST
https://peertube2.cpy.re/api/v1/videos/{id}/duplicate

Create a copy of a local video, in the same channel.

The copy of a blocked video (that only moderators can duplicate) is blocked for the same reason.

Body

application/json
namestring

Name of the copy. Defaults to the name of the source video followed by "(Copy)"

Parameters

idid | UUIDv4 | shortUUIDrequiredpath

The object id, uuid or short uuid

Response

successful operation. Returns the identifiers of the new video

Response fields application/json
videoobject
Show child attributes
idid

object id for the video

Show child attributes
id>= 1
Example
42
uuidUUIDv4

universal identifier for the video, that can be used across instances

Show child attributes
UUIDv4<uuid>
Example
9c9de5e8-0a1e-484a-b099-e80766180a6d
shortUUIDshortUUID
Show child attributes

translation of a uuid v4 with a bigger alphabet to have a shorter uuid

shortUUID
Example
2y84q2MQUMWPbiEcxNXMgC
400Bad Request

incorrect parameters

403Forbidden

the user cannot manage this video, the video is not local, or the video is blocked and the user cannot manage blocks

404Not Found

video not found

409Conflict

video is already being processed

413Payload Too Large

the user video quota is exceeded

Authorization

OAuth2oauth2

Authenticating 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.