# PulpcoreClient::UploadsApi All URIs are relative to *https://pulp* Method | HTTP request | Description ------------- | ------------- | ------------- [**add_role**](UploadsApi.md#add_role) | **POST** {upload_href}add_role/ | [**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 [**list_roles**](UploadsApi.md#list_roles) | **GET** {upload_href}list_roles/ | [**my_permissions**](UploadsApi.md#my_permissions) | **GET** {upload_href}my_permissions/ | [**read**](UploadsApi.md#read) | **GET** {upload_href} | Inspect an upload [**remove_role**](UploadsApi.md#remove_role) | **POST** {upload_href}remove_role/ | [**update**](UploadsApi.md#update) | **PUT** {upload_href} | Upload a file chunk ## add_role > NestedRoleResponse add_role(upload_href, upload) Add a role for this object to users/groups. ### 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 = PulpcoreClient::Upload.new # Upload | begin result = api_instance.add_role(upload_href, upload) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling UploadsApi->add_role: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **upload_href** | **String**| | **upload** | [**Upload**](Upload.md)| | ### Return type [**NestedRoleResponse**](NestedRoleResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data - **Accept**: application/json ## 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 > PaginatedUploadResponseList 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. 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] **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 [**PaginatedUploadResponseList**](PaginatedUploadResponseList.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## list_roles > ObjectRolesResponse list_roles(upload_href, opts) List roles assigned to this object. ### 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 result = api_instance.list_roles(upload_href, opts) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling UploadsApi->list_roles: #{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 [**ObjectRolesResponse**](ObjectRolesResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## my_permissions > MyPermissionsResponse my_permissions(upload_href, opts) List permissions available to the current user on this object. ### 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 result = api_instance.my_permissions(upload_href, opts) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling UploadsApi->my_permissions: #{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 [**MyPermissionsResponse**](MyPermissionsResponse.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 ## remove_role > NestedRoleResponse remove_role(upload_href, upload) Remove a role for this object from users/groups. ### 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 = PulpcoreClient::Upload.new # Upload | begin result = api_instance.remove_role(upload_href, upload) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling UploadsApi->remove_role: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **upload_href** | **String**| | **upload** | [**Upload**](Upload.md)| | ### Return type [**NestedRoleResponse**](NestedRoleResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data - **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