# PulpFileClient::UploadsApi All URIs are relative to *http://localhost:24817* Method | HTTP request | Description ------------- | ------------- | ------------- [**uploads_add_role**](UploadsApi.md#uploads_add_role) | **POST** {upload_href}add_role/ | Add a role [**uploads_commit**](UploadsApi.md#uploads_commit) | **POST** {upload_href}commit/ | Finish an Upload [**uploads_create**](UploadsApi.md#uploads_create) | **POST** /pulp/api/v3/uploads/ | Create an upload [**uploads_delete**](UploadsApi.md#uploads_delete) | **DELETE** {upload_href} | Delete an upload [**uploads_list**](UploadsApi.md#uploads_list) | **GET** /pulp/api/v3/uploads/ | List uploads [**uploads_list_roles**](UploadsApi.md#uploads_list_roles) | **GET** {upload_href}list_roles/ | List roles [**uploads_my_permissions**](UploadsApi.md#uploads_my_permissions) | **GET** {upload_href}my_permissions/ | List user permissions [**uploads_read**](UploadsApi.md#uploads_read) | **GET** {upload_href} | Inspect an upload [**uploads_remove_role**](UploadsApi.md#uploads_remove_role) | **POST** {upload_href}remove_role/ | Remove a role [**uploads_update**](UploadsApi.md#uploads_update) | **PUT** {upload_href} | Upload a file chunk ## uploads_add_role > NestedRoleResponse uploads_add_role(upload_href, upload) Add a role Add a role for this object to users/groups. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::UploadsApi.new upload_href = 'upload_href_example' # String | upload = PulpFileClient::Upload.new # Upload | begin #Add a role result = api_instance.uploads_add_role(upload_href, upload) p result rescue PulpFileClient::ApiError => e puts "Exception when calling UploadsApi->uploads_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 ## uploads_commit > AsyncOperationResponse uploads_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 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::UploadsApi.new upload_href = 'upload_href_example' # String | upload_commit = PulpFileClient::UploadCommit.new # UploadCommit | begin #Finish an Upload result = api_instance.uploads_commit(upload_href, upload_commit) p result rescue PulpFileClient::ApiError => e puts "Exception when calling UploadsApi->uploads_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 ## uploads_create > UploadResponse uploads_create(upload) Create an upload View for chunked uploads. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::UploadsApi.new upload = PulpFileClient::Upload.new # Upload | begin #Create an upload result = api_instance.uploads_create(upload) p result rescue PulpFileClient::ApiError => e puts "Exception when calling UploadsApi->uploads_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 ## uploads_delete > uploads_delete(upload_href) Delete an upload View for chunked uploads. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::UploadsApi.new upload_href = 'upload_href_example' # String | begin #Delete an upload api_instance.uploads_delete(upload_href) rescue PulpFileClient::ApiError => e puts "Exception when calling UploadsApi->uploads_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 ## uploads_list > PaginatedUploadResponseList uploads_list(opts) List uploads View for chunked uploads. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::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'], # Array | Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `size` - Size * `-size` - Size (descending) * `pk` - Pk * `-pk` - Pk (descending) pulp_href__in: ['pulp_href__in_example'], # Array | Multiple values may be separated by commas. pulp_id__in: ['pulp_id__in_example'], # Array | Multiple values may be separated by commas. q: 'q_example', # String | size: 56, # Integer | Filter results where size matches value size__gt: 56, # Integer | Filter results where size is greater than value size__lt: 56, # Integer | Filter results where size is less than value size__range: [56], # Array | Filter results where size is between two comma separated values fields: ['fields_example'], # Array | A list of fields to include in the response. exclude_fields: ['exclude_fields_example'] # Array | A list of fields to exclude from the response. } begin #List uploads result = api_instance.uploads_list(opts) p result rescue PulpFileClient::ApiError => e puts "Exception when calling UploadsApi->uploads_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** | [**Array<String>**](String.md)| Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `size` - Size * `-size` - Size (descending) * `pk` - Pk * `-pk` - Pk (descending) | [optional] **pulp_href__in** | [**Array<String>**](String.md)| Multiple values may be separated by commas. | [optional] **pulp_id__in** | [**Array<String>**](String.md)| Multiple values may be separated by commas. | [optional] **q** | **String**| | [optional] **size** | **Integer**| Filter results where size matches value | [optional] **size__gt** | **Integer**| Filter results where size is greater than value | [optional] **size__lt** | **Integer**| Filter results where size is less than value | [optional] **size__range** | [**Array<Integer>**](Integer.md)| Filter results where size is between two comma separated values | [optional] **fields** | [**Array<String>**](String.md)| A list of fields to include in the response. | [optional] **exclude_fields** | [**Array<String>**](String.md)| 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 ## uploads_list_roles > ObjectRolesResponse uploads_list_roles(upload_href, opts) List roles List roles assigned to this object. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::UploadsApi.new upload_href = 'upload_href_example' # String | opts = { fields: ['fields_example'], # Array | A list of fields to include in the response. exclude_fields: ['exclude_fields_example'] # Array | A list of fields to exclude from the response. } begin #List roles result = api_instance.uploads_list_roles(upload_href, opts) p result rescue PulpFileClient::ApiError => e puts "Exception when calling UploadsApi->uploads_list_roles: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **upload_href** | **String**| | **fields** | [**Array<String>**](String.md)| A list of fields to include in the response. | [optional] **exclude_fields** | [**Array<String>**](String.md)| 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 ## uploads_my_permissions > MyPermissionsResponse uploads_my_permissions(upload_href, opts) List user permissions List permissions available to the current user on this object. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::UploadsApi.new upload_href = 'upload_href_example' # String | opts = { fields: ['fields_example'], # Array | A list of fields to include in the response. exclude_fields: ['exclude_fields_example'] # Array | A list of fields to exclude from the response. } begin #List user permissions result = api_instance.uploads_my_permissions(upload_href, opts) p result rescue PulpFileClient::ApiError => e puts "Exception when calling UploadsApi->uploads_my_permissions: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **upload_href** | **String**| | **fields** | [**Array<String>**](String.md)| A list of fields to include in the response. | [optional] **exclude_fields** | [**Array<String>**](String.md)| 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 ## uploads_read > UploadDetailResponse uploads_read(upload_href, opts) Inspect an upload View for chunked uploads. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::UploadsApi.new upload_href = 'upload_href_example' # String | opts = { fields: ['fields_example'], # Array | A list of fields to include in the response. exclude_fields: ['exclude_fields_example'] # Array | A list of fields to exclude from the response. } begin #Inspect an upload result = api_instance.uploads_read(upload_href, opts) p result rescue PulpFileClient::ApiError => e puts "Exception when calling UploadsApi->uploads_read: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **upload_href** | **String**| | **fields** | [**Array<String>**](String.md)| A list of fields to include in the response. | [optional] **exclude_fields** | [**Array<String>**](String.md)| 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 ## uploads_remove_role > NestedRoleResponse uploads_remove_role(upload_href, upload) Remove a role Remove a role for this object from users/groups. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::UploadsApi.new upload_href = 'upload_href_example' # String | upload = PulpFileClient::Upload.new # Upload | begin #Remove a role result = api_instance.uploads_remove_role(upload_href, upload) p result rescue PulpFileClient::ApiError => e puts "Exception when calling UploadsApi->uploads_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 ## uploads_update > UploadResponse uploads_update(content_range, upload_href, file, opts) Upload a file chunk Upload a chunk for an upload. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::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.uploads_update(content_range, upload_href, file, opts) p result rescue PulpFileClient::ApiError => e puts "Exception when calling UploadsApi->uploads_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