# PulpAnsibleClient::ContentRolesApi All URIs are relative to *http://localhost:24817* Method | HTTP request | Description ------------- | ------------- | ------------- [**create**](ContentRolesApi.md#create) | **POST** /pulp/api/v3/content/ansible/roles/ | Create a role [**list**](ContentRolesApi.md#list) | **GET** /pulp/api/v3/content/ansible/roles/ | List roles [**read**](ContentRolesApi.md#read) | **GET** {role_href} | Inspect a role ## create > AnsibleRole create(data) Create a role ViewSet for Role. ### 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::ContentRolesApi.new data = PulpAnsibleClient::AnsibleRole.new # AnsibleRole | begin #Create a role result = api_instance.create(data) p result rescue PulpAnsibleClient::ApiError => e puts "Exception when calling ContentRolesApi->create: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **data** | [**AnsibleRole**](AnsibleRole.md)| | ### Return type [**AnsibleRole**](AnsibleRole.md) ### Authorization [Basic](../README.md#Basic) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## list > InlineResponse2002 list(opts) List roles ViewSet for Role. ### 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::ContentRolesApi.new opts = { ordering: 'ordering_example', # String | Which field to use when ordering the results. name: 'name_example', # String | Filter results where name matches value namespace: 'namespace_example', # String | Filter results where namespace matches value version: 'version_example', # String | Filter results where version matches value repository_version: 'repository_version_example', # String | Repository Version referenced by HREF repository_version_added: 'repository_version_added_example', # String | Repository Version referenced by HREF repository_version_removed: 'repository_version_removed_example', # String | Repository Version referenced by HREF 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 roles result = api_instance.list(opts) p result rescue PulpAnsibleClient::ApiError => e puts "Exception when calling ContentRolesApi->list: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ordering** | **String**| Which field to use when ordering the results. | [optional] **name** | **String**| Filter results where name matches value | [optional] **namespace** | **String**| Filter results where namespace matches value | [optional] **version** | **String**| Filter results where version matches value | [optional] **repository_version** | **String**| Repository Version referenced by HREF | [optional] **repository_version_added** | **String**| Repository Version referenced by HREF | [optional] **repository_version_removed** | **String**| Repository Version referenced by HREF | [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 [**InlineResponse2002**](InlineResponse2002.md) ### Authorization [Basic](../README.md#Basic) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## read > AnsibleRole read(role_href, opts) Inspect a role ViewSet for Role. ### 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::ContentRolesApi.new role_href = 'role_href_example' # String | URI of Role. e.g.: /pulp/api/v3/content/ansible/roles/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. } begin #Inspect a role result = api_instance.read(role_href, opts) p result rescue PulpAnsibleClient::ApiError => e puts "Exception when calling ContentRolesApi->read: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **role_href** | **String**| URI of Role. e.g.: /pulp/api/v3/content/ansible/roles/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] ### Return type [**AnsibleRole**](AnsibleRole.md) ### Authorization [Basic](../README.md#Basic) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json