# PulpcoreClient::UploadsApi All URIs are relative to *http://pulp* 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, upload_commit) Finish an Upload Queues a Task that creates an Artifact, and the Upload gets deleted and cannot be re-used. ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::UploadsApi.new upload_href = 'upload_href_example' # String | upload_commit = PulpcoreClient::UploadCommit.new # UploadCommit | begin #Finish an Upload result = api_instance.commit(upload_href, upload_commit) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling UploadsApi->commit: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **upload_href** | **String**| | **upload_commit** | [**UploadCommit**](UploadCommit.md)| | ### Return type [**AsyncOperationResponse**](AsyncOperationResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data - **Accept**: application/json ## create > UploadResponse create(upload) 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: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::UploadsApi.new upload = PulpcoreClient::Upload.new # Upload | begin #Create an upload result = api_instance.create(upload) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling UploadsApi->create: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **upload** | [**Upload**](Upload.md)| | ### Return type [**UploadResponse**](UploadResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data - **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: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::UploadsApi.new upload_href = 'upload_href_example' # String | 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**| | ### Return type nil (empty response body) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined ## list > InlineResponse20012 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: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::UploadsApi.new opts = { limit: 56, # Integer | Number of results to return per page. offset: 56, # Integer | The initial index from which to return the results. ordering: 'ordering_example', # String | Which field to use when ordering the results. fields: 'fields_example', # String | A list of fields to include in the response. exclude_fields: 'exclude_fields_example' # String | A list of fields to exclude from the response. } 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 ------------- | ------------- | ------------- | ------------- **limit** | **Integer**| Number of results to return per page. | [optional] **offset** | **Integer**| The initial index from which to return the results. | [optional] **ordering** | **String**| Which field to use when ordering the results. | [optional] **fields** | **String**| A list of fields to include in the response. | [optional] **exclude_fields** | **String**| A list of fields to exclude from the response. | [optional] ### Return type [**InlineResponse20012**](InlineResponse20012.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## read > UploadDetailResponse read(upload_href, opts) 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: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::UploadsApi.new upload_href = 'upload_href_example' # String | opts = { fields: 'fields_example', # String | A list of fields to include in the response. exclude_fields: 'exclude_fields_example' # String | A list of fields to exclude from the response. } begin #Inspect an upload result = api_instance.read(upload_href, opts) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling UploadsApi->read: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **upload_href** | **String**| | **fields** | **String**| A list of fields to include in the response. | [optional] **exclude_fields** | **String**| A list of fields to exclude from the response. | [optional] ### Return type [**UploadDetailResponse**](UploadDetailResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## update > UploadResponse update(content_range, upload_href, 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: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::UploadsApi.new content_range = 'content_range_example' # String | The Content-Range header specifies the location of the file chunk within the file. upload_href = 'upload_href_example' # String | 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(content_range, upload_href, file, opts) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling UploadsApi->update: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **content_range** | **String**| The Content-Range header specifies the location of the file chunk within the file. | **upload_href** | **String**| | **file** | **File**| A chunk of the uploaded file. | **sha256** | **String**| The SHA-256 checksum of the chunk if available. | [optional] ### Return type [**UploadResponse**](UploadResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: multipart/form-data, application/x-www-form-urlencoded - **Accept**: application/json