All URIs are relative to https://api.mux.com
| Method | HTTP request | Description |
|---|---|---|
| cancel_direct_upload | PUT /video/v1/uploads/{UPLOAD_ID}/cancel | Cancel a direct upload |
| create_direct_upload | POST /video/v1/uploads | Create a new direct upload URL |
| get_direct_upload | GET /video/v1/uploads/{UPLOAD_ID} | Retrieve a single direct upload's info |
| list_direct_uploads | GET /video/v1/uploads | List direct uploads |
UploadResponse cancel_direct_upload(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.
# load the gem
require 'mux_ruby'
# setup authorization
MuxRuby.configure do |config|
# Configure HTTP basic authorization: accessToken
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = MuxRuby::DirectUploadsApi.new
upload_id = 'abcd1234' # String | ID of the Upload
begin
#Cancel a direct upload
result = api_instance.cancel_direct_upload(upload_id)
p result
rescue MuxRuby::ApiError => e
puts "Exception when calling DirectUploadsApi->cancel_direct_upload: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| upload_id | String | ID of the Upload |
- Content-Type: Not defined
- Accept: application/json
UploadResponse create_direct_upload(create_upload_request)
Create a new direct upload URL
# load the gem
require 'mux_ruby'
# setup authorization
MuxRuby.configure do |config|
# Configure HTTP basic authorization: accessToken
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = MuxRuby::DirectUploadsApi.new
create_upload_request = MuxRuby::CreateUploadRequest.new # CreateUploadRequest |
begin
#Create a new direct upload URL
result = api_instance.create_direct_upload(create_upload_request)
p result
rescue MuxRuby::ApiError => e
puts "Exception when calling DirectUploadsApi->create_direct_upload: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| create_upload_request | CreateUploadRequest |
- Content-Type: application/json
- Accept: application/json
UploadResponse get_direct_upload(upload_id)
Retrieve a single direct upload's info
# load the gem
require 'mux_ruby'
# setup authorization
MuxRuby.configure do |config|
# Configure HTTP basic authorization: accessToken
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = MuxRuby::DirectUploadsApi.new
upload_id = 'abcd1234' # String | ID of the Upload
begin
#Retrieve a single direct upload's info
result = api_instance.get_direct_upload(upload_id)
p result
rescue MuxRuby::ApiError => e
puts "Exception when calling DirectUploadsApi->get_direct_upload: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| upload_id | String | ID of the Upload |
- Content-Type: Not defined
- Accept: application/json
ListUploadsResponse list_direct_uploads(opts)
List direct uploads
# load the gem
require 'mux_ruby'
# setup authorization
MuxRuby.configure do |config|
# Configure HTTP basic authorization: accessToken
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = MuxRuby::DirectUploadsApi.new
opts = {
limit: 25, # Integer | Number of items to include in the response
page: 1 # Integer | Offset by this many pages, of the size of `limit`
}
begin
#List direct uploads
result = api_instance.list_direct_uploads(opts)
p result
rescue MuxRuby::ApiError => e
puts "Exception when calling DirectUploadsApi->list_direct_uploads: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| limit | Integer | Number of items to include in the response | [optional] [default to 25] |
| page | Integer | Offset by this many pages, of the size of `limit` | [optional] [default to 1] |
- Content-Type: Not defined
- Accept: application/json