This project is auto generated from api at https://api.permit.io/redoc Please check the latest commit to see the last updated date.
OpenapiClient - the Ruby gem for the Permit.io API
Fullstack Authorization as a Service
This SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
To build the Ruby code into a gem:
gem build openapi_client.gemspec
Then either install the gem locally:
gem install ./openapi_client-1.0.0.gem
(for development, run gem install --dev ./openapi_client-1.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 'openapi_client', '~> 1.0.0'
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 'openapi_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Please follow the installation procedure and then run the following code:
# Load the gem
require 'openapi_client'
# Setup authorization
OpenapiClient.configure do |config|
# Configure OAuth2 access token for authorization: OAuth2PasswordBearer
config.access_token = 'YOUR ACCESS TOKEN'
end
api_instance = OpenapiClient::ActionsApi.new
resource_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
new_action = OpenapiClient::NewAction.new({name: 'name_example'}) # NewAction |
opts = {
x_organization_id: 'x_organization_id_example' # String | The id of the active organization you want to query on
}
begin
#Create Action
result = api_instance.create_action(resource_id, new_action, opts)
p result
rescue OpenapiClient::ApiError => e
puts "Exception when calling ActionsApi->create_action: #{e}"
end
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
OpenapiClient::ActionsApi | create_action | POST /v1/resources/{resource_id}/actions | Create Action |
OpenapiClient::ActionsApi | delete_action | DELETE /v1/resources/{resource_id}/actions/{action_id} | Delete Action |
OpenapiClient::ActionsApi | get_action | GET /v1/resources/{resource_id}/actions/{action_id} | Get Action |
OpenapiClient::ActionsApi | list_actions | GET /v1/resources/{resource_id}/actions | List Actions |
OpenapiClient::ActionsApi | sync_action | PUT /v1/resources/{resource_id}/actions | Sync Action |
OpenapiClient::ActionsApi | update_action | PATCH /v1/resources/{resource_id}/actions/{action_id} | Update Action |
OpenapiClient::EnvironmentsApi | create_environment | POST /v1/projects/{project_id}/environments | Create Environment |
OpenapiClient::EnvironmentsApi | delete_environment | DELETE /v1/projects/{project_id}/environments/{environment_id} | Delete Environment |
OpenapiClient::EnvironmentsApi | get_environment | GET /v1/projects/{project_id}/environments/{environment_id} | Get Environment |
OpenapiClient::EnvironmentsApi | list_environments | GET /v1/projects/{project_id}/environments | List Environments |
OpenapiClient::EnvironmentsApi | update_environment | PATCH /v1/projects/{project_id}/environments/{environment_id} | Update Environment |
OpenapiClient::OrganizationsApi | create_organization | POST /v1/organizations | Create Organization |
OpenapiClient::OrganizationsApi | delete_organization | DELETE /v1/organizations/{organization_id} | Delete Organization |
OpenapiClient::OrganizationsApi | get_organization | GET /v1/organizations/{organization_id} | Get Organization |
OpenapiClient::OrganizationsApi | list_organizations | GET /v1/organizations | List Organizations |
OpenapiClient::OrganizationsApi | update_organization | PATCH /v1/organizations/{organization_id} | Update Organization |
OpenapiClient::PDPDecisionsApi | get_decision_logs | GET /v1/pdps/{pdp_id}/decision_logs | List PDP Decisions |
OpenapiClient::PermissionsApi | assign_permissions_to_role | POST /v1/roles/{role_id}/permissions | Assign Permissions To Role |
OpenapiClient::PermissionsApi | list_role_permissions | GET /v1/roles/{role_id}/permissions | List Role Permissions |
OpenapiClient::PermissionsApi | remove_permissions_from_role | DELETE /v1/roles/{role_id}/permissions | Remove Permissions From Role |
OpenapiClient::PolicyApi | get_opal_data_sources | GET /opal/data/config | Get Opal Data Sources |
OpenapiClient::PolicyApi | get_policy | GET /v1/policy | Get Policy |
OpenapiClient::PolicyApi | get_policy_config | GET /v1/policy-config | Get Policy Config |
OpenapiClient::PolicyApi | get_policy_config_topics | GET /v1/policy-config/topics | Get Policy Config Topics |
OpenapiClient::PolicyDecisionPointsApi | create_pdp | POST /v1/pdps | Create Policy Decision Point |
OpenapiClient::PolicyDecisionPointsApi | delete_pdp | DELETE /v1/pdps/{pdp_id} | Delete Policy Decision Point |
OpenapiClient::PolicyDecisionPointsApi | get_current_pdp_config | GET /v1/pdps/me/config | Get Connected PDP Config |
OpenapiClient::PolicyDecisionPointsApi | get_pdp | GET /v1/pdps/{pdp_id} | Get Policy Decision Point |
OpenapiClient::PolicyDecisionPointsApi | get_pdp_config | GET /v1/pdps/{pdp_id}/config | Get PDP Config |
OpenapiClient::PolicyDecisionPointsApi | list_pdps | GET /v1/pdps | List Policy Decision Points |
OpenapiClient::PolicyDecisionPointsApi | rotate_pdp_secret | POST /v1/pdps/{pdp_id}/rotate-secret | Rotate PDP Secret |
OpenapiClient::PolicyDecisionPointsApi | update_pdp | PATCH /v1/pdps/{pdp_id} | Update Policy Decision Point |
OpenapiClient::ProjectsApi | create_project | POST /v1/projects | Create Project |
OpenapiClient::ProjectsApi | delete_project | DELETE /v1/projects/{project_id} | Delete Project |
OpenapiClient::ProjectsApi | get_project | GET /v1/projects/{project_id} | Get Project |
OpenapiClient::ProjectsApi | list_projects | GET /v1/projects | List Projects |
OpenapiClient::ProjectsApi | update_project | PATCH /v1/projects/{project_id} | Update Project |
OpenapiClient::ResourcesApi | create_resource | POST /v1/resources | Create Resource |
OpenapiClient::ResourcesApi | delete_resource | DELETE /v1/resources/{resource_id} | Delete Resource |
OpenapiClient::ResourcesApi | get_resource | GET /v1/resources/{resource_id} | Get Resource |
OpenapiClient::ResourcesApi | list_resources | GET /v1/resources | List Resources |
OpenapiClient::ResourcesApi | put_resource | PUT /v1/resources/{resource_name} | Put Resource |
OpenapiClient::ResourcesApi | sync_resources | PUT /v1/resources | Sync Resources |
OpenapiClient::ResourcesApi | update_resource | PATCH /v1/resources/{resource_id} | Update Resource |
OpenapiClient::RoleAssignmentsApi | assign_role | POST /v1/role_assignments | Assign Role |
OpenapiClient::RoleAssignmentsApi | get_role_assignment | GET /v1/role_assignments/{role_assignment_id} | Get Role Assignment |
OpenapiClient::RoleAssignmentsApi | list_role_assignments | GET /v1/role_assignments | List Role Assignments |
OpenapiClient::RoleAssignmentsApi | remove_role_assignment | DELETE /v1/role_assignments/{role_assignment_id} | Remove Role Assignment |
OpenapiClient::RoleAssignmentsApi | unassign_role | DELETE /v1/role_assignments | Unassign Role |
OpenapiClient::RolesApi | create_role | POST /v1/roles | Create Role |
OpenapiClient::RolesApi | delete_role | DELETE /v1/roles/{role_id} | Delete Role |
OpenapiClient::RolesApi | get_role | GET /v1/roles/{role_id} | Get Role |
OpenapiClient::RolesApi | list_roles | GET /v1/roles | List Roles |
OpenapiClient::RolesApi | update_role | PATCH /v1/roles/{role_id} | Update Role |
OpenapiClient::TenantsApi | create_tenant | POST /v1/tenants | Create Tenant |
OpenapiClient::TenantsApi | delete_tenant | DELETE /v1/tenants/{tenant_id} | Delete Tenant |
OpenapiClient::TenantsApi | get_tenant | GET /v1/tenants/{tenant_id} | Get Tenant |
OpenapiClient::TenantsApi | list_tenants | GET /v1/tenants | List Tenants |
OpenapiClient::TenantsApi | sync_tenant | PUT /v1/tenants | Sync Tenant |
OpenapiClient::TenantsApi | update_tenant | PATCH /v1/tenants/{tenant_id} | Update Tenant |
OpenapiClient::UsersApi | assign_user_tenants | POST /v1/users/{user_id}/tenants | Assign User Tenants |
OpenapiClient::UsersApi | create_user | POST /v1/users | Create User |
OpenapiClient::UsersApi | delete_user | DELETE /v1/users/{user_id} | Delete User |
OpenapiClient::UsersApi | get_user | GET /v1/users/{user_id} | Get User |
OpenapiClient::UsersApi | get_user_roles | GET /v1/users/{user_id}/roles | Get User Roles |
OpenapiClient::UsersApi | get_user_tenants | GET /v1/users/{user_id}/tenants | Get User Tenants |
OpenapiClient::UsersApi | list_users | GET /v1/users | List Users |
OpenapiClient::UsersApi | remove_user_tenants | DELETE /v1/users/{user_id}/tenants | Remove User Tenants |
OpenapiClient::UsersApi | sync_user | PUT /v1/users | Sync User |
OpenapiClient::UsersApi | update_user | PATCH /v1/users/{user_id} | Update User |
- OpenapiClient::Action
- OpenapiClient::ActionList
- OpenapiClient::ActionProperties
- OpenapiClient::AssignedRole
- OpenapiClient::ChangeRoleAssignment
- OpenapiClient::DataSourceConfig
- OpenapiClient::DataSourceEntry
- OpenapiClient::DecisionLogGrantPermissions
- OpenapiClient::DecisionLogResponse
- OpenapiClient::DecisionLogResponseList
- OpenapiClient::DecisionLogResultResponse
- OpenapiClient::Environment
- OpenapiClient::EnvironmentList
- OpenapiClient::HTTPValidationError
- OpenapiClient::NewAction
- OpenapiClient::NewEnvironment
- OpenapiClient::NewOrganization
- OpenapiClient::NewPDP
- OpenapiClient::NewProject
- OpenapiClient::NewRemoteTenant
- OpenapiClient::NewRemoteUser
- OpenapiClient::NewResource
- OpenapiClient::NewRole
- OpenapiClient::NewTenant
- OpenapiClient::NewUser
- OpenapiClient::Organization
- OpenapiClient::OrganizationList
- OpenapiClient::PDP
- OpenapiClient::PDPList
- OpenapiClient::Permission
- OpenapiClient::PermissionDef
- OpenapiClient::PermissionIdentifier
- OpenapiClient::PermissionList
- OpenapiClient::PermissionSelection
- OpenapiClient::PolicyConfig
- OpenapiClient::PolicyTopics
- OpenapiClient::Project
- OpenapiClient::ProjectList
- OpenapiClient::RemoteConfig
- OpenapiClient::Resource
- OpenapiClient::ResourceDef
- OpenapiClient::ResourceDefinition
- OpenapiClient::ResourceDefinitions
- OpenapiClient::ResourceList
- OpenapiClient::Role
- OpenapiClient::RoleAssignment
- OpenapiClient::RoleAssignmentList
- OpenapiClient::RoleDef
- OpenapiClient::RoleList
- OpenapiClient::RolePermissions
- OpenapiClient::Tenant
- OpenapiClient::TenantList
- OpenapiClient::TenantSelection
- OpenapiClient::UpdateAction
- OpenapiClient::UpdateEnvironment
- OpenapiClient::UpdateOrganization
- OpenapiClient::UpdatePDP
- OpenapiClient::UpdateProject
- OpenapiClient::UpdateResource
- OpenapiClient::UpdateRole
- OpenapiClient::UpdateTenant
- OpenapiClient::UpdateUser
- OpenapiClient::User
- OpenapiClient::UserListWithRoles
- OpenapiClient::UserRoles
- OpenapiClient::UserWithRoles
- OpenapiClient::ValidationError
- Type: OAuth
- Flow: password
- Authorization URL:
- Scopes: N/A