All URIs are relative to http://127.0.0.1:7400
Method | HTTP request | Description |
---|---|---|
admin_service_list_relations | GET /v1beta1/admin/relations | List all relations |
frontier_service_create_relation | POST /v1beta1/relations | Create relation |
frontier_service_delete_relation | DELETE /v1beta1/relations/{relation}/object/{object}/subject/{subject} | Delete relation |
frontier_service_get_relation | GET /v1beta1/relations/{id} | Get relation |
V1beta1ListRelationsResponse admin_service_list_relations(subject=subject, object=object)
List all relations
- Basic Authentication (Basic):
import time
import os
import frontier_api
from frontier_api.models.v1beta1_list_relations_response import V1beta1ListRelationsResponse
from frontier_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://127.0.0.1:7400
# See configuration.py for a list of all supported configuration parameters.
configuration = frontier_api.Configuration(
host = "http://127.0.0.1:7400"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: Basic
configuration = frontier_api.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with frontier_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = frontier_api.RelationApi(api_client)
subject = 'subject_example' # str | The subject to filter by. (optional)
object = 'object_example' # str | The object to filter by. (optional)
try:
# List all relations
api_response = api_instance.admin_service_list_relations(subject=subject, object=object)
print("The response of RelationApi->admin_service_list_relations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling RelationApi->admin_service_list_relations: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
subject | str | The subject to filter by. | [optional] |
object | str | The object to filter by. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A successful response. | - |
400 | Bad Request - The request was malformed or contained invalid parameters. | - |
401 | Unauthorized - Authentication is required | - |
403 | Forbidden - User does not have permission to access the resource | - |
404 | Not Found - The requested resource was not found | - |
500 | Internal Server Error. Returned when theres is something wrong with Frontier server. | - |
0 | An unexpected error response. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V1beta1CreateRelationResponse frontier_service_create_relation(body)
Create relation
- Basic Authentication (Basic):
import time
import os
import frontier_api
from frontier_api.models.v1beta1_create_relation_response import V1beta1CreateRelationResponse
from frontier_api.models.v1beta1_relation_request_body import V1beta1RelationRequestBody
from frontier_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://127.0.0.1:7400
# See configuration.py for a list of all supported configuration parameters.
configuration = frontier_api.Configuration(
host = "http://127.0.0.1:7400"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: Basic
configuration = frontier_api.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with frontier_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = frontier_api.RelationApi(api_client)
body = frontier_api.V1beta1RelationRequestBody() # V1beta1RelationRequestBody |
try:
# Create relation
api_response = api_instance.frontier_service_create_relation(body)
print("The response of RelationApi->frontier_service_create_relation:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling RelationApi->frontier_service_create_relation: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | V1beta1RelationRequestBody |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A successful response. | - |
400 | Bad Request - The request was malformed or contained invalid parameters. | - |
401 | Unauthorized - Authentication is required | - |
403 | Forbidden - User does not have permission to access the resource | - |
404 | Not Found - The requested resource was not found | - |
500 | Internal Server Error. Returned when theres is something wrong with Frontier server. | - |
0 | An unexpected error response. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object frontier_service_delete_relation(relation, object, subject)
Delete relation
Remove a subject having a relation from an object
- Basic Authentication (Basic):
import time
import os
import frontier_api
from frontier_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://127.0.0.1:7400
# See configuration.py for a list of all supported configuration parameters.
configuration = frontier_api.Configuration(
host = "http://127.0.0.1:7400"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: Basic
configuration = frontier_api.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with frontier_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = frontier_api.RelationApi(api_client)
relation = 'relation_example' # str |
object = 'object_example' # str | objectnamespace:uuid
subject = 'subject_example' # str | subjectnamespace:uuid
try:
# Delete relation
api_response = api_instance.frontier_service_delete_relation(relation, object, subject)
print("The response of RelationApi->frontier_service_delete_relation:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling RelationApi->frontier_service_delete_relation: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
relation | str | ||
object | str | objectnamespace:uuid | |
subject | str | subjectnamespace:uuid |
object
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A successful response. | - |
400 | Bad Request - The request was malformed or contained invalid parameters. | - |
401 | Unauthorized - Authentication is required | - |
403 | Forbidden - User does not have permission to access the resource | - |
404 | Not Found - The requested resource was not found | - |
500 | Internal Server Error. Returned when theres is something wrong with Frontier server. | - |
0 | An unexpected error response. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V1beta1GetRelationResponse frontier_service_get_relation(id)
Get relation
Returns a relation by ID
- Basic Authentication (Basic):
import time
import os
import frontier_api
from frontier_api.models.v1beta1_get_relation_response import V1beta1GetRelationResponse
from frontier_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://127.0.0.1:7400
# See configuration.py for a list of all supported configuration parameters.
configuration = frontier_api.Configuration(
host = "http://127.0.0.1:7400"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: Basic
configuration = frontier_api.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with frontier_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = frontier_api.RelationApi(api_client)
id = 'id_example' # str |
try:
# Get relation
api_response = api_instance.frontier_service_get_relation(id)
print("The response of RelationApi->frontier_service_get_relation:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling RelationApi->frontier_service_get_relation: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A successful response. | - |
400 | Bad Request - The request was malformed or contained invalid parameters. | - |
401 | Unauthorized - Authentication is required | - |
403 | Forbidden - User does not have permission to access the resource | - |
404 | Not Found - The requested resource was not found | - |
500 | Internal Server Error. Returned when theres is something wrong with Frontier server. | - |
0 | An unexpected error response. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]