Package: openfga-sdk
Python SDK for OpenFGAThis is an autogenerated python SDK for OpenFGA. It provides a wrapper around theOpenFGA API definition.Table of ContentsAbout OpenFGAResourcesInstallationGetting StartedInitializing the API ClientGet your Store IDCalling the APIStoresList All StoresCreate a StoreGet a StoreDelete a StoreAuthorization ModelsRead Authorization ModelsWrite Authorization ModelRead a Single Authorization ModelRead the Latest Authorization ModelRelationship TuplesRead Relationship Tuple Changes (Watch)Read Relationship TuplesWrite (Create and Delete) Relationship TuplesRelationship QueriesCheckBatch CheckExpandList ObjectsList RelationsAssertionsRead AssertionsWrite AssertionsAPI EndpointsModelsContributingIssuesPull RequestsLicenseAboutOpenFGAis an open source Fine-Grained Authorization solution inspired byGoogle's Zanzibar paper. It was created by the FGA team atAuth0based onAuth0 Fine-Grained Authorization (FGA), available undera permissive license (Apache-2)and welcomes community contributions.OpenFGA is designed to make it easy for application builders to model their permission layer, and to add and integrate fine-grained authorization into their applications. OpenFGA’s design is optimized for reliability and low latency at a high scale.ResourcesOpenFGA DocumentationOpenFGA API DocumentationTwitterOpenFGA Discord CommunityZanzibar AcademyGoogle's Zanzibar Paper (2019)Installationpip installPyPIThe openfga_sdk is available to be downloaded via PyPI, you can install directly using:pip3installopenfga_sdk(you may need to runpipwith root permission:sudo pip3 install openfga_sdk)Then import the package:importopenfga_sdkGitHubThe openfga_sdk is also hosted in GitHub, you can install directly using:pip3installhttps://github.com/openfga/python-sdk.git(you may need to runpipwith root permission:sudo pip3 install https://github.com/openfga/python-sdk.git)Then import the package:importopenfga_sdkSetuptoolsInstall viaSetuptools.pythonsetup.pyinstall--user(orsudo python setup.py installto install the package for all users)Then import the package:importopenfga_sdkGetting StartedInitializing the API ClientLearn how to initialize your SDKThe documentation below refers to theOpenFgaClient, to read the documentation forOpenFgaApi, check out thev0.1.1documentation.The OpenFgaClient will by default retry API requests up to 15 times on 429 and 5xx errors.No Credentialsfromopenfga_sdkimportClientConfiguration,OpenFgaClientasyncdefmain():configuration=ClientConfiguration(api_url=FGA_API_URL,# requiredstore_id=FGA_STORE_ID,# optional, not needed when calling `CreateStore` or `ListStores`authorization_model_id=FGA_AUTHORIZATION_MODEL_ID,# Optional, can be overridden per request)# Enter a context with an instance of the OpenFgaClientasyncwithOpenFgaClient(configuration)asfga_client:api_response=awaitfga_client.read_authorization_models()awaitfga_client.close()returnapi_responseAPI Tokenfromopenfga_sdkimportClientConfiguration,OpenFgaClientfromopenfga_sdk.credentialsimportCredentialConfiguration,Credentialsasyncdefmain():configuration=ClientConfiguration(api_url=FGA_API_URL,# requiredstore_id=FGA_STORE_ID,# optional, not needed when calling `CreateStore` or `ListStores`authorization_model_id=FGA_AUTHORIZATION_MODEL_ID,# Optional, can be overridden per requestcredentials=Credentials(method='api_token',configuration=CredentialConfiguration(api_token=FGA_API_TOKEN,)))# Enter a context with an instance of the OpenFgaClientasyncwithOpenFgaClient(configuration)asfga_client:api_response=awaitfga_client.read_authorization_models()awaitfga_client.close()returnapi_responseClient Credentialsfromopenfga_sdkimportClientConfiguration,OpenFgaClientfromopenfga_sdk.credentialsimportCredentials,CredentialConfigurationasyncdefmain():configuration=ClientConfiguration(api_url=FGA_API_URL,# requiredstore_id=FGA_STORE_ID,# optional, not needed when calling `CreateStore` or `ListStores`authorization_model_id=FGA_AUTHORIZATION_MODEL_ID,# Optional, can be overridden per requestcredentials=Credentials(method='client_credentials',configuration=CredentialConfiguration(api_issuer=FGA_API_TOKEN_ISSUER,api_audience=FGA_API_AUDIENCE,client_id=FGA_CLIENT_ID,client_secret=FGA_CLIENT_SECRET,)))# Enter a context with an instance of the OpenFgaClientasyncwithOpenFgaClient(configuration)asfga_client:api_response=awaitfga_client.read_authorization_models()awaitfga_client.close()returnapi_responseSynchronous ClientTo run outside of an async context, the project exports a synchronous client
fromopenfga_sdk.syncthat supports all the credential types and calls,
without requiring async/await.fromopenfga_sdk.syncimportClientConfiguration,OpenFgaClientdefmain():configuration=ClientConfiguration(api_url=FGA_API_URL,# requiredstore_id=FGA_STORE_ID,# optional, not needed when calling `CreateStore` or `ListStores`authorization_model_id=FGA_AUTHORIZATION_MODEL_ID,# optional, can be overridden per request)# Enter a context with an instance of the OpenFgaClientwithOpenFgaClient(configuration)asfga_client:api_response=fga_client.read_authorization_models()returnapi_responseGet your Store IDYou need your store id to call the OpenFGA API (unless it is to call theCreateStoreorListStoresmethods).If your server is configured withauthentication enabled, you also need to have your credentials ready.Calling the APIStoresList StoresGet a paginated list of stores.API Documentation# from openfga_sdk.sync import OpenFgaClient# Initialize the fga_client# fga_client = OpenFgaClient(configuration)options={"page_size":25,"continuation_token":"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ=="}response=awaitfga_client.list_stores(options)# response = ListStoresResponse(...)# response.stores = [Store({"id": "01FQH7V8BEG3GPQW93KTRFR8JB", "name": "FGA Demo Store", "created_at": "2022-01-01T00:00:00.000Z", "updated_at": "2022-01-01T00:00:00.000Z"})]Create StoreCreate and initialize a store.API Documentation# from openfga_sdk import CreateStoreRequest, OpenFgaClient# Initialize the fga_client# fga_client = OpenFgaClient(configuration)body=CreateStoreRequest(name="FGA Demo Store",)response=awaitfga_client.create_store(body)# response.id = "01FQH7V8BEG3GPQW93KTRFR8JB"Get StoreGet information about the current store.API DocumentationRequires a client initialized with a storeId# from openfga_sdk import OpenFgaClient# Initialize the fga_client# fga_client = OpenFgaClient(configuration)response=awaitfga_client.get_store()# response = Store({"id": "01FQH7V8BEG3GPQW93KTRFR8JB", "name": "FGA Demo Store", "created_at": "2022-01-01T00:00:00.000Z", "updated_at": "2022-01-01T00:00:00.000Z"})Delete StoreDelete a store.API DocumentationRequires a client initialized with a storeId# from openfga_sdk import OpenFgaClient# Initialize the fga_client# fga_client = OpenFgaClient(configuration)response=awaitfga_client.delete_store()Authorization ModelsRead Authorization ModelsRead all authorization models in the store.API Documentation# from openfga_sdk import OpenFgaClient# Initialize the fga_client# fga_client = OpenFgaClient(configuration)options={"page_size":25,"continuation_token":"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ=="}response=awaitfga_client.read_authorization_models(options)# response.authorization_models = [AuthorizationModel(id='01GXSA8YR785C4FYS3C0RTG7B1', schema_version = '1.1', type_definitions=type_definitions[...], AuthorizationModel(id='01GXSBM5PVYHCJNRNKXMB4QZTW', schema_version = '1.1', type_definitions=type_definitions[...])]Write Authorization ModelCreate a new authorization model.API DocumentationNote: To learn how to build your authorization model, check the Docs athttps://openfga.dev/docs.Learn more aboutthe OpenFGA configuration language.You can use theOpenFGA Syntax Transformerto convert between the friendly DSL and the JSON authorization model.# from openfga_sdk import (#     Condition, ConditionParamTypeRef, Metadata, ObjectRelation, OpenFgaClient, RelationMetadata,#     RelationReference, TypeDefinition, Userset, Usersets, WriteAuthorizationModelRequest# )# Initialize the fga_client# fga_client = OpenFgaClient(configuration)body=WriteAuthorizationModelRequest(schema_version="1.1",type_definitions=[TypeDefinition(type="user"),TypeDefinition(type="document",relations=dict(writer=Userset(this=dict(),),viewer=Userset(union=Usersets(child=[Userset(this=dict()),Userset(computed_userset=ObjectRelation(object="",relation="writer",)),],),),),metadata=Metadata(relations=dict(writer=RelationMetadata(directly_related_user_types=[RelationReference(type="user"),RelationReference(type="user",condition="ViewCountLessThan200"),]),viewer=RelationMetadata(directly_related_user_types=[RelationReference(type="user"),]))))],conditions=dict(ViewCountLessThan200=Condition(name="ViewCountLessThan200",expression="ViewCount < 200",parameters=dict(ViewCount=ConditionParamTypeRef(type_name="TYPE_NAME_INT"),Type=ConditionParamTypeRef(type_name="TYPE_NAME_STRING"),Name=ConditionParamTypeRef(type_name="TYPE_NAME_STRING"),))))response=awaitfga_client.write_authorization_model(body)# response.authorization_model_id = "01GXSA8YR785C4FYS3C0RTG7B1"Read a Single Authorization ModelRead a particular authorization model.API Documentation# from openfga_sdk import OpenFgaClient# Initialize the fga_client# fga_client = OpenFgaClient(configuration)options={# You can rely on the model id set in the configuration or override it for this specific request"authorization_model_id":"01GXSA8YR785C4FYS3C0RTG7B1"}response=awaitfga_client.read_authorization_model(options)# response.authorization_model =  AuthorizationModel(id='01GXSA8YR785C4FYS3C0RTG7B1', schema_version = '1.1', type_definitions=type_definitions[...])Read the Latest Authorization ModelReads the latest authorization model (note: this ignores the model id in configuration).API Documentation# from openfga_sdk import ClientConfiguration, OpenFgaClient# Create the cofiguration object# configuration = ClientConfiguration(#     ...#     authorization_model_id = FGA_AUTHORIZATION_MODEL_ID,#     ...# )# Initialize the fga_client# fga_client = OpenFgaClient(configuration)response=awaitfga_client.read_latest_authorization_model()# response.authorization_model =  AuthorizationModel(id='01GXSA8YR785C4FYS3C0RTG7B1', schema_version = '1.1', type_definitions=type_definitions[...])Relationship TuplesRead Relationship Tuple Changes (Watch)Reads the list of historical relationship tuple writes and deletes.API Documentation# from openfga_sdk import OpenFgaClient# from openfga_sdk.client.models import ClientReadChangesRequest# Initialize the fga_client# fga_client = OpenFgaClient(configuration)options={# You can rely on the model id set in the configuration or override it for this specific request"page_size":"25","continuation_token":"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ=="}body=ClientReadChangesRequest(type="document")response=awaitfga_client.read_changes(body,options)# response.continuation_token = ...# response.changes = [TupleChange(tuple_key=TupleKey(object="...",relation="...",user="..."),operation=TupleOperation("TUPLE_OPERATION_WRITE"),timestamp=datetime.fromisoformat("..."))]Read Relationship TuplesReads the relationship tuples stored in the database. It does not evaluate nor exclude invalid tuples according to the authorization model.API Documentation# from openfga_sdk import OpenFgaClient, ReadRequestTupleKey# Initialize the fga_client# fga_client = OpenFgaClient(configuration)# Find if a relationship tuple stating that a certain user is a viewer of certain documentbody=ReadRequestTupleKey(user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",relation="viewer",object="document:roadmap",)response=awaitfga_client.read(body)# response = ReadResponse({"tuples": [Tuple({"key": TupleKey({"user":"...","relation":"...","object":"..."}), "timestamp": datetime.fromisoformat("...") })]})# from openfga_sdk import OpenFgaClient, ReadRequestTupleKey# Initialize the fga_client# fga_client = OpenFgaClient(configuration)# Find all relationship tuples where a certain user has a relationship as any relation to a certain documentbody=ReadRequestTupleKey(user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",object="document:roadmap",)response=awaitfga_client.read(body)# response = ReadResponse({"tuples": [Tuple({"key": TupleKey({"user":"...","relation":"...","object":"..."}), "timestamp": datetime.fromisoformat("...") })]})# from openfga_sdk import OpenFgaClient, ReadRequestTupleKey# Initialize the fga_client# fga_client = OpenFgaClient(configuration)# Find all relationship tuples where a certain user is a viewer of any documentbody=ReadRequestTupleKey(user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",relation="viewer",object="document:",)response=awaitfga_client.read(body)# response = ReadResponse({"tuples": [Tuple({"key": TupleKey({"user":"...","relation":"...","object":"..."}), "timestamp": datetime.fromisoformat("...") })]})# from openfga_sdk import OpenFgaClient, ReadRequestTupleKey# Initialize the fga_client# fga_client = OpenFgaClient(configuration)# Find all relationship tuples where any user has a relationship as any relation with a particular documentbody=ReadRequestTupleKey(object="document:roadmap",)response=awaitfga_client.read(body)# response = ReadResponse({"tuples": [Tuple({"key": TupleKey({"user":"...","relation":"...","object":"..."}), "timestamp": datetime.fromisoformat("...") })]})# from openfga_sdk import OpenFgaClient, ReadRequestTupleKey# Initialize the fga_client# fga_client = OpenFgaClient(configuration)# Read all stored relationship tuplesbody=ReadRequestTupleKey()response=awaitapi_instance.read(body)# response = ReadResponse({"tuples": [Tuple({"key": TupleKey({"user":"...","relation":"...","object":"..."}), "timestamp": datetime.fromisoformat("...") })]})Write (Create and Delete) Relationship TuplesCreate and/or delete relationship tuples to update the system state.API DocumentationTransaction mode (default)By default, write runs in a transaction mode where any invalid operation (deleting a non-existing tuple, creating an existing tuple, one of the tuples was invalid) or a server error will fail the entire operation.# from openfga_sdk import OpenFgaClient, RelationshipCondition# from openfga_sdk.client.models import ClientTuple, ClientWriteRequest# Initialize the fga_client# fga_client = OpenFgaClient(configuration)options={# You can rely on the model id set in the configuration or override it for this specific request"authorization_model_id":"01GXSA8YR785C4FYS3C0RTG7B1"}body=ClientWriteRequest(writes=[ClientTuple(user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",relation="viewer",object="document:roadmap",condition=RelationshipCondition(name='ViewCountLessThan200',context=dict(Name='Roadmap',Type='Document',),),),ClientTuple(user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",relation="viewer",object="document:budget",),],deletes=[ClientTuple(user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",relation="writer",object="document:roadmap",),],)response=awaitfga_client.write(body,options)Conveniencewrite_tuplesanddelete_tuplesmethods are also available.Non-transaction modeThe SDK will split the writes into separate requests and send them sequentially to avoid violating rate limits.# from openfga_sdk import OpenFgaClient, RelationshipCondition# from openfga_sdk.client.models import ClientTuple, ClientWriteRequest, WriteTransactionOpts# Initialize the fga_client# fga_client = OpenFgaClient(configuration)options={# You can rely on the model id set in the configuration or override it for this specific request"authorization_model_id":"01GXSA8YR785C4FYS3C0RTG7B1","transaction":WriteTransactionOpts(disabled=True,max_parallel_requests=10,# Maximum number of requests to issue in parallelmax_per_chunk=1,# Maximum number of requests to be sent in a transaction in a particular chunk)}body=ClientWriteRequest(writes=[ClientTuple(user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",relation="viewer",object="document:roadmap",),ClientTuple(user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",relation="viewer",object="document:budget",condition=RelationshipCondition(name='ViewCountLessThan200',context=dict(Name='Roadmap',Type='Document',),),),],deletes=[ClientTuple(user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",relation="writer",object="document:roadmap",),],)response=awaitfga_client.write(body,options)Relationship QueriesCheckCheck if a user has a particular relation with an object.API Documentation# from openfga_sdk import OpenFgaClient# from openfga_sdk.client import ClientCheckRequest# Initialize the fga_client# fga_client = OpenFgaClient(configuration)options={# You can rely on the model id set in the configuration or override it for this specific request"authorization_model_id":"01GXSA8YR785C4FYS3C0RTG7B1"}body=ClientCheckRequest(user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",relation="writer",object="document:roadmap",context=dict(ViewCount=100),)response=awaitfga_client.check(body,options)# response.allowed = TrueBatch CheckRun a set ofchecks. Batch Check will returnallowed: falseif it encounters an error, and will return the error in the body.
If 429s or 5xxs are encountered, the underlying check will retry up to 15 times before giving up.# from openfga_sdk import OpenFgaClient# from openfga_sdk.client import ClientCheckRequest# from openfga_sdk.client.models import ClientTuple# Initialize the fga_client# fga_client = OpenFgaClient(configuration)options={# You can rely on the model id set in the configuration or override it for this specific request"authorization_model_id":"01GXSA8YR785C4FYS3C0RTG7B1"}body=[ClientCheckRequest(user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",relation="viewer",object="document:roadmap",contextual_tuples=[# optionalClientTuple(user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",relation="editor",object="document:roadmap",),],context=dict(ViewCount=100)),ClientCheckRequest(user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",relation="admin",object="document:roadmap",contextual_tuples=[# optionalClientTuple(user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",relation="editor",object="document:roadmap",),]),ClientCheckRequest(user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",relation="creator",object="document:roadmap",),ClientCheckRequest(user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",relation="deleter",object="document:roadmap",)]response=awaitfga_client.batch_check(body,options)# response.responses = [{#   allowed: false,#   request: {#     user: "user:81684243-9356-4421-8fbf-a4f8d36aa31b",#     relation: "viewer",#     object: "document:roadmap",#     contextual_tuples: [{#       user: "user:81684243-9356-4421-8fbf-a4f8d36aa31b",#       relation: "editor",#       object: "document:roadmap"#     }],#    context=dict(#        ViewCount=100#    )#   }# }, {#   allowed: false,#   request: {#     user: "user:81684243-9356-4421-8fbf-a4f8d36aa31b",#     relation: "admin",#     object: "document:roadmap",#     contextual_tuples: [{#       user: "user:81684243-9356-4421-8fbf-a4f8d36aa31b",#       relation: "editor",#       object: "document:roadmap"#     }]#   }# }, {#   allowed: false,#   request: {#     user: "user:81684243-9356-4421-8fbf-a4f8d36aa31b",#     relation: "creator",#     object: "document:roadmap",#   },#   error: <FgaError ...># }, {#   allowed: true,#   request: {#     user: "user:81684243-9356-4421-8fbf-a4f8d36aa31b",#     relation: "deleter",#     object: "document:roadmap",#   }},# ]ExpandExpands the relationships in userset tree format.API Documentation# from openfga_sdk import OpenFgaClient# from openfga_sdk.client.models import ClientExpandRequest# Initialize the fga_client# fga_client = OpenFgaClient(configuration)options={# You can rely on the model id set in the configuration or override it for this specific request"authorization_model_id":"01GXSA8YR785C4FYS3C0RTG7B1"}body=ClientExpandRequest(relation="viewer",object="document:roadmap",)response=awaitfga_client.expand(body.options)# response = ExpandResponse({"tree": UsersetTree({"root": Node({"name": "document:roadmap#viewer", "leaf": Leaf({"users": Users({"users": ["user:81684243-9356-4421-8fbf-a4f8d36aa31b", "user:f52a4f7a-054d-47ff-bb6e-3ac81269988f"]})})})})})List ObjectsList the objects of a particular type a user has access to.API Documentation# from openfga_sdk import OpenFgaClient# from openfga_sdk.client.models import ClientListObjectsRequest, ClientTuple# Initialize the fga_client# fga_client = OpenFgaClient(configuration)options={# You can rely on the model id set in the configuration or override it for this specific request"authorization_model_id":"01GXSA8YR785C4FYS3C0RTG7B1"}body=ClientListObjectsRequest(user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",relation="viewer",type="document",contextual_tuples=[# optionalClientTuple(user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",relation="writer",object="document:budget",),],context=dict(ViewCount=100))response=awaitfga_client.list_objects(body)# response.objects = ["document:roadmap"]List RelationsList the relations a user has on an object.# from openfga_sdk import OpenFgaClient# from openfga_sdk.client.models import ClientListRelationsRequest# Initialize the fga_client# fga_client = OpenFgaClient(configuration)options={# You can rely on the model id set in the configuration or override it for this specific request"authorization_model_id":"01GXSA8YR785C4FYS3C0RTG7B1"}body=ClientListRelationsRequest(user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",object="document:roadmap",relations=["can_view","can_edit","can_delete","can_rename"],contextual_tuples=[# optionalClientTuple(user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",relation="writer",object="document:budget",),],context=dict(ViewCount=100))response=awaitfga_client.list_relations(body,options)# response.relations = ["can_view", "can_edit"]AssertionsRead AssertionsRead assertions for a particular authorization model.API Documentation# from openfga_sdk import OpenFgaClient# Initialize the fga_client# fga_client = OpenFgaClient(configuration)options={# You can rely on the model id set in the configuration or override it for this specific request"authorization_model_id":"01GXSA8YR785C4FYS3C0RTG7B1"}response=awaitfga_client.read_assertions(options)Write AssertionsUpdate the assertions for a particular authorization model.API Documentation# from openfga_sdk import OpenFgaClient# from openfga_sdk.client.models import ClientAssertion# Initialize the fga_client# fga_client = OpenFgaClient(configuration)options={# You can rely on the model id set in the configuration or override it for this specific request"authorization_model_id":"01GXSA8YR785C4FYS3C0RTG7B1"}body=[ClientAssertion(user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",relation="viewer",object="document:roadmap",expectation=True,)]response=awaitfga_client.write_assertions(body,options)API EndpointsClassMethodHTTP requestDescriptionOpenFgaApicheckPOST/stores/{store_id}/checkCheck whether a user is authorized to access an objectOpenFgaApicreate_storePOST/storesCreate a storeOpenFgaApidelete_storeDELETE/stores/{store_id}Delete a storeOpenFgaApiexpandPOST/stores/{store_id}/expandExpand all relationships in userset tree format, and following userset rewrite rules.  Useful to reason about and debug a certain relationshipOpenFgaApiget_storeGET/stores/{store_id}Get a storeOpenFgaApilist_objectsPOST/stores/{store_id}/list-objectsList all objects of the given type that the user has a relation withOpenFgaApilist_storesGET/storesList all storesOpenFgaApireadPOST/stores/{store_id}/readGet tuples from the store that matches a query, without following userset rewrite rulesOpenFgaApiread_assertionsGET/stores/{store_id}/assertions/{authorization_model_id}Read assertions for an authorization model IDOpenFgaApiread_authorization_modelGET/stores/{store_id}/authorization-models/{id}Return a particular version of an authorization modelOpenFgaApiread_authorization_modelsGET/stores/{store_id}/authorization-modelsReturn all the authorization models for a particular storeOpenFgaApiread_changesGET/stores/{store_id}/changesReturn a list of all the tuple changesOpenFgaApiwritePOST/stores/{store_id}/writeAdd or delete tuples from the storeOpenFgaApiwrite_assertionsPUT/stores/{store_id}/assertions/{authorization_model_id}Upsert assertions for an authorization model IDOpenFgaApiwrite_authorization_modelPOST/stores/{store_id}/authorization-modelsCreate a new authorization modelModelsDocumentation For ModelsAbortedMessageResponseAnyAssertionAssertionTupleKeyAuthorizationModelCheckRequestCheckRequestTupleKeyCheckResponseComputedConditionConditionParamTypeRefContextualTupleKeysCreateStoreRequestCreateStoreResponseDifferenceErrorCodeExpandRequestExpandRequestTupleKeyExpandResponseGetStoreResponseInternalErrorCodeInternalErrorMessageResponseLeafListObjectsRequestListObjectsResponseListStoresResponseMetadataNodeNodesNotFoundErrorCodeNullValueObjectRelationPathUnknownErrorMessageResponseReadAssertionsResponseReadAuthorizationModelResponseReadAuthorizationModelsResponseReadChangesResponseReadRequestReadRequestTupleKeyReadResponseRelationMetadataRelationReferenceRelationshipConditionStatusStoreTupleTupleChangeTupleKeyTupleKeyWithoutConditionTupleOperationTupleToUsersetTypeDefinitionTypeNameUsersUsersetUsersetTreeUsersetTreeDifferenceUsersetTreeTupleToUsersetUsersetsValidationErrorMessageResponseWriteAssertionsRequestWriteAuthorizationModelRequestWriteAuthorizationModelResponseWriteRequestWriteRequestDeletesWriteRequestWritesContributingIssuesIf you have found a bug or if you have a feature request, please report them on thesdk-generator repoissues section. Please do not report security vulnerabilities on the public GitHub issue tracker.Pull RequestsAll changes made to this repo will be overwritten on the next generation, so we kindly ask that you send all pull requests related to the SDKs to thesdk-generator repoinstead.AuthorOpenFGALicenseThis project is licensed under the Apache-2.0 license. See theLICENSEfile for more info.The code in this repo was auto generated byOpenAPI Generatorfrom a template based on thepython legacy template, licensed under theApache License 2.0.