# PulpAnsibleClient::AnsibleCollectionsApi All URIs are relative to *http://localhost:24817* Method | HTTP request | Description ------------- | ------------- | ------------- [**add_role**](AnsibleCollectionsApi.md#add_role) | **POST** {ansible_collection_href}add_role/ | Add a role [**list**](AnsibleCollectionsApi.md#list) | **GET** /pulp/api/v3/ansible/collections/ | List collections [**list_roles**](AnsibleCollectionsApi.md#list_roles) | **GET** {ansible_collection_href}list_roles/ | List roles [**my_permissions**](AnsibleCollectionsApi.md#my_permissions) | **GET** {ansible_collection_href}my_permissions/ | List user permissions [**read**](AnsibleCollectionsApi.md#read) | **GET** {ansible_collection_href} | Inspect a collection [**remove_role**](AnsibleCollectionsApi.md#remove_role) | **POST** {ansible_collection_href}remove_role/ | Remove a role [**upload_collection**](AnsibleCollectionsApi.md#upload_collection) | **POST** /ansible/collections/ | Upload a collection ## add_role > NestedRoleResponse add_role(ansible_collection_href, nested_role) Add a role Add a role for this object to users/groups. ### Example ```ruby # load the gem require 'pulp_ansible_client' # setup authorization PulpAnsibleClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpAnsibleClient::AnsibleCollectionsApi.new ansible_collection_href = 'ansible_collection_href_example' # String | nested_role = PulpAnsibleClient::NestedRole.new # NestedRole | begin #Add a role result = api_instance.add_role(ansible_collection_href, nested_role) p result rescue PulpAnsibleClient::ApiError => e puts "Exception when calling AnsibleCollectionsApi->add_role: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ansible_collection_href** | **String**| | **nested_role** | [**NestedRole**](NestedRole.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 ## list > PaginatedansibleCollectionResponseList 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: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpAnsibleClient::AnsibleCollectionsApi.new opts = { limit: 56, # Integer | Number of results to return per page. name: 'name_example', # String | namespace: 'namespace_example', # String | 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) * `namespace` - Namespace * `-namespace` - Namespace (descending) * `name` - Name * `-name` - Name (descending) * `pk` - Pk * `-pk` - Pk (descending) prn__in: ['prn__in_example'], # Array | Multiple values may be separated by commas. 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 | Filter results by using NOT, AND and OR operations on other filters 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 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 ------------- | ------------- | ------------- | ------------- **limit** | **Integer**| Number of results to return per page. | [optional] **name** | **String**| | [optional] **namespace** | **String**| | [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) * `namespace` - Namespace * `-namespace` - Namespace (descending) * `name` - Name * `-name` - Name (descending) * `pk` - Pk * `-pk` - Pk (descending) | [optional] **prn__in** | [**Array<String>**](String.md)| Multiple values may be separated by commas. | [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**| Filter results by using NOT, AND and OR operations on other filters | [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 [**PaginatedansibleCollectionResponseList**](PaginatedansibleCollectionResponseList.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## list_roles > ObjectRolesResponse list_roles(ansible_collection_href, opts) List roles List roles assigned to this object. ### Example ```ruby # load the gem require 'pulp_ansible_client' # setup authorization PulpAnsibleClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpAnsibleClient::AnsibleCollectionsApi.new ansible_collection_href = 'ansible_collection_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.list_roles(ansible_collection_href, opts) p result rescue PulpAnsibleClient::ApiError => e puts "Exception when calling AnsibleCollectionsApi->list_roles: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ansible_collection_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 ## my_permissions > MyPermissionsResponse my_permissions(ansible_collection_href, opts) List user permissions List permissions available to the current user on this object. ### Example ```ruby # load the gem require 'pulp_ansible_client' # setup authorization PulpAnsibleClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpAnsibleClient::AnsibleCollectionsApi.new ansible_collection_href = 'ansible_collection_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.my_permissions(ansible_collection_href, opts) p result rescue PulpAnsibleClient::ApiError => e puts "Exception when calling AnsibleCollectionsApi->my_permissions: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ansible_collection_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 ## read > AnsibleCollectionResponse read(ansible_collection_href, opts) Inspect a collection Viewset for Ansible Collections. ### Example ```ruby # load the gem require 'pulp_ansible_client' # setup authorization PulpAnsibleClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpAnsibleClient::AnsibleCollectionsApi.new ansible_collection_href = 'ansible_collection_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 a collection result = api_instance.read(ansible_collection_href, opts) p result rescue PulpAnsibleClient::ApiError => e puts "Exception when calling AnsibleCollectionsApi->read: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ansible_collection_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 [**AnsibleCollectionResponse**](AnsibleCollectionResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## remove_role > NestedRoleResponse remove_role(ansible_collection_href, nested_role) Remove a role Remove a role for this object from users/groups. ### Example ```ruby # load the gem require 'pulp_ansible_client' # setup authorization PulpAnsibleClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpAnsibleClient::AnsibleCollectionsApi.new ansible_collection_href = 'ansible_collection_href_example' # String | nested_role = PulpAnsibleClient::NestedRole.new # NestedRole | begin #Remove a role result = api_instance.remove_role(ansible_collection_href, nested_role) p result rescue PulpAnsibleClient::ApiError => e puts "Exception when calling AnsibleCollectionsApi->remove_role: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ansible_collection_href** | **String**| | **nested_role** | [**NestedRole**](NestedRole.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 ## 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: basicAuth 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 [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: multipart/form-data, application/x-www-form-urlencoded - **Accept**: application/json