Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Upload track

List upload tracks

Returns

Returns an array of resource objects of type upload_track

Examples

1
import { buildClient } from "@datocms/cma-client-node";
2
3
async function run() {
4
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
5
6
const uploadId = "xBe7u01029ipxBLQhYzZCJ1cke01zCkuUsgnYtH0017nNzbpv2YcsoMDmw";
7
8
const uploadTracks = await client.uploadTracks.list(uploadId);
9
10
for (const uploadTrack of uploadTracks) {
11
// Check the 'Returned output' tab for the result ☝️
12
console.log(uploadTrack);
13
}
14
}
15
16
run();
1
{
2
id: "xBe7u01029ipxBLQhYzZCJ1cke01zCkuUsgnYtH0017nNzbpv2YcsoMDmw",
3
type: "subtitles",
4
name: "Italiano",
5
language_code: "it-IT",
6
closed_captions: false,
7
status: "ready",
8
error: null,
9
upload: { type: "upload", id: "q0VNpiNQSkG6z0lif_O1zg" },
10
}