Create a video upload URL
https://octopus.livepush.io/streams/{stream_id}/videos/uploadurl
Base URL https://octopus.livepush.io — Core Streams & Media APIs
Returns a URL to upload a video file to. Use this for a single-request upload; for large files use the multipart flow instead.
The response tells you how to upload via uploadType: direct is a plain PUT to uploadUrl, formdata posts the file with the fields in uploadCredentials. Keep id and Key — registering the video afterwards needs them.
Requires a token with the streams.videos.write scope.
Authorization
Send a valid access token in the Authorization header.
bearerAuth— Bearer token (JWT)
Authorization: Bearer YOUR_API_TOKEN
Try it
Loading the request builder…
POST
https://octopus.livepush.io/streams/{stream_id}/videos/uploadurl
— This call changes live data on your account.
Parameters
Path parameters
-
stream_idstring requiredUnique identifier of the stream.example: st_xxxxxxxxxxxxx
Request body
-
typestring requiredMIME type of the file. -
sizeinteger requiredFile size in bytes. -
originalFilenamestring required -
zonestring requiredStorage zone to upload into. -
partNumberintegerOnly used by the signed single-part variant.
{
"type": "video/mp4",
"size": 734003200,
"originalFilename": "service-12-jan.mp4",
"zone": "eu-central",
"partNumber": 0
}
Code samples
curl -X POST 'https://octopus.livepush.io/streams/st_xxxxxxxxxxxxx/videos/uploadurl' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"type": "video/mp4",
"size": 734003200,
"originalFilename": "service-12-jan.mp4",
"zone": "eu-central",
"partNumber": 0
}'
const response = await fetch('https://octopus.livepush.io/streams/st_xxxxxxxxxxxxx/videos/uploadurl', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"type": "video/mp4",
"size": 734003200,
"originalFilename": "service-12-jan.mp4",
"zone": "eu-central",
"partNumber": 0
}),
});
if (!response.ok) {
throw new Error(`Livepush API error ${response.status}`);
}
const data = await response.json();
import requests
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
}
payload = {
"type": "video/mp4",
"size": 734003200,
"originalFilename": "service-12-jan.mp4",
"zone": "eu-central",
"partNumber": 0
}
response = requests.post('https://octopus.livepush.io/streams/st_xxxxxxxxxxxxx/videos/uploadurl', headers=headers, json=payload, timeout=30)
response.raise_for_status()
data = response.json()
Responses
Create a video upload URL.
-
idstringVideo ID allocated for this upload. -
KeystringObject key the file will be written to. -
uploadUrlstringURL to send the file to. -
uploadTypestringHow to perform the upload.directis a plain PUT touploadUrl;formdataposts the file with the fields inuploadCredentials;multipartuses the multipart endpoints.directformdatamultipart -
uploadCredentialsVideoUploadCredentialsVendor-specific credentials the client needs to perform the upload. The shape depends onuploadType: multipart uploads receive pool and chunking parameters,formdatauploads receive the signed form fields to post alongside the file, anddirectuploads receive nothing — everything is carried inuploadUrl.-
bucketNamestring -
regionstring -
poolIdstringIdentity pool used to authorise the multipart upload. -
concurrencyintegerHow many parts the client should upload in parallel. -
chunkSizeintegerPart size in bytes. -
keyPrefixstring -
useAccelerateEndpointboolean
-
-
zonestringStorage zone the object is being written to.
{
"id": "vd_xxxxxxxxxxxx",
"Key": "string",
"uploadUrl": "string",
"uploadType": "direct",
"uploadCredentials": {
"bucketName": "string",
"region": "eu-west-1",
"poolId": "string",
"concurrency": 4,
"chunkSize": 8388608,
"keyPrefix": "string",
"useAccelerateEndpoint": false
},
"zone": "zn_35hk0gxy_pr"
}
No response body.
Not found for this account.