- get - Get a media by ID
- update - Update a media by ID
- delete - Delete a media by ID
- addTrack - Add audio / subtitle track
- cancelUpload - Cancel ongoing upload
- updateTrack - Update audio / subtitle track
- generateSubtitleTrack - Generate track subtitle
- getSummary - Get the summary of a video
- updateMp4Support - Update the mp4Support of a media by ID
- retrieveMediaInputInfo - Get info of media inputs
- listUploads - Get all unused upload URLs
By calling this endpoint, you can retrieve detailed information about a specific media item, including its current status and a playbackId. This is particularly useful for retrieving specific media details when managing large content libraries.
-
Send a GET request to this endpoint. Use the
<mediaId>you received after uploading the media file. -
The response includes details about the media:
- status – Indicates whether the media is still Processing or has transitioned to Ready.
- playbackId – A unique identifier that allows you to stream the media once it is Ready.
You can construct the stream URL as follows:
https://stream.fastpix.io/<playbackId>.m3u8
If your platform provides users with a dashboard to manage uploaded content, a user might want to check whether a video has finished processing and is ready for playback. You can use the media ID to retrieve the information from FastPix and display it in the user’s dashboard.
import { Fastpix } from "@fastpix/fastpix-node";
const fastpix = new Fastpix({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const result = await fastpix.manageVideos.get({
mediaId: "your-media-id",
});
console.log(result);
}
run();The standalone function version of this method:
import { FastpixCore } from "@fastpix/fastpix-node/core.js";
import { manageVideosGet } from "@fastpix/fastpix-node/funcs/manageVideosGet.js";
// Use `FastpixCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const fastpix = new FastpixCore({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const res = await manageVideosGet(fastpix, {
mediaId: "your-media-id",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("manageVideosGet failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetMediaRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.GetMediaResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.FastpixDefaultError | 4XX, 5XX | */* |
This endpoint allows you to update specific parameters of an existing media file. You can modify the key-value pairs of the metadata that were provided in the payload during the creation of media from a URL or when uploading the media directly from device.
-
Make a PATCH request to this endpoint. Replace
<mediaId>with the unique ID (uploadIdorid) of the media you received after uploading to FastPix -
Include the updated parameters in the request body.
-
The response returns the updated media data, confirming the changes.
-
Monitor the video.media.updated webhook event to track the update status in your system.
If a user uploads a video and later needs to change the title, add a new description, or update tags, you can use this endpoint to update the media metadata without re-uploading the entire video.
import { Fastpix } from "@fastpix/fastpix-node";
const fastpix = new Fastpix({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const result = await fastpix.manageVideos.update({
mediaId: "your-media-id",
body: {
metadata: {
"user": "fastpix_admin",
},
title: "test title",
},
});
console.log(result);
}
run();The standalone function version of this method:
import { FastpixCore } from "@fastpix/fastpix-node/core.js";
import { manageVideosUpdate } from "@fastpix/fastpix-node/funcs/manageVideosUpdate.js";
// Use `FastpixCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const fastpix = new FastpixCore({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const res = await manageVideosUpdate(fastpix, {
mediaId: "your-media-id",
body: {
metadata: {
"user": "fastpix_admin",
},
title: "test title",
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("manageVideosUpdate failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.UpdatedMediaRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.UpdatedMediaResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.FastpixDefaultError | 4XX, 5XX | */* |
This endpoint allows you to permanently delete a a specific video or audio media file along with all associated data. If you wish to remove a media from FastPix storage, use this endpoint with the mediaId (either uploadId or id) received during the media's creation or upload.
-
Send a DELETE request to this endpoint. Replace
<mediaId>with theuploadIdor theidof the media you want to delete. -
This action is irreversible. Make sure you no longer need the media before proceeding. Once deleted, the media can’t be retrieved or played back.
-
Monitor the following webhook event: video.media.deleted
A user on a video-sharing platform decides to remove an old video from their profile, or suppose you're running a content moderation system, and one of the videos uploaded by a user violates your platform's policies. Using this endpoint, the media is permanently deleted from your library, ensuring it's no longer accessible or viewable by other users.
import { Fastpix } from "@fastpix/fastpix-node";
const fastpix = new Fastpix({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const result = await fastpix.manageVideos.delete({
mediaId: "your-media-id",
});
console.log(result);
}
run();The standalone function version of this method:
import { FastpixCore } from "@fastpix/fastpix-node/core.js";
import { manageVideosDelete } from "@fastpix/fastpix-node/funcs/manageVideosDelete.js";
// Use `FastpixCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const fastpix = new FastpixCore({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const res = await manageVideosDelete(fastpix, {
mediaId: "your-media-id",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("manageVideosDelete failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.DeleteMediaRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.DeleteMediaResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.FastpixDefaultError | 4XX, 5XX | */* |
This endpoint allows you to add an audio or subtitle track to an existing media file using its mediaId. You need to provide the track url along with its type (audio or subtitle), languageName and languageCode in the request payload.
-
Send a POST request to this endpoint, replacing
{mediaId}with the media ID (uploadIdorid). -
Provide the necessary details in the request body.
-
Receive a response containing a unique track ID and the details of the newly added track.
-
After successfully adding a track, your system must receive the webhook event video.media.track.created.
-
Once the track is processed and ready, you must receive the webhook event video.media.track.ready.
-
Finally, an update event video.media.updated must notify your system about the media's updated status.
Suppose you have a video uploaded to the FastPix platform, and you want to add an Italian audio track to it. By calling this API, you can attach an external audio file (https://static.fastpix.io/music-1.mp3) to the media file. Similarly, if you need to add subtitles in different languages, you can specify type: subtitle with the corresponding subtitle url, languageCode and languageName.
Related guides: Add own subtitle tracks, Add own audio tracks
import { Fastpix } from "@fastpix/fastpix-node";
const fastpix = new Fastpix({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const result = await fastpix.manageVideos.addTrack({
mediaId: "your-media-id",
body: {
tracks: {},
},
});
console.log(result);
}
run();The standalone function version of this method:
import { FastpixCore } from "@fastpix/fastpix-node/core.js";
import { manageVideosAddTrack } from "@fastpix/fastpix-node/funcs/manageVideosAddTrack.js";
// Use `FastpixCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const fastpix = new FastpixCore({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const res = await manageVideosAddTrack(fastpix, {
mediaId: "your-media-id",
body: {
tracks: {},
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("manageVideosAddTrack failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.AddMediaTrackRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.AddMediaTrackResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.FastpixDefaultError | 4XX, 5XX | */* |
This endpoint allows you to cancel ongoing upload by its uploadId. Once cancelled, the upload is marked as cancelled. Use this if a user aborts an upload or if you want to programmatically stop an in-progress upload.
- Make a PUT request to this endpoint, replacing
{uploadId}with the unique upload ID received after starting the upload. - The response confirms the cancellation and provide the status of the upload.
Once the upload is cancelled, you must receive the webhook event video.media.upload.cancelled.
Suppose a user starts uploading a large video file but decides to cancel before completion. By calling this API, you can immediately stop the upload and free up resources.
import { Fastpix } from "@fastpix/fastpix-node";
const fastpix = new Fastpix({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const result = await fastpix.manageVideos.cancelUpload({
uploadId: "your-upload-id",
});
console.log(result);
}
run();The standalone function version of this method:
import { FastpixCore } from "@fastpix/fastpix-node/core.js";
import { manageVideosCancelUpload } from "@fastpix/fastpix-node/funcs/manageVideosCancelUpload.js";
// Use `FastpixCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const fastpix = new FastpixCore({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const res = await manageVideosCancelUpload(fastpix, {
uploadId: "your-upload-id",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("manageVideosCancelUpload failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.CancelUploadRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.CancelUploadResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.FastpixDefaultError | 4XX, 5XX | */* |
This endpoint allows you to update an existing audio or subtitle track associated with a media file. When updating a track, you must provide the new track url, languageName, and languageCode, ensuring all three parameters are included in the request.
-
Send a PATCH request to this endpoint, replacing
{mediaId}with the media ID, and{trackId}with the ID of the track you want to update. -
Provide the necessary details in the request body.
-
Receive a response confirming the track update.
After updating a track, your system must receive webhook notifications:
-
After successfully updating a track, your system must receive the webhook event video.media.track.updated.
-
Once the new track is processed and ready, you must receive the webhook event video.media.track.ready.
-
Once the media file is updated with the new track details, a video.media.updated event must be triggered.
Suppose you previously added a French subtitle track to a video but now need to update it with a different file. By calling this API, you can replace the existing subtitle file (.vtt) with a new one while keeping the same track ID. This is useful when:
- The original track file has errors and needs correction.
- You want to improve subtitle translations or replace an audio track with a better-quality version.
Related guides: Add own subtitle tracks, Add own audio tracks
import { Fastpix } from "@fastpix/fastpix-node";
const fastpix = new Fastpix({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const result = await fastpix.manageVideos.updateTrack({
trackId: "your-track-id",
mediaId: "your-media-id",
body: {
languageName: "french",
},
});
console.log(result);
}
run();The standalone function version of this method:
import { FastpixCore } from "@fastpix/fastpix-node/core.js";
import { manageVideosUpdateTrack } from "@fastpix/fastpix-node/funcs/manageVideosUpdateTrack.js";
// Use `FastpixCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const fastpix = new FastpixCore({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const res = await manageVideosUpdateTrack(fastpix, {
trackId: "your-track-id",
mediaId: "your-media-id",
body: {
languageName: "french",
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("manageVideosUpdateTrack failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.UpdateMediaTrackRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.UpdateMediaTrackResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.FastpixDefaultError | 4XX, 5XX | */* |
This endpoint allows you to generate subtitles for an existing audio track in a media file. By calling this API, you can generate subtitles automatically using speech recognition
-
Send a
POSTrequest to this endpoint, replacing{mediaId}with the media ID and{trackId}with the track ID. -
Provide the necessary details in the request body, including the languageName and languageCode.
-
You receive a response containing a unique subtitle track ID and its details.
-
After the subtitle track is generated and ready, you receive the webhook event video.media.subtitle.generated.ready.
-
Finally the video.media.updated event notifies your system about the media’s updated status.
Related guide: Add auto-generated subtitles
import { Fastpix } from "@fastpix/fastpix-node";
const fastpix = new Fastpix({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const result = await fastpix.manageVideos.generateSubtitleTrack({
mediaId: "your-media-id",
trackId: "your-track-id",
body: {
languageName: "Italian",
},
});
console.log(result);
}
run();The standalone function version of this method:
import { FastpixCore } from "@fastpix/fastpix-node/core.js";
import { manageVideosGenerateSubtitleTrack } from "@fastpix/fastpix-node/funcs/manageVideosGenerateSubtitleTrack.js";
// Use `FastpixCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const fastpix = new FastpixCore({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const res = await manageVideosGenerateSubtitleTrack(fastpix, {
mediaId: "your-media-id",
trackId: "your-track-id",
body: {
languageName: "Italian",
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("manageVideosGenerateSubtitleTrack failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GenerateSubtitleTrackRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.GenerateSubtitleTrackResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.FastpixDefaultError | 4XX, 5XX | */* |
This endpoint returns the generated summary of a video.
The summary is created using the InVideo Summary feature, which processes the video content and produces a textual summary.
To use this endpoint, you must first generate the video summary using the Generate Video Summary endpoint. This endpoint can return the summary only after that process is complete.
Typical use cases include:
- Providing viewers with a quick preview of the video's main content.
- Enabling search or recommendation systems to surface summarized insights.
- Supporting accessibility and content discovery without requiring users to watch the full video.
If the summary has not been generated or the feature is disabled for the requested media, the endpoint returns an error indicating that the summary is unavailable.
import { Fastpix } from "@fastpix/fastpix-node";
const fastpix = new Fastpix({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const result = await fastpix.manageVideos.getSummary({
mediaId: "your-media-id",
});
console.log(result);
}
run();The standalone function version of this method:
import { FastpixCore } from "@fastpix/fastpix-node/core.js";
import { manageVideosGetSummary } from "@fastpix/fastpix-node/funcs/manageVideosGetSummary.js";
// Use `FastpixCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const fastpix = new FastpixCore({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const res = await manageVideosGetSummary(fastpix, {
mediaId: "your-media-id",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("manageVideosGetSummary failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetMediaSummaryRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.GetMediaSummaryResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.FastpixDefaultError | 4XX, 5XX | */* |
This endpoint allows you to update the mp4Support setting of an existing media file using its media ID. You can specify the MP4 support level, such as none, capped_4k, audioOnly, or a combination of audioOnly, capped_4k, in the request payload.
-
Send a PATCH request to this endpoint, replacing
{mediaId}with the media ID. -
Provide the desired
mp4Supportvalue in the request body. -
You receive a response confirming the update, including the media’s updated MP4 support status.
-
none– MP4 support is disabled for this media. -
capped_4k– Generates MP4 renditions up to 4K resolution. -
audioOnly– Generates an M4A file that contains only the audio track. -
audioOnly,capped_4k– Generates both an audio-only M4A file and MP4 renditions up to 4K resolution.
- video.media.mp4Support.ready – Triggered when the MP4 support setting is successfully updated.
Suppose you have a video uploaded to the FastPix platform, and you want to allow users to download the video in MP4 format. By setting "mp4Support": "capped_4k", the system generates an MP4 rendition of the video up to 4K resolution, making it available for download through the stream URL(https://stream.fastpix.io/{playbackId}/{capped-4k.mp4 | audio.m4a}). If you want users to stream only the audio from the media file, you can set "mp4Support": "audioOnly". This provides an audio-only stream URL that allows users to listen to the media without video. By setting "mp4Support": "audioOnly,capped_4k", both options are enabled. Users can download the MP4 video and also stream just the audio version of the media.
Related guide: Use MP4 support for offline viewing
import { Fastpix } from "@fastpix/fastpix-node";
const fastpix = new Fastpix({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const result = await fastpix.manageVideos.updateMp4Support({
mediaId: "your-media-id",
body: {},
});
console.log(result);
}
run();The standalone function version of this method:
import { FastpixCore } from "@fastpix/fastpix-node/core.js";
import { manageVideosUpdateMp4Support } from "@fastpix/fastpix-node/funcs/manageVideosUpdateMp4Support.js";
// Use `FastpixCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const fastpix = new FastpixCore({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const res = await manageVideosUpdateMp4Support(fastpix, {
mediaId: "your-media-id",
body: {},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("manageVideosUpdateMp4Support failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.UpdatedMp4SupportRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.UpdatedMp4SupportResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.FastpixDefaultError | 4XX, 5XX | */* |
This endpoint lets you retrieve detailed information about the media inputs associated with a specific media item. You can use it to verify the media file’s input URL, track its creation status, and check its container format. You must provide the mediaId (either the uploadId or the id) to fetch this information.
Upon making a GET request with the mediaId, FastPix returns a response with:
-
The public storage input
urlof the uploaded media file. -
Information about the media’s video and audio tracks, including whether they were successfully created.
-
The container format of the uploaded media file (for example, MP4, MKV).
This endpoint is particularly useful for ensuring that all necessary tracks (video and audio) have been correctly associated with the media during the upload or media creation process.
import { Fastpix } from "@fastpix/fastpix-node";
const fastpix = new Fastpix({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const result = await fastpix.manageVideos.retrieveMediaInputInfo({
mediaId: "your-media-id",
});
console.log(result);
}
run();The standalone function version of this method:
import { FastpixCore } from "@fastpix/fastpix-node/core.js";
import { manageVideosRetrieveMediaInputInfo } from "@fastpix/fastpix-node/funcs/manageVideosRetrieveMediaInputInfo.js";
// Use `FastpixCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const fastpix = new FastpixCore({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const res = await manageVideosRetrieveMediaInputInfo(fastpix, {
mediaId: "your-media-id",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("manageVideosRetrieveMediaInputInfo failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.RetrieveMediaInputInfoRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.RetrieveMediaInputInfoResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.FastpixDefaultError | 4XX, 5XX | */* |
This endpoint retrieves a paginated list of all unused upload signed URLs within your organization. It provides comprehensive metadata including upload IDs, creation dates, status, and URLs, helping you manage your media resources efficiently.
An unused upload URL is a signed URL that gets generated when an user initiates upload but never completed the upload process. This can happen due to reasons like network issues, manual cancellation of upload, browser/app crashes or session timeouts.These URLs remain in the system as "unused" since they were created but never resulted in a successful media file upload.
- The endpoint returns metadata for all unused upload URLs in your organization's library.
- Results are paginated to manage large datasets effectively.
- Signed URLs expire after 24 hours from creation.
- Each entry includes full metadata about the unused upload.
A video management team at a media organization regularly uploads content but often forgets to delete or use unused uploads. These unused uploads have signed URLs that expire after 24 hours and need to be managed efficiently. By using this API, the team can retrieve metadata for all unused uploads, identify expired signed URLs, and decide whether to regenerate URLs, reuse the uploads, or delete them.
import { Fastpix } from "@fastpix/fastpix-node";
const fastpix = new Fastpix({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const result = await fastpix.manageVideos.listUploads({
limit: 20,
});
console.log(result);
}
run();The standalone function version of this method:
import { FastpixCore } from "@fastpix/fastpix-node/core.js";
import { manageVideosListUploads } from "@fastpix/fastpix-node/funcs/manageVideosListUploads.js";
// Use `FastpixCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const fastpix = new FastpixCore({
security: {
username: "your-access-token",
password: "your-secret-key",
},
});
async function run() {
const res = await manageVideosListUploads(fastpix, {
limit: 20,
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("manageVideosListUploads failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.ListUploadsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.ListUploadsResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.FastpixDefaultError | 4XX, 5XX | */* |