# PulpAnsibleClient::AnsibleCollectionsApi All URIs are relative to *http://localhost:24817* Method | HTTP request | Description ------------- | ------------- | ------------- [**list**](AnsibleCollectionsApi.md#list) | **GET** /pulp/api/v3/ansible/collections/ | List collections [**upload_collection**](AnsibleCollectionsApi.md#upload_collection) | **POST** /ansible/collections/ | Upload a collection ## list > InlineResponse200 list(opts) List collections Viewset for Ansible Collections. ### 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::AnsibleCollectionsApi.new opts = { namespace: 'namespace_example', # String | name: 'name_example', # String | 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 collections result = api_instance.list(opts) p result rescue PulpAnsibleClient::ApiError => e puts "Exception when calling AnsibleCollectionsApi->list: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **namespace** | **String**| | [optional] **name** | **String**| | [optional] **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 [**InlineResponse200**](InlineResponse200.md) ### Authorization [Basic](../README.md#Basic) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## upload_collection > AsyncOperationResponse upload_collection(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::AnsibleCollectionsApi.new 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.upload_collection(file, opts) p result rescue PulpAnsibleClient::ApiError => e puts "Exception when calling AnsibleCollectionsApi->upload_collection: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **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