# 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 [**read**](PulpAnsibleGalaxyApiV3CollectionsApi.md#read) | **GET** {collection_import_href} | Inspect a collection import ## 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' # setup authorization PulpAnsibleClient.configure do |config| # Configure HTTP basic authorization: Basic config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end 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 [Basic](../README.md#Basic) ### HTTP request headers - **Content-Type**: multipart/form-data, application/x-www-form-urlencoded - **Accept**: application/json ## read > CollectionImportDetailRead read(collection_import_href, opts) Inspect a collection import Returns a CollectionImport object. ### Example ```ruby # load the gem require 'pulp_ansible_client' # setup authorization PulpAnsibleClient.configure do |config| # Configure HTTP basic authorization: Basic config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpAnsibleClient::PulpAnsibleGalaxyApiV3CollectionsApi.new collection_import_href = 'collection_import_href_example' # String | URI of Collection Import. e.g.: /pulp_ansible/galaxy/1/api/v3/imports/collections/1/ 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. since: DateTime.parse('2013-10-20T19:20:30+01:00') # DateTime | Filter messages since a given timestamp } begin #Inspect a collection import result = api_instance.read(collection_import_href, opts) p result rescue PulpAnsibleClient::ApiError => e puts "Exception when calling PulpAnsibleGalaxyApiV3CollectionsApi->read: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_import_href** | **String**| URI of Collection Import. e.g.: /pulp_ansible/galaxy/1/api/v3/imports/collections/1/ | **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] **since** | **DateTime**| Filter messages since a given timestamp | [optional] ### Return type [**CollectionImportDetailRead**](CollectionImportDetailRead.md) ### Authorization [Basic](../README.md#Basic) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json