Skip to content

raystack/frontier-python

Repository files navigation

frontier-python

The Frontier APIs adhere to the OpenAPI specification, also known as Swagger, which provides a standardized approach for designing, documenting, and consuming RESTful APIs. With OpenAPI, you gain a clear understanding of the API endpoints, request/response structures, and authentication mechanisms supported by the Frontier APIs. By leveraging the OpenAPI specification, developers can easily explore and interact with the Frontier APIs using a variety of tools and libraries. The OpenAPI specification enables automatic code generation, interactive API documentation, and seamless integration with API testing frameworks, making it easier than ever to integrate Frontier into your existing applications and workflows.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 0.2.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://raystack.org/

Requirements.

Python 3.7+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/raystack/frontier-python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/raystack/frontier-python.git)

Then import the package:

import frontier_api

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import frontier_api

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import time
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.AuditLogApi(api_client)
    org_id = 'org_id_example' # str | 
    body = frontier_api.FrontierServiceCreateOrganizationAuditLogsRequest() # FrontierServiceCreateOrganizationAuditLogsRequest | 

    try:
        # Create audit log
        api_response = api_instance.frontier_service_create_organization_audit_logs(org_id, body)
        print("The response of AuditLogApi->frontier_service_create_organization_audit_logs:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AuditLogApi->frontier_service_create_organization_audit_logs: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://127.0.0.1:7400

Class Method HTTP request Description
AuditLogApi frontier_service_create_organization_audit_logs POST /v1beta1/organization/{orgId}/auditlogs Create audit log
AuditLogApi frontier_service_get_organization_audit_log GET /v1beta1/organization/{orgId}/auditlogs/{id} Get audit log
AuditLogApi frontier_service_list_organization_audit_logs GET /v1beta1/organization/{orgId}/auditlogs List audit logs
AuthnApi frontier_service_auth_callback GET /v1beta1/auth/callback Callback from a strategy
AuthnApi frontier_service_auth_callback2 POST /v1beta1/auth/callback Callback from a strategy
AuthnApi frontier_service_auth_logout GET /v1beta1/auth/logout Logout from a strategy
AuthnApi frontier_service_auth_logout2 DELETE /v1beta1/auth/logout Logout from a strategy
AuthnApi frontier_service_auth_token POST /v1beta1/auth/token Generate access token by given credentials
AuthnApi frontier_service_authenticate GET /v1beta1/auth/register/{strategyName} Authenticate with a strategy
AuthnApi frontier_service_authenticate2 POST /v1beta1/auth/register/{strategyName} Authenticate with a strategy
AuthnApi frontier_service_list_auth_strategies GET /v1beta1/auth List authentication strategies
AuthzApi admin_service_check_federated_resource_permission POST /v1beta1/admin/check Check
AuthzApi frontier_service_batch_check_permission POST /v1beta1/batchcheck Batch check
AuthzApi frontier_service_check_resource_permission POST /v1beta1/check Check
AuthzApi frontier_service_get_jwks GET /v1beta1/auth/jwks Get well known JWKs
AuthzApi frontier_service_get_jwks2 GET /.well-known/jwks.json Get well known JWKs
BillingApi frontier_service_create_billing_account POST /v1beta1/organizations/{orgId}/billing Create billing account
BillingApi frontier_service_delete_billing_account DELETE /v1beta1/organizations/{orgId}/billing/{id} Delete billing account
BillingApi frontier_service_get_billing_account GET /v1beta1/organizations/{orgId}/billing/{id} Get billing account
BillingApi frontier_service_get_billing_balance GET /v1beta1/organizations/{orgId}/billing/{id}/balance Get billing balance
BillingApi frontier_service_list_billing_accounts GET /v1beta1/organizations/{orgId}/billing List billing accounts
BillingApi frontier_service_update_billing_account PUT /v1beta1/organizations/{orgId}/billing/{id} Update billing account
CheckoutApi admin_service_delegated_checkout POST /v1beta1/admin/organizations/{orgId}/billing/{billingId}/checkouts Checkout a feature or subscription
CheckoutApi frontier_service_create_checkout POST /v1beta1/organizations/{orgId}/billing/{billingId}/checkouts Checkout a feature or subscription
CheckoutApi frontier_service_list_checkouts GET /v1beta1/organizations/{orgId}/billing/{billingId}/checkouts List checkouts
EntitlementApi frontier_service_check_feature_entitlement POST /v1beta1/organizations/{orgId}/billing/{billingId}/check Check entitlement
FeatureApi frontier_service_create_feature POST /v1beta1/billing/features Create feature
FeatureApi frontier_service_get_feature GET /v1beta1/billing/features/{id} Get feature
FeatureApi frontier_service_list_features GET /v1beta1/billing/features List features
FeatureApi frontier_service_update_feature PUT /v1beta1/billing/features/{id} Update feature
GroupApi admin_service_list_groups GET /v1beta1/admin/groups List all groups
GroupApi frontier_service_add_group_users POST /v1beta1/organizations/{orgId}/groups/{id}/users Add group user
GroupApi frontier_service_create_group POST /v1beta1/organizations/{orgId}/groups Create group
GroupApi frontier_service_delete_group DELETE /v1beta1/organizations/{orgId}/groups/{id} Delete group
GroupApi frontier_service_disable_group POST /v1beta1/organizations/{orgId}/groups/{id}/disable Disable group
GroupApi frontier_service_enable_group POST /v1beta1/organizations/{orgId}/groups/{id}/enable Enable group
GroupApi frontier_service_get_group GET /v1beta1/organizations/{orgId}/groups/{id} Get group
GroupApi frontier_service_list_group_users GET /v1beta1/organizations/{orgId}/groups/{id}/users List group users
GroupApi frontier_service_list_organization_groups GET /v1beta1/organizations/{orgId}/groups List organization groups
GroupApi frontier_service_remove_group_user DELETE /v1beta1/organizations/{orgId}/groups/{id}/users/{userId} Remove group user
GroupApi frontier_service_update_group PUT /v1beta1/organizations/{orgId}/groups/{id} Update group
MetaSchemaApi frontier_service_create_meta_schema POST /v1beta1/meta/schemas Create metaschema
MetaSchemaApi frontier_service_delete_meta_schema DELETE /v1beta1/meta/schemas/{id} Delete metaschema
MetaSchemaApi frontier_service_get_meta_schema GET /v1beta1/meta/schemas/{id} Get metaschema
MetaSchemaApi frontier_service_list_meta_schemas GET /v1beta1/meta/schemas List metaschemas
MetaSchemaApi frontier_service_update_meta_schema PUT /v1beta1/meta/schemas/{id} Update metaschema
NamespaceApi frontier_service_get_namespace GET /v1beta1/namespaces/{id} Get namespace
NamespaceApi frontier_service_list_namespaces GET /v1beta1/namespaces Get all namespaces
OrganizationApi admin_service_list_all_organizations GET /v1beta1/admin/organizations List all organizations
OrganizationApi frontier_service_accept_organization_invitation POST /v1beta1/organizations/{orgId}/invitations/{id}/accept Accept pending invitation
OrganizationApi frontier_service_add_organization_users POST /v1beta1/organizations/{id}/users Add organization user
OrganizationApi frontier_service_create_organization POST /v1beta1/organizations Create organization
OrganizationApi frontier_service_create_organization_domain POST /v1beta1/organizations/{orgId}/domains Create org domain
OrganizationApi frontier_service_create_organization_invitation POST /v1beta1/organizations/{orgId}/invitations Invite user
OrganizationApi frontier_service_delete_organization DELETE /v1beta1/organizations/{id} Delete organization
OrganizationApi frontier_service_delete_organization_domain DELETE /v1beta1/organizations/{orgId}/domains/{id} Delete org domain
OrganizationApi frontier_service_delete_organization_invitation DELETE /v1beta1/organizations/{orgId}/invitations/{id} Delete pending invitation
OrganizationApi frontier_service_disable_organization POST /v1beta1/organizations/{id}/disable Disable organization
OrganizationApi frontier_service_enable_organization POST /v1beta1/organizations/{id}/enable Enable organization
OrganizationApi frontier_service_get_organization GET /v1beta1/organizations/{id} Get organization
OrganizationApi frontier_service_get_organization_domain GET /v1beta1/organizations/{orgId}/domains/{id} Get org domain
OrganizationApi frontier_service_get_organization_invitation GET /v1beta1/organizations/{orgId}/invitations/{id} Get pending invitation
OrganizationApi frontier_service_join_organization POST /v1beta1/organizations/{orgId}/join Join organization
OrganizationApi frontier_service_list_organization_admins GET /v1beta1/organizations/{id}/admins List organization admins
OrganizationApi frontier_service_list_organization_domains GET /v1beta1/organizations/{orgId}/domains List org domains
OrganizationApi frontier_service_list_organization_invitations GET /v1beta1/organizations/{orgId}/invitations List pending invitations
OrganizationApi frontier_service_list_organization_projects GET /v1beta1/organizations/{id}/projects Get organization projects
OrganizationApi frontier_service_list_organization_service_users GET /v1beta1/organizations/{id}/serviceusers List organization service users
OrganizationApi frontier_service_list_organization_users GET /v1beta1/organizations/{id}/users List organization users
OrganizationApi frontier_service_list_organizations GET /v1beta1/organizations List organizations
OrganizationApi frontier_service_remove_organization_user DELETE /v1beta1/organizations/{id}/users/{userId} Remove organization user
OrganizationApi frontier_service_update_organization PUT /v1beta1/organizations/{id} Update organization
OrganizationApi frontier_service_verify_organization_domain POST /v1beta1/organizations/{orgId}/domains/{id}/verify Verify org domain
PermissionApi admin_service_create_permission POST /v1beta1/permissions Create platform permission
PermissionApi admin_service_delete_permission DELETE /v1beta1/permissions/{id} Delete platform permission
PermissionApi admin_service_update_permission PUT /v1beta1/permissions/{id} Update platform permission
PermissionApi frontier_service_get_permission GET /v1beta1/permissions/{id} Get permission
PermissionApi frontier_service_list_permissions GET /v1beta1/permissions Get all permissions
PlanApi frontier_service_create_plan POST /v1beta1/billing/plans Create plan
PlanApi frontier_service_get_plan GET /v1beta1/billing/plans/{id} Get plan
PlanApi frontier_service_list_plans GET /v1beta1/billing/plans List plans
PlanApi frontier_service_update_plan PUT /v1beta1/billing/plans/{id} Update plan
PlatformApi admin_service_add_platform_user POST /v1beta1/admin/platform/users Add platform user
PlatformApi admin_service_list_platform_users GET /v1beta1/admin/platform/users List platform users
PolicyApi frontier_service_create_policy POST /v1beta1/policies Create policy
PolicyApi frontier_service_delete_policy DELETE /v1beta1/policies/{id} Delete Policy
PolicyApi frontier_service_get_policy GET /v1beta1/policies/{id} Get policy
PolicyApi frontier_service_list_policies GET /v1beta1/policies List all policies
PolicyApi frontier_service_update_policy PUT /v1beta1/policies/{id} Update policy
PreferenceApi admin_service_create_preferences POST /v1beta1/preferences Create platform preferences
PreferenceApi admin_service_list_preferences GET /v1beta1/preferences List platform preferences
PreferenceApi frontier_service_create_current_user_preferences POST /v1beta1/users/self/preferences Create current user preferences
PreferenceApi frontier_service_create_group_preferences POST /v1beta1/groups/{id}/preferences Create group preferences
PreferenceApi frontier_service_create_organization_preferences POST /v1beta1/organizations/{id}/preferences Create organization preferences
PreferenceApi frontier_service_create_project_preferences POST /v1beta1/projects/{id}/preferences Create project preferences
PreferenceApi frontier_service_create_user_preferences POST /v1beta1/users/{id}/preferences Create user preferences
PreferenceApi frontier_service_describe_preferences GET /v1beta1/preferences/traits Describe preferences
PreferenceApi frontier_service_list_current_user_preferences GET /v1beta1/users/self/preferences List current user preferences
PreferenceApi frontier_service_list_group_preferences GET /v1beta1/groups/{id}/preferences List group preferences
PreferenceApi frontier_service_list_organization_preferences GET /v1beta1/organizations/{id}/preferences List organization preferences
PreferenceApi frontier_service_list_project_preferences GET /v1beta1/projects/{id}/preferences List project preferences
PreferenceApi frontier_service_list_user_preferences GET /v1beta1/users/{id}/preferences List user preferences
ProjectApi admin_service_list_projects GET /v1beta1/admin/projects List all projects
ProjectApi frontier_service_create_project POST /v1beta1/projects Create project
ProjectApi frontier_service_delete_project DELETE /v1beta1/projects/{id} Delete Project
ProjectApi frontier_service_disable_project POST /v1beta1/projects/{id}/disable Disable project
ProjectApi frontier_service_enable_project POST /v1beta1/projects/{id}/enable Enable project
ProjectApi frontier_service_get_project GET /v1beta1/projects/{id} Get project
ProjectApi frontier_service_list_project_admins GET /v1beta1/projects/{id}/admins List project admins
ProjectApi frontier_service_list_project_groups GET /v1beta1/projects/{id}/groups List project groups
ProjectApi frontier_service_list_project_service_users GET /v1beta1/projects/{id}/serviceusers List project serviceusers
ProjectApi frontier_service_list_project_users GET /v1beta1/projects/{id}/users List project users
ProjectApi frontier_service_update_project PUT /v1beta1/projects/{id} Update project
RelationApi admin_service_list_relations GET /v1beta1/admin/relations List all relations
RelationApi frontier_service_create_relation POST /v1beta1/relations Create relation
RelationApi frontier_service_delete_relation DELETE /v1beta1/relations/{relation}/object/{object}/subject/{subject} Delete relation
RelationApi frontier_service_get_relation GET /v1beta1/relations/{id} Get relation
ResourceApi admin_service_list_resources GET /v1beta1/admin/resources List all resources
ResourceApi frontier_service_create_project_resource POST /v1beta1/projects/{projectId}/resources Create resource
ResourceApi frontier_service_delete_project_resource DELETE /v1beta1/projects/{projectId}/resources/{id} Delete resource
ResourceApi frontier_service_get_project_resource GET /v1beta1/projects/{projectId}/resources/{id} Get resource
ResourceApi frontier_service_list_project_resources GET /v1beta1/projects/{projectId}/resources Get all resources
ResourceApi frontier_service_update_project_resource PUT /v1beta1/projects/{projectId}/resources/{id} Update resource
RoleApi admin_service_create_role POST /v1beta1/roles Create platform role
RoleApi admin_service_delete_role DELETE /v1beta1/roles/{id} Delete platform role
RoleApi admin_service_update_role PUT /v1beta1/roles/{id} Update role
RoleApi frontier_service_create_organization_role POST /v1beta1/organizations/{orgId}/roles Create organization role
RoleApi frontier_service_delete_organization_role DELETE /v1beta1/organizations/{orgId}/roles/{id} Delete organization role
RoleApi frontier_service_get_organization_role GET /v1beta1/organizations/{orgId}/roles/{id} Get organization role
RoleApi frontier_service_list_organization_roles GET /v1beta1/organizations/{orgId}/roles List organization roles
RoleApi frontier_service_list_roles GET /v1beta1/roles List platform roles
RoleApi frontier_service_update_organization_role PUT /v1beta1/organizations/{orgId}/roles/{id} Update organization role
ServiceUserApi frontier_service_create_service_user POST /v1beta1/serviceusers Create service user
ServiceUserApi frontier_service_create_service_user_key POST /v1beta1/serviceusers/{id}/keys Create service user key
ServiceUserApi frontier_service_create_service_user_secret POST /v1beta1/serviceusers/{id}/secrets Create service user secret
ServiceUserApi frontier_service_delete_service_user DELETE /v1beta1/serviceusers/{id} Delete service user
ServiceUserApi frontier_service_delete_service_user_key DELETE /v1beta1/serviceusers/{id}/keys/{keyId} Delete service user key
ServiceUserApi frontier_service_delete_service_user_secret DELETE /v1beta1/serviceusers/{id}/secrets/{secretId} Delete service user secret
ServiceUserApi frontier_service_get_service_user GET /v1beta1/serviceusers/{id} Get service user
ServiceUserApi frontier_service_get_service_user_key GET /v1beta1/serviceusers/{id}/keys/{keyId} Get service user key
ServiceUserApi frontier_service_list_service_user_keys GET /v1beta1/serviceusers/{id}/keys List service user keys
ServiceUserApi frontier_service_list_service_user_secrets GET /v1beta1/serviceusers/{id}/secrets List service user secrets
ServiceUserApi frontier_service_list_service_users GET /v1beta1/serviceusers List org service users
SubscriptionApi frontier_service_cancel_subscription POST /v1beta1/organizations/{orgId}/billing/{billingId}/subscriptions/{id}/cancel Cancel subscription
SubscriptionApi frontier_service_get_subscription GET /v1beta1/organizations/{orgId}/billing/{billingId}/subscriptions/{id} Get subscription
SubscriptionApi frontier_service_list_subscriptions GET /v1beta1/organizations/{orgId}/billing/{billingId}/subscriptions List subscriptions
SubscriptionApi frontier_service_update_subscription PUT /v1beta1/organizations/{orgId}/billing/{billingId}/subscriptions/{id} Update subscription
TransactionApi frontier_service_list_billing_transactions GET /v1beta1/billing/{billingId}/transactions List billing transactions
UsageApi frontier_service_create_billing_usage POST /v1beta1/organizations/{orgId}/billing/{billingId}/usages Create billing usage
UserApi admin_service_list_all_users GET /v1beta1/admin/users List all users
UserApi frontier_service_create_user POST /v1beta1/users Create user
UserApi frontier_service_delete_user DELETE /v1beta1/users/{id} Delete user
UserApi frontier_service_disable_user POST /v1beta1/users/{id}/disable Disable user
UserApi frontier_service_enable_user POST /v1beta1/users/{id}/enable Enable user
UserApi frontier_service_get_current_user GET /v1beta1/users/self Get current user
UserApi frontier_service_get_user GET /v1beta1/users/{id} Get user
UserApi frontier_service_list_current_user_groups GET /v1beta1/users/self/groups List my groups
UserApi frontier_service_list_current_user_invitations GET /v1beta1/users/self/invitations List user invitations
UserApi frontier_service_list_organizations_by_current_user GET /v1beta1/users/self/organizations Get my organizations
UserApi frontier_service_list_organizations_by_user GET /v1beta1/users/{id}/organizations Get user organizations
UserApi frontier_service_list_projects_by_current_user GET /v1beta1/users/self/projects Get my projects
UserApi frontier_service_list_projects_by_user GET /v1beta1/users/{id}/projects Get user projects
UserApi frontier_service_list_user_groups GET /v1beta1/users/{id}/groups List user groups
UserApi frontier_service_list_user_invitations GET /v1beta1/users/{id}/invitations List user invitations
UserApi frontier_service_list_users GET /v1beta1/users List public users
UserApi frontier_service_update_current_user PUT /v1beta1/users/self Update current user
UserApi frontier_service_update_user PUT /v1beta1/users/{id} Update user

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

Basic

  • Type: HTTP basic authentication

Author

[email protected]

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages