Method: PureCloud::AuthorizationApi#post_roles_default_with_http_info

Defined in:
lib/purecloud/api/authorization_api.rb

#post_roles_default_with_http_info(opts = {}) ⇒ Array<(OrganizationRoleEntityListing, Fixnum, Hash)>

Restores all default roles This endpoint serves several purposes. 1. It provides the org with default roles. This is important for default roles that will be added after go-live (they can retroactively add the new default-role). Note: When not using a query param of force=true, it only adds the default roles not configured for the org; it does not overwrite roles. 2. Using the query param force=true, you can restore all default roles. Note: This does not have an effect on custom roles.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :force (BOOLEAN)

    Restore default roles

Returns:



665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
# File 'lib/purecloud/api/authorization_api.rb', line 665

def post_roles_default_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuthorizationApi#post_roles_default ..."
  end
  
  # resource path
  local_var_path = "/api/v2/authorization/roles/default".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'force'] = opts[:'force'] if opts[:'force']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'OrganizationRoleEntityListing')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthorizationApi#post_roles_default\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end