# PulpcoreClient::UploadsApi All URIs are relative to *http://localhost:24817* Method | HTTP request | Description ------------- | ------------- | ------------- [**commit**](UploadsApi.md#commit) | **POST** {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 > AsyncOperationResponse commit(upload_href, data) Finish an Upload Generates a Task to commit the upload and create an artifact ### 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 [**AsyncOperationResponse**](AsyncOperationResponse.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: '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** | **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 > UploadDetail 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 [**UploadDetail**](UploadDetail.md) ### Authorization [Basic](../README.md#Basic) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## update > Upload update(upload_href, content_range, file, opts) 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. opts = { sha256: 'sha256_example' # String | The SHA-256 checksum of the chunk if available. } begin #Upload a file chunk result = api_instance.update(upload_href, content_range, file, opts) 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. | **sha256** | **String**| The SHA-256 checksum of the chunk if available. | [optional] ### 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