Low commit activity in last 3 years
No release in over a year
Ruby client gem to connect to Insights RBAC Service
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.6, >= 3.6.0

Runtime

~> 1.0, >= 1.0.1
 Project Readme

insights-rbac-api-client

RBACApiClient - the Ruby gem for the Role Based Access Control

The API for Role Based Access Control.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 2.0.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build insights-rbac-api-client.gemspec

Then either install the gem locally:

gem install ./insights-rbac-api-client-2.0.0.gem

(for development, run gem install --dev ./insights-rbac-api-client-2.0.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'insights-rbac-api-client', '~> 2.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'insights-rbac-api-client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'insights-rbac-api-client'

# Setup authorization
RBACApiClient.configure do |config|
  # Configure HTTP basic authorization: basic_auth
  config.username = 'YOUR_USERNAME'
  config.password = 'YOUR_PASSWORD'
end

api_instance = RBACApiClient::AccessApi.new
application = 'application_example' # String | The application name(s) to obtain access for the principal. This is an exact match. When no application is supplied, all permissions for the principal are returned. You may also use a comma-separated list to match on multiple applications.
opts = {
  username: 'username_example', # String | Unique username of the principal to obtain access for (only available for admins, and if supplied, takes precedence over the identity header).
  order_by: 'application', # String | Parameter for ordering roles by value. For inverse ordering, supply '-' before the param value, such as: ?order_by=-application
  status: 'enabled', # String | Set the status of users to get back.
  limit: 56, # Integer | Parameter for selecting the amount of data returned.
  offset: 56 # Integer | Parameter for selecting the offset of data.
}

begin
  #Get the permitted access for a principal in the tenant (defaults to principal from the identity header)
  result = api_instance.get_principal_access(application, opts)
  p result
rescue RBACApiClient::ApiError => e
  puts "Exception when calling AccessApi->get_principal_access: #{e}"
end

Documentation for API Endpoints

All URIs are relative to /api/rbac/v1

Class Method HTTP request Description
RBACApiClient::AccessApi get_principal_access GET /access/ Get the permitted access for a principal in the tenant (defaults to principal from the identity header)
RBACApiClient::CrossAccountRequestApi create_cross_account_requests POST /cross-account-requests/ Create a cross account request
RBACApiClient::CrossAccountRequestApi get_cross_account_request GET /cross-account-requests/{uuid}/ Get a cross account request
RBACApiClient::CrossAccountRequestApi list_cross_account_requests GET /cross-account-requests/ List the cross account requests for a user or account
RBACApiClient::CrossAccountRequestApi patch_cross_account_request PATCH /cross-account-requests/{uuid}/ Patch a cross account request
RBACApiClient::CrossAccountRequestApi put_cross_account_request PUT /cross-account-requests/{uuid}/ Update a cross account request
RBACApiClient::GroupApi add_principal_to_group POST /groups/{uuid}/principals/ Add a principal to a group in the tenant
RBACApiClient::GroupApi add_role_to_group POST /groups/{uuid}/roles/ Add a role to a group in the tenant
RBACApiClient::GroupApi create_group POST /groups/ Create a group in a tenant
RBACApiClient::GroupApi delete_group DELETE /groups/{uuid}/ Delete a group in the tenant
RBACApiClient::GroupApi delete_principal_from_group DELETE /groups/{uuid}/principals/ Remove a principal from a group in the tenant
RBACApiClient::GroupApi delete_role_from_group DELETE /groups/{uuid}/roles/ Remove a role from a group in the tenant
RBACApiClient::GroupApi get_group GET /groups/{uuid}/ Get a group in the tenant
RBACApiClient::GroupApi get_principals_from_group GET /groups/{uuid}/principals/ Get a list of principals from a group in the tenant
RBACApiClient::GroupApi list_groups GET /groups/ List the groups for a tenant
RBACApiClient::GroupApi list_roles_for_group GET /groups/{uuid}/roles/ List the roles for a group in the tenant
RBACApiClient::GroupApi update_group PUT /groups/{uuid}/ Update a group in the tenant
RBACApiClient::PermissionApi list_permission_options GET /permissions/options/ List the available options for fields of permissions for a tenant
RBACApiClient::PermissionApi list_permissions GET /permissions/ List the permissions for a tenant
RBACApiClient::PolicyApi create_policies POST /policies/ Create a policy in a tenant
RBACApiClient::PolicyApi delete_policy DELETE /policies/{uuid}/ Delete a policy in the tenant
RBACApiClient::PolicyApi get_policy GET /policies/{uuid}/ Get a policy in the tenant
RBACApiClient::PolicyApi list_policies GET /policies/ List the policies in the tenant
RBACApiClient::PolicyApi update_policy PUT /policies/{uuid}/ Update a policy in the tenant
RBACApiClient::PrincipalApi list_principals GET /principals/ List the principals for a tenant
RBACApiClient::RoleApi create_role POST /roles/ Create a role for a tenant
RBACApiClient::RoleApi delete_role DELETE /roles/{uuid}/ Delete a role in the tenant
RBACApiClient::RoleApi get_role GET /roles/{uuid}/ Get a role in the tenant
RBACApiClient::RoleApi get_role_access GET /roles/{uuid}/access/ Get access for a role in the tenant
RBACApiClient::RoleApi list_roles GET /roles/ List the roles for a tenant
RBACApiClient::RoleApi patch_role PATCH /roles/{uuid}/ Patch a role in the tenant
RBACApiClient::RoleApi update_role PUT /roles/{uuid}/ Update a role in the tenant
RBACApiClient::StatusApi get_status GET /status/ Obtain server status

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

basic_auth

  • Type: HTTP basic authentication