OpenapiClient - the Ruby gem for the OpenFGA
A high performance and flexible authorization/permission engine built for developers and inspired by Google Zanzibar.
This SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.x
- Package version: 1.0.0
- Generator version: 7.7.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://openfga.dev
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'
api_instance = OpenapiClient::AssertionsApi.new
store_id = 'store_id_example' # String |
authorization_model_id = 'authorization_model_id_example' # String |
begin
#Read assertions for an authorization model ID
result = api_instance.read_assertions(store_id, authorization_model_id)
p result
rescue OpenapiClient::ApiError => e
puts "Exception when calling AssertionsApi->read_assertions: #{e}"
end
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
OpenapiClient::AssertionsApi | read_assertions | GET /stores/{store_id}/assertions/{authorization_model_id} | Read assertions for an authorization model ID |
OpenapiClient::AssertionsApi | write_assertions | PUT /stores/{store_id}/assertions/{authorization_model_id} | Upsert assertions for an authorization model ID |
OpenapiClient::AuthorizationModelsApi | read_authorization_model | GET /stores/{store_id}/authorization-models/{id} | Return a particular version of an authorization model |
OpenapiClient::AuthorizationModelsApi | read_authorization_models | GET /stores/{store_id}/authorization-models | Return all the authorization models for a particular store |
OpenapiClient::AuthorizationModelsApi | write_authorization_model | POST /stores/{store_id}/authorization-models | Create a new authorization model |
OpenapiClient::RelationshipQueriesApi | check | POST /stores/{store_id}/check | Check whether a user is authorized to access an object |
OpenapiClient::RelationshipQueriesApi | expand | POST /stores/{store_id}/expand | Expand all relationships in userset tree format, and following userset rewrite rules. Useful to reason about and debug a certain relationship |
OpenapiClient::RelationshipQueriesApi | list_objects | POST /stores/{store_id}/list-objects | List all objects of the given type that the user has a relation with |
OpenapiClient::RelationshipQueriesApi | list_users | POST /stores/{store_id}/list-users | List the users matching the provided filter who have a certain relation to a particular type. |
OpenapiClient::RelationshipQueriesApi | streamed_list_objects | POST /stores/{store_id}/streamed-list-objects | Stream all objects of the given type that the user has a relation with |
OpenapiClient::RelationshipTuplesApi | read | POST /stores/{store_id}/read | Get tuples from the store that matches a query, without following userset rewrite rules |
OpenapiClient::RelationshipTuplesApi | read_changes | GET /stores/{store_id}/changes | Return a list of all the tuple changes |
OpenapiClient::RelationshipTuplesApi | write | POST /stores/{store_id}/write | Add or delete tuples from the store |
OpenapiClient::StoresApi | create_store | POST /stores | Create a store |
OpenapiClient::StoresApi | delete_store | DELETE /stores/{store_id} | Delete a store |
OpenapiClient::StoresApi | get_store | GET /stores/{store_id} | Get a store |
OpenapiClient::StoresApi | list_stores | GET /stores | List all stores |
- OpenapiClient::AbortedMessageResponse
- OpenapiClient::Any
- OpenapiClient::Assertion
- OpenapiClient::AssertionTupleKey
- OpenapiClient::AuthorizationModel
- OpenapiClient::CheckRequest
- OpenapiClient::CheckRequestTupleKey
- OpenapiClient::CheckResponse
- OpenapiClient::Computed
- OpenapiClient::Condition
- OpenapiClient::ConditionMetadata
- OpenapiClient::ConditionParamTypeRef
- OpenapiClient::ContextualTupleKeys
- OpenapiClient::CreateStoreRequest
- OpenapiClient::CreateStoreResponse
- OpenapiClient::ErrorCode
- OpenapiClient::ExpandRequest
- OpenapiClient::ExpandRequestTupleKey
- OpenapiClient::ExpandResponse
- OpenapiClient::GetStoreResponse
- OpenapiClient::InternalErrorCode
- OpenapiClient::InternalErrorMessageResponse
- OpenapiClient::Leaf
- OpenapiClient::ListObjectsRequest
- OpenapiClient::ListObjectsResponse
- OpenapiClient::ListStoresResponse
- OpenapiClient::ListUsersRequest
- OpenapiClient::ListUsersResponse
- OpenapiClient::Metadata
- OpenapiClient::Node
- OpenapiClient::Nodes
- OpenapiClient::NotFoundErrorCode
- OpenapiClient::NullValue
- OpenapiClient::Object
- OpenapiClient::ObjectRelation
- OpenapiClient::PathUnknownErrorMessageResponse
- OpenapiClient::ReadAssertionsResponse
- OpenapiClient::ReadAuthorizationModelResponse
- OpenapiClient::ReadAuthorizationModelsResponse
- OpenapiClient::ReadChangesResponse
- OpenapiClient::ReadRequest
- OpenapiClient::ReadRequestTupleKey
- OpenapiClient::ReadResponse
- OpenapiClient::RelationMetadata
- OpenapiClient::RelationReference
- OpenapiClient::RelationshipCondition
- OpenapiClient::SourceInfo
- OpenapiClient::Status
- OpenapiClient::Store
- OpenapiClient::StreamResultOfStreamedListObjectsResponse
- OpenapiClient::StreamedListObjectsResponse
- OpenapiClient::Tuple
- OpenapiClient::TupleChange
- OpenapiClient::TupleKey
- OpenapiClient::TupleKeyWithoutCondition
- OpenapiClient::TupleOperation
- OpenapiClient::TypeDefinition
- OpenapiClient::TypeName
- OpenapiClient::TypedWildcard
- OpenapiClient::UnauthenticatedResponse
- OpenapiClient::UnprocessableContentErrorCode
- OpenapiClient::UnprocessableContentMessageResponse
- OpenapiClient::User
- OpenapiClient::UserTypeFilter
- OpenapiClient::Users
- OpenapiClient::Userset
- OpenapiClient::UsersetTree
- OpenapiClient::UsersetTreeDifference
- OpenapiClient::UsersetTreeTupleToUserset
- OpenapiClient::UsersetUser
- OpenapiClient::Usersets
- OpenapiClient::V1Difference
- OpenapiClient::V1TupleToUserset
- OpenapiClient::ValidationErrorMessageResponse
- OpenapiClient::WriteAssertionsRequest
- OpenapiClient::WriteAuthorizationModelRequest
- OpenapiClient::WriteAuthorizationModelResponse
- OpenapiClient::WriteRequest
- OpenapiClient::WriteRequestDeletes
- OpenapiClient::WriteRequestWrites
Endpoints do not require authorization.