import { Livepeer } from "livepeer";
const livepeer = new Livepeer({
apiKey: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await livepeer.task.getAll();
// Handle the result
console.log(result);
}
run();[
{
"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"type": "upload",
"createdAt": 1587667174725,
"scheduledAt": 1587667174725,
"inputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"outputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"projectId": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"requesterId": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"params": {
"upload": {
"url": "https://cdn.livepeer.com/ABC123/filename.mp4",
"encryption": "<unknown>",
"c2pa": true,
"profiles": [
{
"bitrate": 3000000,
"width": 1280,
"name": "720p",
"height": 720,
"quality": 23,
"fps": 30,
"fpsDen": 1,
"gop": 2,
"profile": "H264Baseline",
"encoder": "H.264"
}
],
"targetSegmentSizeSecs": 6
},
"export": {
"custom": {
"url": "https://s3.amazonaws.com/my-bucket/path/filename.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=LLMMB",
"method": "POST",
"headers": {}
}
},
"transcode-file": {
"input": {
"url": "https://cdn.livepeer.com/ABC123/filename.mp4"
},
"storage": {
"url": "s3+https://accessKeyId:secretAccessKey@s3Endpoint/bucket"
},
"outputs": {
"hls": {
"path": "/samplevideo/hls"
},
"mp4": {
"path": "/samplevideo/mp4"
}
},
"profiles": [
{
"bitrate": 3000000,
"width": 1280,
"name": "720p",
"height": 720,
"quality": 23,
"fps": 30,
"fpsDen": 1,
"gop": 2,
"profile": "H264Baseline",
"encoder": "H.264"
}
],
"targetSegmentSizeSecs": 10,
"creatorId": {
"type": "unverified",
"value": "<string>"
},
"c2pa": false
},
"clip": {
"url": "https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4",
"clipStrategy": {
"startTime": "<unknown>",
"endTime": "<unknown>",
"playbackId": "<unknown>"
},
"catalystPipelineStrategy": "catalyst_ffmpeg",
"sessionId": "d32ae9e6-c459-4931-9898-e86e2f5e7e16",
"inputId": "09F8B46C-61A0-4254-9875-F71F4C605BC7"
}
},
"output": {
"upload": {},
"export": {},
"exportData": {}
}
}
]import { Livepeer } from "livepeer";
const livepeer = new Livepeer({
apiKey: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await livepeer.task.getAll();
// Handle the result
console.log(result);
}
run();[
{
"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"type": "upload",
"createdAt": 1587667174725,
"scheduledAt": 1587667174725,
"inputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"outputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"projectId": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"requesterId": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"params": {
"upload": {
"url": "https://cdn.livepeer.com/ABC123/filename.mp4",
"encryption": "<unknown>",
"c2pa": true,
"profiles": [
{
"bitrate": 3000000,
"width": 1280,
"name": "720p",
"height": 720,
"quality": 23,
"fps": 30,
"fpsDen": 1,
"gop": 2,
"profile": "H264Baseline",
"encoder": "H.264"
}
],
"targetSegmentSizeSecs": 6
},
"export": {
"custom": {
"url": "https://s3.amazonaws.com/my-bucket/path/filename.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=LLMMB",
"method": "POST",
"headers": {}
}
},
"transcode-file": {
"input": {
"url": "https://cdn.livepeer.com/ABC123/filename.mp4"
},
"storage": {
"url": "s3+https://accessKeyId:secretAccessKey@s3Endpoint/bucket"
},
"outputs": {
"hls": {
"path": "/samplevideo/hls"
},
"mp4": {
"path": "/samplevideo/mp4"
}
},
"profiles": [
{
"bitrate": 3000000,
"width": 1280,
"name": "720p",
"height": 720,
"quality": 23,
"fps": 30,
"fpsDen": 1,
"gop": 2,
"profile": "H264Baseline",
"encoder": "H.264"
}
],
"targetSegmentSizeSecs": 10,
"creatorId": {
"type": "unverified",
"value": "<string>"
},
"c2pa": false
},
"clip": {
"url": "https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4",
"clipStrategy": {
"startTime": "<unknown>",
"endTime": "<unknown>",
"playbackId": "<unknown>"
},
"catalystPipelineStrategy": "catalyst_ffmpeg",
"sessionId": "d32ae9e6-c459-4931-9898-e86e2f5e7e16",
"inputId": "09F8B46C-61A0-4254-9875-F71F4C605BC7"
}
},
"output": {
"upload": {},
"export": {},
"exportData": {}
}
}
]Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Success
Task ID
"09F8B46C-61A0-4254-9875-F71F4C605BC7"
Type of the task
upload, export, export-data, transcode-file, clip "upload"
Timestamp (in milliseconds) at which task was created
1587667174725
Timestamp (in milliseconds) at which the task was scheduled for execution (e.g. after file upload finished).
1587667174725
ID of the input asset
"09F8B46C-61A0-4254-9875-F71F4C605BC7"
ID of the output asset
"09F8B46C-61A0-4254-9875-F71F4C605BC7"
ID of the project
"09F8B46C-61A0-4254-9875-F71F4C605BC7"
ID of the requester hash(IP + SALT + PlaybackId)
"09F8B46C-61A0-4254-9875-F71F4C605BC7"
Parameters of the task
Show child attributes
Status of the task
Show child attributes
Output of the task
Show child attributes
Was this page helpful?