# PulpcoreClient::UploadsApi All URIs are relative to *http://localhost:24817* Method | HTTP request | Description ------------- | ------------- | ------------- [**commit**](UploadsApi.md#commit) | **PUT** {upload_href}commit/ | Finish an Upload [**create**](UploadsApi.md#create) | **POST** /pulp/api/v3/uploads/ | Create an upload [**delete**](UploadsApi.md#delete) | **DELETE** {upload_href} | Delete an upload [**list**](UploadsApi.md#list) | **GET** /pulp/api/v3/uploads/ | List uploads [**read**](UploadsApi.md#read) | **GET** {upload_href} | Inspect an upload [**update**](UploadsApi.md#update) | **PUT** {upload_href} | Upload a file chunk ## commit > Upload commit(upload_href, data) Finish an Upload Commit the upload and mark it as completed. ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: Basic config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::UploadsApi.new upload_href = 'upload_href_example' # String | URI of Upload. e.g.: /pulp/api/v3/uploads/1/ data = PulpcoreClient::UploadCommit.new # UploadCommit | begin #Finish an Upload result = api_instance.commit(upload_href, data) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling UploadsApi->commit: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **upload_href** | **String**| URI of Upload. e.g.: /pulp/api/v3/uploads/1/ | **data** | [**UploadCommit**](UploadCommit.md)| | ### Return type [**Upload**](Upload.md) ### Authorization [Basic](../README.md#Basic) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## create > Upload create(data) Create an upload View for chunked uploads. ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: Basic config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::UploadsApi.new data = PulpcoreClient::Upload.new # Upload | begin #Create an upload result = api_instance.create(data) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling UploadsApi->create: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **data** | [**Upload**](Upload.md)| | ### Return type [**Upload**](Upload.md) ### Authorization [Basic](../README.md#Basic) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## delete > delete(upload_href) Delete an upload View for chunked uploads. ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: Basic config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::UploadsApi.new upload_href = 'upload_href_example' # String | URI of Upload. e.g.: /pulp/api/v3/uploads/1/ begin #Delete an upload api_instance.delete(upload_href) rescue PulpcoreClient::ApiError => e puts "Exception when calling UploadsApi->delete: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **upload_href** | **String**| URI of Upload. e.g.: /pulp/api/v3/uploads/1/ | ### Return type nil (empty response body) ### Authorization [Basic](../README.md#Basic) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined ## list > InlineResponse2004 list(opts) List uploads View for chunked uploads. ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: Basic config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::UploadsApi.new opts = { completed__lt: 'completed__lt_example', # String | Filter results where completed is less than value completed__lte: 'completed__lte_example', # String | Filter results where completed is less than or equal to value completed__gt: 'completed__gt_example', # String | Filter results where completed is greater than value completed__gte: 'completed__gte_example', # String | Filter results where completed is greater than or equal to value completed__range: 'completed__range_example', # String | Filter results where completed is between two comma separated values completed__isnull: 'completed__isnull_example', # String | Filter results where completed has a null value completed: 'completed_example', # String | ISO 8601 formatted dates are supported page: 56, # Integer | A page number within the paginated result set. page_size: 56 # Integer | Number of results to return per page. } begin #List uploads result = api_instance.list(opts) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling UploadsApi->list: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **completed__lt** | **String**| Filter results where completed is less than value | [optional] **completed__lte** | **String**| Filter results where completed is less than or equal to value | [optional] **completed__gt** | **String**| Filter results where completed is greater than value | [optional] **completed__gte** | **String**| Filter results where completed is greater than or equal to value | [optional] **completed__range** | **String**| Filter results where completed is between two comma separated values | [optional] **completed__isnull** | **String**| Filter results where completed has a null value | [optional] **completed** | **String**| ISO 8601 formatted dates are supported | [optional] **page** | **Integer**| A page number within the paginated result set. | [optional] **page_size** | **Integer**| Number of results to return per page. | [optional] ### Return type [**InlineResponse2004**](InlineResponse2004.md) ### Authorization [Basic](../README.md#Basic) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## read > Upload read(upload_href) Inspect an upload View for chunked uploads. ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: Basic config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::UploadsApi.new upload_href = 'upload_href_example' # String | URI of Upload. e.g.: /pulp/api/v3/uploads/1/ begin #Inspect an upload result = api_instance.read(upload_href) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling UploadsApi->read: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **upload_href** | **String**| URI of Upload. e.g.: /pulp/api/v3/uploads/1/ | ### Return type [**Upload**](Upload.md) ### Authorization [Basic](../README.md#Basic) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## update > Upload update(upload_href, content_range, file) Upload a file chunk Upload a chunk for an upload. ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: Basic config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::UploadsApi.new upload_href = 'upload_href_example' # String | URI of Upload. e.g.: /pulp/api/v3/uploads/1/ content_range = 'content_range_example' # String | The Content-Range header specifies the location of the file chunk within the file. file = File.new('/path/to/file') # File | A chunk of the uploaded file. begin #Upload a file chunk result = api_instance.update(upload_href, content_range, file) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling UploadsApi->update: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **upload_href** | **String**| URI of Upload. e.g.: /pulp/api/v3/uploads/1/ | **content_range** | **String**| The Content-Range header specifies the location of the file chunk within the file. | **file** | **File**| A chunk of the uploaded file. | ### Return type [**Upload**](Upload.md) ### Authorization [Basic](../README.md#Basic) ### HTTP request headers - **Content-Type**: multipart/form-data, application/x-www-form-urlencoded - **Accept**: application/json