# PulpcoreClient::GroupsApi All URIs are relative to *https://pulp* Method | HTTP request | Description ------------- | ------------- | ------------- [**add_role**](GroupsApi.md#add_role) | **POST** {group_href}add_role/ | [**create**](GroupsApi.md#create) | **POST** /pulp/api/v3/groups/ | Create a group [**delete**](GroupsApi.md#delete) | **DELETE** {group_href} | Delete a group [**list**](GroupsApi.md#list) | **GET** /pulp/api/v3/groups/ | List groups [**list_roles**](GroupsApi.md#list_roles) | **GET** {group_href}list_roles/ | [**my_permissions**](GroupsApi.md#my_permissions) | **GET** {group_href}my_permissions/ | [**partial_update**](GroupsApi.md#partial_update) | **PATCH** {group_href} | Update a group [**read**](GroupsApi.md#read) | **GET** {group_href} | Inspect a group [**remove_role**](GroupsApi.md#remove_role) | **POST** {group_href}remove_role/ | [**update**](GroupsApi.md#update) | **PUT** {group_href} | Update a group ## add_role > NestedRoleResponse add_role(group_href, nested_role) Add a role for this object to users/groups. ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::GroupsApi.new group_href = 'group_href_example' # String | nested_role = PulpcoreClient::NestedRole.new # NestedRole | begin result = api_instance.add_role(group_href, nested_role) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling GroupsApi->add_role: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **group_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 ## create > GroupResponse create(group) Create a group ViewSet for Group. NOTE: This API endpoint is in \"tech preview\" and subject to change ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::GroupsApi.new group = PulpcoreClient::Group.new # Group | begin #Create a group result = api_instance.create(group) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling GroupsApi->create: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **group** | [**Group**](Group.md)| | ### Return type [**GroupResponse**](GroupResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data - **Accept**: application/json ## delete > delete(group_href) Delete a group ViewSet for Group. NOTE: This API endpoint is in \"tech preview\" and subject to change ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::GroupsApi.new group_href = 'group_href_example' # String | begin #Delete a group api_instance.delete(group_href) rescue PulpcoreClient::ApiError => e puts "Exception when calling GroupsApi->delete: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **group_href** | **String**| | ### Return type nil (empty response body) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined ## list > PaginatedGroupResponseList list(opts) List groups ViewSet for Group. NOTE: This API endpoint is in \"tech preview\" and subject to change ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::GroupsApi.new opts = { id: 56, # Integer | Filter results where id matches value id__in: [56], # Array | Filter results where id is in a comma-separated list of values limit: 56, # Integer | Number of results to return per page. name: 'name_example', # String | Filter results where name matches value name__contains: 'name__contains_example', # String | Filter results where name contains value name__icontains: 'name__icontains_example', # String | Filter results where name contains value name__iexact: 'name__iexact_example', # String | Filter results where name matches value name__in: ['name__in_example'], # Array | Filter results where name is in a comma-separated list of values offset: 56, # Integer | The initial index from which to return the results. ordering: 'ordering_example', # String | Which field to use when ordering 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 groups result = api_instance.list(opts) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling GroupsApi->list: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Integer**| Filter results where id matches value | [optional] **id__in** | [**Array<Integer>**](Integer.md)| Filter results where id is in a comma-separated list of values | [optional] **limit** | **Integer**| Number of results to return per page. | [optional] **name** | **String**| Filter results where name matches value | [optional] **name__contains** | **String**| Filter results where name contains value | [optional] **name__icontains** | **String**| Filter results where name contains value | [optional] **name__iexact** | **String**| Filter results where name matches value | [optional] **name__in** | [**Array<String>**](String.md)| Filter results where name is in a comma-separated list of values | [optional] **offset** | **Integer**| The initial index from which to return the results. | [optional] **ordering** | **String**| Which field to use when ordering 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 [**PaginatedGroupResponseList**](PaginatedGroupResponseList.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## list_roles > ObjectRolesResponse list_roles(group_href, opts) List roles assigned to this object. ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::GroupsApi.new group_href = 'group_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 result = api_instance.list_roles(group_href, opts) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling GroupsApi->list_roles: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **group_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 [**ObjectRolesResponse**](ObjectRolesResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## my_permissions > MyPermissionsResponse my_permissions(group_href, opts) List permissions available to the current user on this object. ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::GroupsApi.new group_href = 'group_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 result = api_instance.my_permissions(group_href, opts) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling GroupsApi->my_permissions: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **group_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 [**MyPermissionsResponse**](MyPermissionsResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## partial_update > GroupResponse partial_update(group_href, patched_group) Update a group ViewSet for Group. NOTE: This API endpoint is in \"tech preview\" and subject to change ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::GroupsApi.new group_href = 'group_href_example' # String | patched_group = PulpcoreClient::PatchedGroup.new # PatchedGroup | begin #Update a group result = api_instance.partial_update(group_href, patched_group) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling GroupsApi->partial_update: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **group_href** | **String**| | **patched_group** | [**PatchedGroup**](PatchedGroup.md)| | ### Return type [**GroupResponse**](GroupResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data - **Accept**: application/json ## read > GroupResponse read(group_href, opts) Inspect a group ViewSet for Group. NOTE: This API endpoint is in \"tech preview\" and subject to change ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::GroupsApi.new group_href = 'group_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 group result = api_instance.read(group_href, opts) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling GroupsApi->read: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **group_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 [**GroupResponse**](GroupResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## remove_role > NestedRoleResponse remove_role(group_href, nested_role) Remove a role for this object from users/groups. ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::GroupsApi.new group_href = 'group_href_example' # String | nested_role = PulpcoreClient::NestedRole.new # NestedRole | begin result = api_instance.remove_role(group_href, nested_role) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling GroupsApi->remove_role: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **group_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 ## update > GroupResponse update(group_href, group) Update a group ViewSet for Group. NOTE: This API endpoint is in \"tech preview\" and subject to change ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::GroupsApi.new group_href = 'group_href_example' # String | group = PulpcoreClient::Group.new # Group | begin #Update a group result = api_instance.update(group_href, group) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling GroupsApi->update: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **group_href** | **String**| | **group** | [**Group**](Group.md)| | ### Return type [**GroupResponse**](GroupResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data - **Accept**: application/json