# PulpAnsibleClient::ContentCollectionVersionsApi

All URIs are relative to *http://pulp*

Method | HTTP request | Description
------------- | ------------- | -------------
[**create**](ContentCollectionVersionsApi.md#create) | **POST** /pulp/api/v3/content/ansible/collection_versions/ | Create a collection version
[**list**](ContentCollectionVersionsApi.md#list) | **GET** /pulp/api/v3/content/ansible/collection_versions/ | List collection versions
[**read**](ContentCollectionVersionsApi.md#read) | **GET** {ansible_collection_version_href} | Inspect a collection version



## create

> AnsibleCollectionVersionResponse create(ansible_collection_version)

Create a collection version

ViewSet for Ansible Collection.

### 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::ContentCollectionVersionsApi.new
ansible_collection_version = PulpAnsibleClient::AnsibleCollectionVersion.new # AnsibleCollectionVersion | 

begin
  #Create a collection version
  result = api_instance.create(ansible_collection_version)
  p result
rescue PulpAnsibleClient::ApiError => e
  puts "Exception when calling ContentCollectionVersionsApi->create: #{e}"
end
```

### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ansible_collection_version** | [**AnsibleCollectionVersion**](AnsibleCollectionVersion.md)|  | 

### Return type

[**AnsibleCollectionVersionResponse**](AnsibleCollectionVersionResponse.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

> InlineResponse2001 list(opts)

List collection versions

ViewSet for Ansible Collection.

### 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::ContentCollectionVersionsApi.new
opts = {
  is_highest: 'is_highest_example', # String | is_highest
  limit: 56, # Integer | Number of results to return per page.
  name: 'name_example', # String | name
  namespace: 'namespace_example', # String | namespace
  offset: 56, # Integer | The initial index from which to return the results.
  ordering: 'ordering_example', # String | Which field to use when ordering the results.
  q: 'q_example', # String | q
  repository_version: 'repository_version_example', # String | repository_version
  repository_version_added: 'repository_version_added_example', # String | repository_version_added
  repository_version_removed: 'repository_version_removed_example', # String | repository_version_removed
  tags: 'tags_example', # String | tags
  version: 'version_example', # String | version
  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 collection versions
  result = api_instance.list(opts)
  p result
rescue PulpAnsibleClient::ApiError => e
  puts "Exception when calling ContentCollectionVersionsApi->list: #{e}"
end
```

### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **is_highest** | **String**| is_highest | [optional] 
 **limit** | **Integer**| Number of results to return per page. | [optional] 
 **name** | **String**| name | [optional] 
 **namespace** | **String**| namespace | [optional] 
 **offset** | **Integer**| The initial index from which to return the results. | [optional] 
 **ordering** | **String**| Which field to use when ordering the results. | [optional] 
 **q** | **String**| q | [optional] 
 **repository_version** | **String**| repository_version | [optional] 
 **repository_version_added** | **String**| repository_version_added | [optional] 
 **repository_version_removed** | **String**| repository_version_removed | [optional] 
 **tags** | **String**| tags | [optional] 
 **version** | **String**| version | [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

[**InlineResponse2001**](InlineResponse2001.md)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json


## read

> AnsibleCollectionVersionResponse read(ansible_collection_version_href, opts)

Inspect a collection version

ViewSet for Ansible Collection.

### 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::ContentCollectionVersionsApi.new
ansible_collection_version_href = 'ansible_collection_version_href_example' # String | 
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.
}

begin
  #Inspect a collection version
  result = api_instance.read(ansible_collection_version_href, opts)
  p result
rescue PulpAnsibleClient::ApiError => e
  puts "Exception when calling ContentCollectionVersionsApi->read: #{e}"
end
```

### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ansible_collection_version_href** | **String**|  | 
 **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

[**AnsibleCollectionVersionResponse**](AnsibleCollectionVersionResponse.md)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json