# PulpAnsibleClient::PulpAnsibleGalaxyApiV3CollectionsApi All URIs are relative to *http://pulp* Method | HTTP request | Description ------------- | ------------- | ------------- [**create**](PulpAnsibleGalaxyApiV3CollectionsApi.md#create) | **POST** /pulp_ansible/galaxy/{path}/api/v3/artifacts/collections/ | Upload a collection ## create > AsyncOperationResponse create(path, file, opts) Upload a collection Create an artifact and trigger an asynchronous task to create Collection content from it. ### Example ```ruby # load the gem require 'pulp_ansible_client' api_instance = PulpAnsibleClient::PulpAnsibleGalaxyApiV3CollectionsApi.new path = 'path_example' # String | file = File.new('/path/to/file') # File | The Collection tarball. opts = { sha256: 'sha256_example', # String | An optional sha256 checksum of the uploaded file. expected_namespace: 'expected_namespace_example', # String | The expected 'namespace' of the Collection to be verified against the metadata during import. expected_name: 'expected_name_example', # String | The expected 'name' of the Collection to be verified against the metadata during import. expected_version: 'expected_version_example' # String | The expected version of the Collection to be verified against the metadata during import. } begin #Upload a collection result = api_instance.create(path, file, opts) p result rescue PulpAnsibleClient::ApiError => e puts "Exception when calling PulpAnsibleGalaxyApiV3CollectionsApi->create: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **path** | **String**| | **file** | **File**| The Collection tarball. | **sha256** | **String**| An optional sha256 checksum of the uploaded file. | [optional] **expected_namespace** | **String**| The expected 'namespace' of the Collection to be verified against the metadata during import. | [optional] **expected_name** | **String**| The expected 'name' of the Collection to be verified against the metadata during import. | [optional] **expected_version** | **String**| The expected version of the Collection to be verified against the metadata during import. | [optional] ### Return type [**AsyncOperationResponse**](AsyncOperationResponse.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: multipart/form-data, application/x-www-form-urlencoded - **Accept**: application/json