User Imports

Initialize the resumable user import

POST
https://peertube2.cpy.re/api/v1/users/{userId}/imports/import-resumable

PeerTube >= 6.1 Uses a resumable protocol to initialize the import of the archive

Body

application/json
filenamestring<filename>

Archive filename including extension

Example
user-export-6-2024-02-09T10_12_11.682Z

Parameters

userIdid>= 1requiredpath

User id

X-Upload-Content-Lengthnumberrequiredheader

Number 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>requiredheader

MIME type of the file that you are uploading. Depending on your instance settings, acceptable values might vary.

Response

201Created

created

Response headers
Locationstring<url>header
Content-Lengthnumberheader

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.