All URIs are relative to https://api.mux.com
Method | HTTP request | Description |
---|---|---|
CancelDirectUpload | PUT /video/v1/uploads/{UPLOAD_ID}/cancel | Cancel a direct upload |
CreateDirectUpload | POST /video/v1/uploads | Create a new direct upload URL |
GetDirectUpload | GET /video/v1/uploads/{UPLOAD_ID} | Retrieve a single direct upload's info |
ListDirectUploads | GET /video/v1/uploads | List direct uploads |
UploadResponse CancelDirectUpload (string UPLOAD_ID)
Cancel a direct upload
Cancels a direct upload and marks it as cancelled. If a pending upload finishes after this request, no asset will be created. This request will only succeed if the upload is still in the waiting
state.
using System.Collections.Generic;
using System.Diagnostics;
using Mux.Csharp.Sdk.Api;
using Mux.Csharp.Sdk.Client;
using Mux.Csharp.Sdk.Model;
namespace Example
{
public class CancelDirectUploadExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.mux.com";
// Configure HTTP basic authorization: accessToken
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
var apiInstance = new DirectUploadsApi(config);
var UPLOAD_ID = abcd1234; // string | ID of the Upload
try
{
// Cancel a direct upload
UploadResponse result = apiInstance.CancelDirectUpload(UPLOAD_ID);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DirectUploadsApi.CancelDirectUpload: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
UPLOAD_ID | string | ID of the Upload |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
403 | Cancellation no longer possible | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UploadResponse CreateDirectUpload (CreateUploadRequest createUploadRequest)
Create a new direct upload URL
Creates a new direct upload, through which video content can be uploaded for ingest to Mux.
using System.Collections.Generic;
using System.Diagnostics;
using Mux.Csharp.Sdk.Api;
using Mux.Csharp.Sdk.Client;
using Mux.Csharp.Sdk.Model;
namespace Example
{
public class CreateDirectUploadExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.mux.com";
// Configure HTTP basic authorization: accessToken
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
var apiInstance = new DirectUploadsApi(config);
var createUploadRequest = new CreateUploadRequest(); // CreateUploadRequest |
try
{
// Create a new direct upload URL
UploadResponse result = apiInstance.CreateDirectUpload(createUploadRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DirectUploadsApi.CreateDirectUpload: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
createUploadRequest | CreateUploadRequest |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Created | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UploadResponse GetDirectUpload (string UPLOAD_ID)
Retrieve a single direct upload's info
Fetches information about a single direct upload in the current environment.
using System.Collections.Generic;
using System.Diagnostics;
using Mux.Csharp.Sdk.Api;
using Mux.Csharp.Sdk.Client;
using Mux.Csharp.Sdk.Model;
namespace Example
{
public class GetDirectUploadExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.mux.com";
// Configure HTTP basic authorization: accessToken
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
var apiInstance = new DirectUploadsApi(config);
var UPLOAD_ID = abcd1234; // string | ID of the Upload
try
{
// Retrieve a single direct upload's info
UploadResponse result = apiInstance.GetDirectUpload(UPLOAD_ID);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DirectUploadsApi.GetDirectUpload: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
UPLOAD_ID | string | ID of the Upload |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListUploadsResponse ListDirectUploads (int? limit = null, int? page = null)
List direct uploads
Lists direct uploads in the current environment.
using System.Collections.Generic;
using System.Diagnostics;
using Mux.Csharp.Sdk.Api;
using Mux.Csharp.Sdk.Client;
using Mux.Csharp.Sdk.Model;
namespace Example
{
public class ListDirectUploadsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.mux.com";
// Configure HTTP basic authorization: accessToken
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
var apiInstance = new DirectUploadsApi(config);
var limit = 25; // int? | Number of items to include in the response (optional) (default to 25)
var page = 1; // int? | Offset by this many pages, of the size of `limit` (optional) (default to 1)
try
{
// List direct uploads
ListUploadsResponse result = apiInstance.ListDirectUploads(limit, page);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DirectUploadsApi.ListDirectUploads: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
limit | int? | Number of items to include in the response | [optional] [default to 25] |
page | int? | Offset by this many pages, of the size of `limit` | [optional] [default to 1] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]