-
Notifications
You must be signed in to change notification settings - Fork 2
/
openapi.json
1 lines (1 loc) · 244 KB
/
openapi.json
1
{"openapi":"3.0.2","info":{"title":"Permit.io API","description":"\nAuthorization as a service\n","version":"2.0.0"},"paths":{"/v2/auth/login":{"post":{"tags":["Authentication"],"summary":"Login","description":"The login endpoint allows the frontend app to exchange a user JWT with a user session.\nThe user session is stored on an httpOnly + secure cookie.","operationId":"login","parameters":[{"description":"An optional invite code to an existing organization. If the invite code is provided and is valid, the member will gain access to that organization.","required":false,"schema":{"title":"Invite Code","type":"string","description":"An optional invite code to an existing organization. If the invite code is provided and is valid, the member will gain access to that organization.","format":"uuid"},"name":"invite_code","in":"query"}],"responses":{"200":{"description":"Logged in successfully (stored session cookie).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResult"}}}},"401":{"description":"Log in failed (no cookie stored)."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/auth/logout":{"post":{"tags":["Authentication"],"summary":"Logout","description":"The logout endpoint deletes the session cookie of a logged in user and invalidates cached VCs.","operationId":"logout","responses":{"204":{"description":"Logged out (deleted session cookie)."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/auth/switch_org/{org_id}":{"post":{"tags":["Authentication"],"summary":"Switch Organization","description":"Allows the user to switch his active organization (manipulates the user's login session).\n\nThis route will return a new login cookie to the user.","operationId":"switch_organization","parameters":[{"description":"the organization id the user wishes to switch to as the active org on the session","required":true,"schema":{"title":"Org Id","type":"string","description":"the organization id the user wishes to switch to as the active org on the session","format":"uuid"},"name":"org_id","in":"path"}],"responses":{"200":{"description":"Switched org successfully (stored session cookie).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResult"}}}},"401":{"description":"Authentication Failed (not logged in)"},"404":{"description":"Cannot switch to requested org (no permissions or no such org)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/auth/devlogin":{"post":{"tags":["Authentication"],"summary":"(DEV MODE) Login","description":"The dev-login endpoints allows a developer inside permit.io to log in with an email address.\n\nTHIS IS ONLY AVAILABLE IN DEV MODE.","operationId":"dev_login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevLogin"}}},"required":true},"responses":{"204":{"description":"Logged in successfully (stored session cookie)."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/auth/me":{"get":{"tags":["Authentication"],"summary":"Me","operationId":"me","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewerContext"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/opal/data/config":{"get":{"tags":["Policy"],"summary":"Get Opal Data Sources","operationId":"get_opal_data_sources","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSourceConfig"}}}}}}},"/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}":{"get":{"tags":["OPAL Data"],"summary":"Get All Data","operationId":"get_all_data","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"title":"Org Id","type":"string","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","format":"uuid"},"name":"org_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","format":"uuid"},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","format":"uuid"},"name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FullData"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/users/{user_id}":{"get":{"tags":["OPAL Data"],"summary":"Get Data For User","operationId":"get_data_for_user","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"title":"Org Id","type":"string","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","format":"uuid"},"name":"org_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","format":"uuid"},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","format":"uuid"},"name":"env_id","in":"path"},{"required":true,"schema":{"title":"User Id","type":"string","format":"uuid"},"name":"user_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserData"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/roles/{role_id}":{"get":{"tags":["OPAL Data"],"summary":"Get Data For Role","operationId":"get_data_for_role","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"title":"Org Id","type":"string","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","format":"uuid"},"name":"org_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","format":"uuid"},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","format":"uuid"},"name":"env_id","in":"path"},{"required":true,"schema":{"title":"Role Id","type":"string","format":"uuid"},"name":"role_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleData"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/condition_set_rules/{user_set_id}/{resource_set_id}":{"get":{"tags":["OPAL Data"],"summary":"Get Data For Set Rule","description":"return permission assignment data between user sets and resource sets (i.e: condition set rules data)","operationId":"get_data_for_set_rule","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"title":"Org Id","type":"string","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","format":"uuid"},"name":"org_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","format":"uuid"},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","format":"uuid"},"name":"env_id","in":"path"},{"required":true,"schema":{"title":"User Set Id","type":"string","format":"uuid"},"name":"user_set_id","in":"path"},{"required":true,"schema":{"title":"Resource Set Id","type":"string","format":"uuid"},"name":"resource_set_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Data For Set Rule V2 Internal Opal Data Org Id Proj Id Env Id Condition Set Rules User Set Id Resource Set Id Get","type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/members/me":{"get":{"tags":["Members"],"summary":"Get the authenticated account member","description":"Gets the authenticated account member's details.","operationId":"get_authenticated_member","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgMemberRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/members":{"get":{"tags":["Members"],"summary":"List Organization Members","description":"Lists all the account members that have access to the current active account.\nThe active account/organization is determined by the API Key used or by the authenticated session id.","operationId":"list_organization_members","parameters":[{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"title":"Page","minimum":1.0,"type":"integer","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"title":"Per Page","maximum":100.0,"minimum":1.0,"type":"integer","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Organization Members V2 Members Get","type":"array","items":{"$ref":"#/components/schemas/OrgMemberRead"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/members/{member_id}":{"get":{"tags":["Members"],"summary":"Get Organization Member","description":"Gets a single account member by its id or email address. matching the given member,\nif no such member exists under the current active account (organization), returns 404.","operationId":"get_organization_member","parameters":[{"description":"Either the unique id (UUID) of the account member, or the email address of the account member.","required":true,"schema":{"title":"Member Id","type":"string","description":"Either the unique id (UUID) of the account member, or the email address of the account member."},"name":"member_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgMemberRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Members"],"summary":"Delete Organization Member","description":"Deletes an account member matching the given id or email address.\nThe member will be removed from the active account in permit.io.\n\nIf the member is the only member in its account (organization), returns 400 (bad request),\ndue to nobody remains with access to the account, meaning deletion of the entire account (org).\nTo completely remove an account, call DELETE `/orgs/{org}`.","operationId":"delete_organization_member","parameters":[{"description":"Either the unique id (UUID) of the account member, or the email address of the account member.","required":true,"schema":{"title":"Member Id","type":"string","description":"Either the unique id (UUID) of the account member, or the email address of the account member."},"name":"member_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Members"],"summary":"Update Organization Member","description":"Updates an account member's settings.","operationId":"update_organization_member","parameters":[{"description":"Either the unique id (UUID) of the account member, or the email address of the account member.","required":true,"schema":{"title":"Member Id","type":"string","description":"Either the unique id (UUID) of the account member, or the email address of the account member."},"name":"member_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgMemberUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgMemberRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/api-key/{proj_id}/{env_id}":{"get":{"tags":["API Keys"],"summary":"Get Environment Api Key","operationId":"get_environment_api_key","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/api-key/scope":{"get":{"tags":["API Keys"],"summary":"Get Api Key Scope","operationId":"get_api_key_scope","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyScopeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/orgs":{"get":{"tags":["Organizations"],"summary":"List Organizations","description":"Lists all the organizations that can be accessed by the\nauthenticated actor (i.e: human team member or api key).","operationId":"list_organizations","parameters":[{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"title":"Page","minimum":1.0,"type":"integer","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page.","required":false,"schema":{"title":"Per Page","minimum":1.0,"type":"integer","description":"The number of results per page.","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Organizations V2 Orgs Get","type":"array","items":{"$ref":"#/components/schemas/OrganizationRead"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Organizations"],"summary":"Create Organization","description":"Creates a new organization that will be owned by the\nauthenticated actor (i.e: human team member or api key).","operationId":"create_organization","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/orgs/{org_id}":{"get":{"tags":["Organizations"],"summary":"Get Organization","description":"Gets a single organization (Permit.io account) matching the given org_id,\nif such org exists and can be accessed by the authenticated actor.","operationId":"get_organization","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"title":"Org Id","type":"string","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\")."},"name":"org_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Organizations"],"summary":"Delete Organization","description":"Deletes an organization (Permit.io account) and all its related data.","operationId":"delete_organization","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"title":"Org Id","type":"string","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\")."},"name":"org_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Organizations"],"summary":"Update Organization","description":"Updates the organization's profile.","operationId":"update_organization","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"title":"Org Id","type":"string","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\")."},"name":"org_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/orgs/{org_id}/invites":{"get":{"tags":["Organizations"],"summary":"List Organization Invites","description":"Lists pending organization invites","operationId":"list_organization_invites","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"title":"Org Id","type":"string","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\")."},"name":"org_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"title":"Page","minimum":1.0,"type":"integer","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"title":"Per Page","maximum":100.0,"minimum":1.0,"type":"integer","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Organization Invites V2 Orgs Org Id Invites Get","type":"array","items":{"$ref":"#/components/schemas/InviteRead"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Organizations"],"summary":"Invite Members To Organization","description":"Invite new members into the organization.","operationId":"invite_members_to_organization","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"title":"Org Id","type":"string","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\")."},"name":"org_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"title":"Invites","type":"array","items":{"$ref":"#/components/schemas/InviteCreate"}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiInviteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/orgs/{org_id}/invites/{invite_id}":{"delete":{"tags":["Organizations"],"summary":"Cancel Invite","description":"Cancels an invite that was sent to a new member.","operationId":"cancel_invite","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"title":"Org Id","type":"string","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\")."},"name":"org_id","in":"path"},{"description":"Id of the invite to cancel","required":true,"schema":{"title":"Invite Id","type":"string","description":"Id of the invite to cancel","format":"uuid"},"name":"invite_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/projects":{"get":{"tags":["Projects"],"summary":"List Projects","description":"Lists all the projects under the active organization.","operationId":"list_projects","parameters":[{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"title":"Page","minimum":1.0,"type":"integer","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"title":"Per Page","maximum":100.0,"minimum":1.0,"type":"integer","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Projects V2 Projects Get","type":"array","items":{"$ref":"#/components/schemas/ProjectRead"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Projects"],"summary":"Create Project","description":"Creates a new project under the active organization.","operationId":"create_project","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/projects/{proj_id}":{"get":{"tags":["Projects"],"summary":"Get Project","description":"Gets a single project matching the given proj_id, if such project exists.","operationId":"get_project","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Projects"],"summary":"Delete Project","description":"Deletes the project and all its related data.","operationId":"delete_project","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Projects"],"summary":"Update Project","description":"Updates the project.","operationId":"update_project","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/projects/{proj_id}/envs":{"get":{"tags":["Environments"],"summary":"List Environments","description":"Lists all the environments under a given project.","operationId":"list_environments","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"title":"Page","minimum":1.0,"type":"integer","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"title":"Per Page","maximum":100.0,"minimum":1.0,"type":"integer","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Environments V2 Projects Proj Id Envs Get","type":"array","items":{"$ref":"#/components/schemas/EnvironmentRead"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Environments"],"summary":"Create Environment","description":"Creates a new environment under a given project.","operationId":"create_environment","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/projects/{proj_id}/envs/{env_id}":{"get":{"tags":["Environments"],"summary":"Get Environment","description":"Gets a single environment matching the given env_id, if such environment exists.","operationId":"get_environment","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Environments"],"summary":"Delete Environment","description":"Deletes an environment and all its related data.","operationId":"delete_environment","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Environments"],"summary":"Update Environment","description":"Updates the environment.","operationId":"update_environment","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources":{"get":{"tags":["Resources"],"summary":"List Resources","description":"Lists all the resources defined in your schema.","operationId":"list_resources","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Whether to include or exclude built-in resources, default is False","required":false,"schema":{"title":"Include Built In","type":"boolean","description":"Whether to include or exclude built-in resources, default is False","default":false},"name":"include_built_in","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"title":"Page","minimum":1.0,"type":"integer","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"title":"Per Page","maximum":100.0,"minimum":1.0,"type":"integer","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Resources V2 Schema Proj Id Env Id Resources Get","type":"array","items":{"$ref":"#/components/schemas/ResourceRead"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Resources"],"summary":"Create Resource","description":"Creates a new resource (a type of object you may protect with permissions).","operationId":"create_resource","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}":{"get":{"tags":["Resources"],"summary":"Get Resource","description":"Gets a single resource, if such resource exists.","operationId":"get_resource","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["Resources"],"summary":"Replace Resource","description":"Completely replaces the resource definition.\n\n- If the resource key is changed, all role and permissions assignments for the the resource will be revoked.\n- If the resource key is unchanged, but some actions are removed or renamed from the resource definition,\nrole and permissions assignments for these actions will be revoked.\n\nTODO: we need to decide if we are auto-revoking, or if we are rejecting the PUT completely while there are permissions that can be affected.","operationId":"replace_resource","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceReplace"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Resources"],"summary":"Delete Resource","description":"Deletes the resource and all its related data.","operationId":"delete_resource","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Resources"],"summary":"Update Resource","description":"Partially updates the resource definition.\nFields that will be provided will be completely overwritten.","operationId":"update_resource","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions":{"get":{"tags":["Resource Actions"],"summary":"List Resource Actions","description":"Lists all the actions defined on the resource.","operationId":"list_resource_actions","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"title":"Page","minimum":1.0,"type":"integer","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"title":"Per Page","maximum":100.0,"minimum":1.0,"type":"integer","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Resource Actions V2 Schema Proj Id Env Id Resources Resource Id Actions Get","type":"array","items":{"$ref":"#/components/schemas/ResourceActionRead"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Resource Actions"],"summary":"Create Resource Action","description":"Creates a new action that can affect the resource.","operationId":"create_resource_action","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceActionCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceActionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}":{"get":{"tags":["Resource Actions"],"summary":"Get Resource Action","description":"Gets a single action defined on the resource, if such action exists.","operationId":"get_resource_action","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"},{"description":"Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\").","required":true,"schema":{"title":"Action Id","type":"string","description":"Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\")."},"name":"action_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceActionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Resource Actions"],"summary":"Delete Resource Action","description":"Deletes the action and all its related data.\nThis includes any permissions granted to perform the action.","operationId":"delete_resource_action","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"},{"description":"Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\").","required":true,"schema":{"title":"Action Id","type":"string","description":"Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\")."},"name":"action_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Resource Actions"],"summary":"Update Resource Action","description":"Partially updates the action defined on a resource.\nFields that will be provided will be completely overwritten.","operationId":"update_resource_action","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"},{"description":"Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\").","required":true,"schema":{"title":"Action Id","type":"string","description":"Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\")."},"name":"action_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceActionUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceActionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles":{"get":{"tags":["Resource Roles"],"summary":"List Resource Roles","description":"Lists all the roles defined on the resource.","operationId":"list_resource_roles","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"title":"Page","minimum":1.0,"type":"integer","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"title":"Per Page","maximum":100.0,"minimum":1.0,"type":"integer","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Resource Roles V2 Schema Proj Id Env Id Resources Resource Id Roles Get","type":"array","items":{"$ref":"#/components/schemas/ResourceRoleRead"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Resource Roles"],"summary":"Create Resource Role","description":"Creates a new role associated with the resource.","operationId":"create_resource_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRoleCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}":{"get":{"tags":["Resource Roles"],"summary":"Get Resource Role","description":"Gets a single role defined on the resource, if such role exists.","operationId":"get_resource_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"title":"Role Id","type":"string","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Resource Roles"],"summary":"Delete Resource Role","description":"Deletes the role and all its related data.\nThis includes any permissions granted to said role.","operationId":"delete_resource_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"title":"Role Id","type":"string","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Resource Roles"],"summary":"Update Resource Role","description":"Partially updates the role defined on a resource.\nFields that will be provided will be completely overwritten.","operationId":"update_resource_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"title":"Role Id","type":"string","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRoleUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/permissions":{"post":{"tags":["Resource Roles"],"summary":"Assign Permissions to Role","description":"Assign permissions to role.\n\nIf some of the permissions specified are already unassigned, will skip them.","operationId":"assign_permissions_to_resource_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"title":"Role Id","type":"string","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddRolePermissions"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Resource Roles"],"summary":"Remove Permissions from Role","description":"Remove permissions from role.\n\nIf some of the permissions specified are already unassigned, will skip them.","operationId":"remove_permissions_from_resource_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"title":"Role Id","type":"string","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveRolePermissions"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/parents/{parent_role_id}":{"put":{"tags":["Resource Roles"],"summary":"Add Parent Role","description":"This endpoint is part of the role hierarchy feature.\n\nMakes role with id `role_id` extend the role with id `parent_role_id`.\nIn other words, `role_id` will automatically be assigned any permissions\nthat are granted to `parent_role_id`.\n\nWe can say the `role_id` **extends** `parent_role_id` or **inherits** from `parent_role_id`.\n\nIf `role_id` is already an ancestor of `parent_role_id`,\nthe request will fail with HTTP 400 to prevent a cycle in the role hierarchy.\n\nBoth roles must be defined on the same resource, identified by id `resource_id`.","operationId":"add_parent_resource_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"title":"Role Id","type":"string","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"},{"description":"Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\").","required":true,"schema":{"title":"Parent Role Id","type":"string","description":"Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\")."},"name":"parent_role_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Resource Roles"],"summary":"Remove Parent Role","description":"This endpoint is part of the role hierarchy feature.\n\nRemoves `parent_role_id` from the list of parent roles of role with id `role_id`.\nIn other words, `role_id` will no longer be automatically assigned permissions\nthat are granted to `parent_role_id`.\n\nWe can say the `role_id` **not longer extends** `parent_role_id` or **no longer inherits** from `parent_role_id`.\n\nBoth roles must be defined on the same resource, identified by id `resource_id`.","operationId":"remove_parent_resource_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"title":"Role Id","type":"string","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"},{"description":"Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\").","required":true,"schema":{"title":"Parent Role Id","type":"string","description":"Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\")."},"name":"parent_role_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes":{"get":{"tags":["Resource Attributes"],"summary":"List Resource Attributes","description":"Lists all the attributes defined on the resource.","operationId":"list_resource_attributes","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"title":"Page","minimum":1.0,"type":"integer","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"title":"Per Page","maximum":100.0,"minimum":1.0,"type":"integer","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Resource Attributes V2 Schema Proj Id Env Id Resources Resource Id Attributes Get","type":"array","items":{"$ref":"#/components/schemas/ResourceAttributeRead"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Resource Attributes"],"summary":"Create Resource Attribute","description":"Creates a new attribute as part of the resource definition.","operationId":"create_resource_attribute","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceAttributeCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceAttributeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}":{"get":{"tags":["Resource Attributes"],"summary":"Get Resource Attribute","description":"Gets a single attribute defined on the resource, if such attribute exists.","operationId":"get_resource_attribute","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"},{"description":"Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\").","required":true,"schema":{"title":"Attribute Id","type":"string","description":"Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\")."},"name":"attribute_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceAttributeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Resource Attributes"],"summary":"Delete Resource Attribute","description":"Deletes the attribute and all its related data.\n\nNote: If the attribute is used by policies, removing it will cause the\nattribute to evaluate as `undefined`.","operationId":"delete_resource_attribute","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"},{"description":"Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\").","required":true,"schema":{"title":"Attribute Id","type":"string","description":"Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\")."},"name":"attribute_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"title":"Page","minimum":1.0,"type":"integer","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"title":"Per Page","maximum":100.0,"minimum":1.0,"type":"integer","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Resource Attributes"],"summary":"Update Resource Attribute","description":"Partially updates the attribute defined on a resource.\nFields that will be provided will be completely overwritten.","operationId":"update_resource_attribute","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"title":"Resource Id","type":"string","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"name":"resource_id","in":"path"},{"description":"Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\").","required":true,"schema":{"title":"Attribute Id","type":"string","description":"Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\")."},"name":"attribute_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceAttributeUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceAttributeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/roles":{"get":{"tags":["Roles"],"summary":"List Roles","description":"Lists all tenant roles.","operationId":"list_roles","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"title":"Page","minimum":1.0,"type":"integer","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"title":"Per Page","maximum":100.0,"minimum":1.0,"type":"integer","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Roles V2 Schema Proj Id Env Id Roles Get","type":"array","items":{"$ref":"#/components/schemas/RoleRead"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Roles"],"summary":"Create Role","description":"Creates a new tenant role.","operationId":"create_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/roles/{role_id}":{"get":{"tags":["Roles"],"summary":"Get Role","description":"Gets a single tenant role, if such role exists.","operationId":"get_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"title":"Role Id","type":"string","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Roles"],"summary":"Delete Role","description":"Deletes a tenant role and all its related data.\nThis includes any permissions granted to said role.","operationId":"delete_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"title":"Role Id","type":"string","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Roles"],"summary":"Update Role","description":"Partially updates a tenant role.\nFields that will be provided will be completely overwritten.","operationId":"update_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"title":"Role Id","type":"string","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/roles/{role_id}/permissions":{"post":{"tags":["Roles"],"summary":"Assign Permissions To Role","description":"Assign permissions to role.\n\nIf some of the permissions specified are already unassigned, will skip them.","operationId":"assign_permissions_to_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"title":"Role Id","type":"string","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddRolePermissions"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Roles"],"summary":"Remove Permissions From Role","description":"Remove permissions from role.\n\nIf some of the permissions specified are already unassigned, will skip them.","operationId":"remove_permissions_from_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"title":"Role Id","type":"string","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveRolePermissions"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/roles/{role_id}/parents/{parent_role_id}":{"put":{"tags":["Roles"],"summary":"Add Parent Role","description":"This endpoint is part of the role hierarchy feature.\n\nMakes role with id `role_id` extend the role with id `parent_role_id`.\nIn other words, `role_id` will automatically be assigned any permissions\nthat are granted to `parent_role_id`.\n\nWe can say the `role_id` **extends** `parent_role_id` or **inherits** from `parent_role_id`.\n\nIf `role_id` is already an ancestor of `parent_role_id`,\nthe request will fail with HTTP 400 to prevent a cycle in the role hierarchy.","operationId":"add_parent_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"title":"Role Id","type":"string","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"},{"description":"Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\").","required":true,"schema":{"title":"Parent Role Id","type":"string","description":"Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\")."},"name":"parent_role_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Roles"],"summary":"Remove Parent Role","description":"This endpoint is part of the role hierarchy feature.\n\nRemoves `parent_role_id` from the list of parent roles of role with id `role_id`.\nIn other words, `role_id` will no longer be automatically assigned permissions\nthat are granted to `parent_role_id`.\n\nWe can say the `role_id` **not longer extends** `parent_role_id` or **no longer inherits** from `parent_role_id`.","operationId":"remove_parent_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"title":"Role Id","type":"string","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"},{"description":"Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\").","required":true,"schema":{"title":"Parent Role Id","type":"string","description":"Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\")."},"name":"parent_role_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/condition_sets":{"get":{"tags":["Condition Sets"],"summary":"List Condition Sets","description":"Lists all condition sets matching a filter.","operationId":"list_condition_sets","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"if provided, will return only the condition sets of the specified type. e.g: only user sets.","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/ConditionSetType"}],"description":"if provided, will return only the condition sets of the specified type. e.g: only user sets."},"name":"type","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"title":"Page","minimum":1.0,"type":"integer","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"title":"Per Page","maximum":100.0,"minimum":1.0,"type":"integer","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Condition Sets V2 Schema Proj Id Env Id Condition Sets Get","type":"array","items":{"$ref":"#/components/schemas/ConditionSetRead"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Condition Sets"],"summary":"Create Condition Set","description":"Creates a new condition set (can be either a user set or a resource set).","operationId":"create_condition_set","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionSetCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionSetRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}":{"get":{"tags":["Condition Sets"],"summary":"Get Condition Set","description":"Gets a single condition set, if such condition set exists.","operationId":"get_condition_set","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\").","required":true,"schema":{"title":"Condition Set Id","type":"string","description":"Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\")."},"name":"condition_set_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionSetRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Condition Sets"],"summary":"Delete Condition Set","description":"Deletes a condition set and all its related data.\nThis includes any permissions granted to said condition set (i.e: any matching condition set rules).","operationId":"delete_condition_set","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\").","required":true,"schema":{"title":"Condition Set Id","type":"string","description":"Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\")."},"name":"condition_set_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Condition Sets"],"summary":"Update Condition Set","description":"Partially updates a condition set.\nFields that will be provided will be completely overwritten.","operationId":"update_condition_set","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\").","required":true,"schema":{"title":"Condition Set Id","type":"string","description":"Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\")."},"name":"condition_set_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionSetUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionSetRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/users":{"get":{"tags":["Users"],"summary":"List Users","description":"Lists all the users defined within an environment.","operationId":"list_users","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Text search for the email field","required":false,"schema":{"title":"Search","type":"string","description":"Text search for the email field"},"name":"search","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"title":"Page","minimum":1.0,"type":"integer","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"title":"Per Page","maximum":100.0,"minimum":1.0,"type":"integer","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_UserRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Users"],"summary":"Create User","description":"Creates a new user inside the Permit.io system, from that point forward\nyou may run permission checks on that user.\n\nIf the user is already created: will return 200 instead of 201,\nand will return the existing user object in the response body.","operationId":"create_user","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/users/{user_id}":{"get":{"tags":["Users"],"summary":"Get User","description":"Gets a user, if such user exists. Otherwise returns 404.","operationId":"get_user","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"title":"User Id","type":"string","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"name":"user_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["Users"],"summary":"Replace User","operationId":"replace_user","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"title":"User Id","type":"string","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"name":"user_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Users"],"summary":"Delete User","description":"Deletes the user and all its related data.","operationId":"delete_user","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"title":"User Id","type":"string","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"name":"user_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Users"],"summary":"Update User","description":"Partially updates the user definition.\nFields that will be provided will be completely overwritten.","operationId":"update_user","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"title":"User Id","type":"string","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"name":"user_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/users/{user_id}/roles":{"post":{"tags":["Users"],"summary":"Assign Role To User","description":"Assigns a role to the user within the tenant.\n\nThe tenant defines the scope of the assignment. In other words, the role is effective only within the tenant.","operationId":"assign_role_to_user","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"title":"User Id","type":"string","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"name":"user_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRoleCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleAssignmentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Users"],"summary":"Unassign Role From User","description":"Unassigns the role from the user within the tenant.\n\nThe tenant defines the scope of the assignment. In other words, the role is effective only within the tenant.\n\nIf the role is not actually assigned, will return 404.","operationId":"unassign_role_from_user","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"title":"User Id","type":"string","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"name":"user_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRoleRemove"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users":{"get":{"tags":["Tenants"],"summary":"List Tenant Users","operationId":"list_tenant_users","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\").","required":true,"schema":{"title":"Tenant Id","type":"string","description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")."},"name":"tenant_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Text search for the email field","required":false,"schema":{"title":"Search","type":"string","description":"Text search for the email field"},"name":"search","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"title":"Page","minimum":1.0,"type":"integer","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"title":"Per Page","maximum":100.0,"minimum":1.0,"type":"integer","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_UserRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/tenants":{"get":{"tags":["Tenants"],"summary":"List Tenants","description":"Lists all the tenants defined within an environment.","operationId":"list_tenants","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"title":"Page","minimum":1.0,"type":"integer","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"title":"Per Page","maximum":100.0,"minimum":1.0,"type":"integer","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Tenants V2 Facts Proj Id Env Id Tenants Get","type":"array","items":{"$ref":"#/components/schemas/TenantRead"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Tenants"],"summary":"Create Tenant","description":"Creates a new tenant inside the Permit.io system.\n\nIf the tenant is already created: will return 200 instead of 201,\nand will return the existing tenant object in the response body.","operationId":"create_tenant","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}":{"get":{"tags":["Tenants"],"summary":"Get Tenant","description":"Gets a tenant, if such tenant exists. Otherwise returns 404.","operationId":"get_tenant","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\").","required":true,"schema":{"title":"Tenant Id","type":"string","description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")."},"name":"tenant_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Tenants"],"summary":"Delete Tenant","description":"Deletes the tenant and all its related data.","operationId":"delete_tenant","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\").","required":true,"schema":{"title":"Tenant Id","type":"string","description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")."},"name":"tenant_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Tenants"],"summary":"Update Tenant","description":"Partially updates the tenant definition.\nFields that will be provided will be completely overwritten.","operationId":"update_tenant","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\").","required":true,"schema":{"title":"Tenant Id","type":"string","description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")."},"name":"tenant_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/role_assignments":{"get":{"tags":["Role Assignments"],"summary":"List Role Assignments","description":"Lists the role assignments defined within an environment.\n\n- If the `user` filter is present, will only return the role assignments of that user.\n- If the `tenant` filter is present, will only return the role assignments in that tenant.\n- If the `role` filter is present, will only return role assignments that are granting that role.","operationId":"list_role_assignments","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"optional user filter, will only return role assignments granted to this user.","required":false,"schema":{"title":"User","type":"string","description":"optional user filter, will only return role assignments granted to this user."},"name":"user","in":"query"},{"description":"optional role filter, will only return role assignments granting this role.","required":false,"schema":{"title":"Role","type":"string","description":"optional role filter, will only return role assignments granting this role."},"name":"role","in":"query"},{"description":"optional tenant filter, will only return role assignments granted in that tenant.","required":false,"schema":{"title":"Tenant","type":"string","description":"optional tenant filter, will only return role assignments granted in that tenant."},"name":"tenant","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"title":"Page","minimum":1.0,"type":"integer","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"title":"Per Page","maximum":100.0,"minimum":1.0,"type":"integer","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Role Assignments V2 Facts Proj Id Env Id Role Assignments Get","type":"array","items":{"$ref":"#/components/schemas/RoleAssignmentRead"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Role Assignments"],"summary":"Assign Role","description":"Assigns a role to a user within a tenant.\n\nThe tenant defines the scope of the assignment. In other words, the role is effective only within the tenant.","operationId":"assign_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleAssignmentCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleAssignmentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Role Assignments"],"summary":"Unassign Role","description":"Unassigns a user role within a tenant.\n\nThe tenant defines the scope of the assignment. In other words, the role is effective only within the tenant.\n\nIf the role is not actually assigned, will return 404.","operationId":"unassign_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleAssignmentRemove"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/set_rules":{"get":{"tags":["Condition Set Rules"],"summary":"List Set Permissions","description":"Lists the condition set rules matching the filter.\n- If the `user_set` filter is present, will only return the permissions set of that user set.\n- If the `permission` filter is present, will only return the permissions sets that equals to the queried permission.\n- If the `resource_set` filter is present, will only return the permissions set of that resource set.","operationId":"list_set_permissions","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"optional user set filter, will only return rules where the permission is granted to this user set","required":false,"schema":{"title":"User Set","type":"string","description":"optional user set filter, will only return rules where the permission is granted to this user set"},"name":"user_set","in":"query"},{"description":"optional permission filter, will only return condition set rules granting this permission","required":false,"schema":{"title":"Permission","type":"string","description":"optional permission filter, will only return condition set rules granting this permission"},"name":"permission","in":"query"},{"description":"optional resource set filter, will only return rules where the permission is granted on this resource set","required":false,"schema":{"title":"Resource Set","type":"string","description":"optional resource set filter, will only return rules where the permission is granted on this resource set"},"name":"resource_set","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"title":"Page","minimum":1.0,"type":"integer","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"title":"Per Page","maximum":100.0,"minimum":1.0,"type":"integer","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Set Permissions V2 Facts Proj Id Env Id Set Rules Get","type":"array","items":{"$ref":"#/components/schemas/ConditionSetRuleRead"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Condition Set Rules"],"summary":"Assign Set Permissions","description":"Grant permissions to a user set *on* a resource set.\n\nIf the permission is already granted, it is skipped.","operationId":"assign_set_permissions","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionSetRuleCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Assign Set Permissions V2 Facts Proj Id Env Id Set Rules Post","type":"array","items":{"$ref":"#/components/schemas/ConditionSetRuleRead"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Condition Set Rules"],"summary":"Unassign Set Permissions","description":"Revokes permissions to a user set *on* a resource set.\n\nIf the permission is not granted, it is skipped.","operationId":"unassign_set_permissions","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionSetRuleRemove"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/resource_instances":{"get":{"tags":["Resource Instances"],"summary":"List Resource Instances","description":"Lists all the resource instances defined within an environment.","operationId":"list_resource_instances","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"title":"Page","minimum":1.0,"type":"integer","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"title":"Per Page","maximum":100.0,"minimum":1.0,"type":"integer","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Resource Instances V2 Facts Proj Id Env Id Resource Instances Get","type":"array","items":{"$ref":"#/components/schemas/ResourceInstanceRead"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Resource Instances"],"summary":"Create Resource Instance","description":"Creates a new instance inside the Permit.io system.\n\nIf the instance is already created: will return 200 instead of 201,\nand will return the existing instance object in the response body.","operationId":"create_resource_instance","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceInstanceCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceInstanceRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}":{"get":{"tags":["Resource Instances"],"summary":"Get Resource Instance","description":"Gets a instance, if such instance exists. Otherwise returns 404.","operationId":"get_resource_instance","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\").","required":true,"schema":{"title":"Instance Id","type":"string","description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."},"name":"instance_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceInstanceRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Resource Instances"],"summary":"Delete Resource Instance","description":"Deletes the instance and all its related data.","operationId":"delete_resource_instance","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\").","required":true,"schema":{"title":"Instance Id","type":"string","description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."},"name":"instance_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Resource Instances"],"summary":"Update Resource Instance","description":"Partially updates the instance definition.\nFields that will be provided will be completely overwritten.","operationId":"update_resource_instance","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\").","required":true,"schema":{"title":"Instance Id","type":"string","description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."},"name":"instance_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceInstanceUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceInstanceRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/{proj_id}/{env_id}/get_instructions":{"get":{"tags":["Instructions"],"summary":"List Language Instructions","description":"Lists pending organization invites","operationId":"list_language_instructions","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Language Instructions V2 Proj Id Env Id Get Instructions Get","type":"array","items":{"$ref":"#/components/schemas/LanguageInstructions"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/pdps/me/config":{"get":{"tags":["Policy Decision Points"],"summary":"Get connected PDP configuration","description":"Gets the configuration values for the currently authenticated PDP container.\n\nThe PDP authenticates with an API key scoped to a given Permit.io environment.\nThe system identifies the PDP via its API key and then returns all the configuration\nvalues required for the container to run correctly.\n\nThe config values returned are considered \"overrides\", meaning they are overriding\nany default values given to the container by the user.","operationId":"get_authenticating_pdp_config_values","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/pdps/{proj_id}/{env_id}/configs":{"get":{"tags":["Policy Decision Points"],"summary":"List PDP configurations","operationId":"list_pdp_configs","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"title":"Page","minimum":1.0,"type":"integer","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"title":"Per Page","maximum":100.0,"minimum":1.0,"type":"integer","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Pdp Configs V2 Pdps Proj Id Env Id Configs Get","type":"array","items":{"$ref":"#/components/schemas/PDPConfigRead"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/values":{"get":{"tags":["Policy Decision Points"],"summary":"Get PDP configuration","description":"Gets the configuration values for the PDP container with id `pdp_id`.\n\nThe config values returned are considered \"overrides\", meaning they are overriding\nany default values given to the container by the user.","operationId":"get_pdp_config_values","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"The unique id of the pdp","required":true,"schema":{"title":"Pdp Id","type":"string","description":"The unique id of the pdp","format":"uuid"},"name":"pdp_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/rotate-api-key":{"post":{"tags":["Policy Decision Points"],"summary":"Rotate PDP API Key","description":"Rotates the API key of the PDP container with id `pdp_id`.\n\nThe rotation of the API key revokes the old API key and issues a new API key to the PDP.","operationId":"rotate_pdp_api_key","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"The unique id of the pdp","required":true,"schema":{"title":"Pdp Id","type":"string","description":"The unique id of the pdp","format":"uuid"},"name":"pdp_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PDPConfigRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/pdps/{proj_id}/{env_id}/decision-logs/{pdp_id}":{"get":{"tags":["Decision Logs"],"summary":"List PDP Decisions","operationId":"list_pdp_decision_logs","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"title":"Proj Id","type":"string","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"title":"Env Id","type":"string","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"name":"env_id","in":"path"},{"description":"The unique id of the pdp","required":true,"schema":{"title":"Pdp Id","type":"string","description":"The unique id of the pdp","format":"uuid"},"name":"pdp_id","in":"path"},{"description":"List of user IDs to filter by","required":false,"schema":{"title":"Users","type":"array","items":{"type":"string"},"description":"List of user IDs to filter by"},"name":"users","in":"query"},{"description":"Filter by approved decisions","required":false,"schema":{"title":"Approved","type":"boolean","description":"Filter by approved decisions"},"name":"approved","in":"query"},{"description":"Filter by resources","required":false,"schema":{"title":"Resources","type":"array","items":{"type":"string"},"description":"Filter by resources"},"name":"resources","in":"query"},{"description":"Filter by timestamp from","required":false,"schema":{"title":"Timestamp From","type":"integer","description":"Filter by timestamp from"},"name":"timestamp_from","in":"query"},{"description":"Filter by timestamp to","required":false,"schema":{"title":"Timestamp To","type":"integer","description":"Filter by timestamp to"},"name":"timestamp_to","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"title":"Page","minimum":1.0,"type":"integer","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"title":"Per Page","maximum":100.0,"minimum":1.0,"type":"integer","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_OPADecisionLog_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/decision-logs/ingress":{"post":{"tags":["Decision Logs Ingress"],"summary":"OPA Decision Logs Ingress","description":"This ingress endpoint captures OPA decision logs.","operationId":"insert_opa_decision_logs","requestBody":{"content":{"application/json":{"schema":{"title":"Opa Logs","type":"array","items":{"type":"object"},"description":"list of opa decision logs"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/opal/data/config":{"get":{"tags":["Policy"],"summary":"Get Opal Data Sources","operationId":"get_opal_data_sources_opal_data_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSourceConfig"}}}}}}}},"components":{"schemas":{"APIKeyInfo":{"title":"APIKeyInfo","required":["id","org_id","access_level","object_type","owner_type"],"type":"object","properties":{"id":{"title":"Id","type":"string","format":"uuid"},"org_id":{"title":"Org Id","type":"string","format":"uuid"},"project_id":{"title":"Project Id","type":"string","format":"uuid"},"env_id":{"title":"Env Id","type":"string","format":"uuid"},"access_level":{"$ref":"#/components/schemas/MemberAccessLevel"},"object_type":{"$ref":"#/components/schemas/MemberAccessObj"},"owner_type":{"$ref":"#/components/schemas/APIKeyOwnerType"}},"additionalProperties":false},"APIKeyOwnerType":{"title":"APIKeyOwnerType","enum":["pdp_config","member"],"type":"string","description":"An enumeration."},"APIKeyRead":{"title":"APIKeyRead","required":["id","secret"],"type":"object","properties":{"id":{"title":"Id","type":"string","format":"uuid"},"secret":{"title":"Secret","type":"string"}},"additionalProperties":false},"APIKeyScopeRead":{"title":"APIKeyScopeRead","required":["organization_id"],"type":"object","properties":{"organization_id":{"title":"Organization Id","type":"string","description":"Unique id of the organization that the api_key belongs to.","format":"uuid"},"project_id":{"title":"Project Id","type":"string","description":"Unique id of the project that the api_key belongs to.","format":"uuid"},"environment_id":{"title":"Environment Id","type":"string","description":"Unique id of the environment that the api_key belongs to.","format":"uuid"}},"additionalProperties":false},"APIKeyViewerContext":{"title":"APIKeyViewerContext","required":["type","api_key"],"type":"object","properties":{"type":{"title":"Type","enum":["api_key"],"type":"string"},"api_key":{"$ref":"#/components/schemas/APIKeyInfo"}}},"ActionBlockEditable":{"title":"ActionBlockEditable","type":"object","properties":{"name":{"title":"Name","type":"string","description":"a more descriptive name for the action"},"description":{"title":"Description","type":"string","description":"optional description string explaining what this action represents in your system"}},"additionalProperties":false},"ActionBlockRead":{"title":"ActionBlockRead","required":["id"],"type":"object","properties":{"name":{"title":"Name","type":"string","description":"a more descriptive name for the action"},"description":{"title":"Description","type":"string","description":"optional description string explaining what this action represents in your system"},"id":{"title":"Id","type":"string","description":"Unique id of the action","format":"uuid"},"key":{"title":"Key","type":"string","description":"action key"}},"additionalProperties":false},"AddRolePermissions":{"title":"AddRolePermissions","required":["permissions"],"type":"object","properties":{"permissions":{"title":"Permissions","type":"array","items":{"type":"string"},"description":"List of permissions to assign to the role. If a permission is already granted to the role it is skipped. Each permission can be either a resource action id, or `{resource_key}:{action_key}`, i.e: the \"permission name\"."}},"additionalProperties":false,"example":{"permissions":["document:write"]}},"AttributeBlockEditable":{"title":"AttributeBlockEditable","required":["type"],"type":"object","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/AttributeType"}],"description":"The type of the attribute, we currently support: `bool`, `number` (ints, floats), `time` (a timestamp), `string`, and `json`."},"description":{"title":"Description","type":"string","description":"optional description string explaining what data this attribute will store"}},"additionalProperties":false},"AttributeBlockRead":{"title":"AttributeBlockRead","required":["type","id"],"type":"object","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/AttributeType"}],"description":"The type of the attribute, we currently support: `bool`, `number` (ints, floats), `time` (a timestamp), `string`, and `json`."},"description":{"title":"Description","type":"string","description":"optional description string explaining what data this attribute will store"},"id":{"title":"Id","type":"string","description":"Unique id of the attribute","format":"uuid"},"key":{"title":"Key","type":"string","description":"action key"}},"additionalProperties":false},"AttributeType":{"title":"AttributeType","enum":["bool","number","string","time","json"],"type":"string","description":"\n supported attribute primitives\n "},"ConditionSetCreate":{"title":"ConditionSetCreate","required":["key","name"],"type":"object","properties":{"key":{"title":"Key","minLength":1,"type":"string","description":"A unique id by which Permit will identify the condition set. The key will be used as the generated rego rule name."},"type":{"allOf":[{"$ref":"#/components/schemas/ConditionSetType"}],"description":"the type of the set: UserSet or ResourceSet","default":"userset"},"autogenerated":{"title":"Autogenerated","type":"boolean","description":"whether the set was autogenerated by the system.","default":false},"resource_id":{"title":"Resource Id","anyOf":[{"type":"string"},{"type":"string","format":"uuid"}],"description":"For ResourceSets, the id of the base resource."},"name":{"title":"Name","minLength":1,"type":"string","description":"A descriptive name for the set, i.e: 'US based employees' or 'Users behind VPN'"},"description":{"title":"Description","type":"string","description":"an optional longer description of the set"},"conditions":{"title":"Conditions","type":"object","description":"a boolean expression that consists of multiple conditions, with and/or logic.","default":{}}},"additionalProperties":false,"example":{"key":"na_based_employees","name":"US or Canada based employees","type":"userset","conditions":{"allOf":[{"user.role":{"equals":"employee"}},{"user.location":{"in":["US","Canada"]}}]}}},"ConditionSetRead":{"title":"ConditionSetRead","required":["key","id","organization_id","project_id","environment_id","created_at","updated_at","name"],"type":"object","properties":{"key":{"title":"Key","minLength":1,"type":"string","description":"A unique id by which Permit will identify the condition set. The key will be used as the generated rego rule name."},"type":{"allOf":[{"$ref":"#/components/schemas/ConditionSetType"}],"description":"the type of the set: UserSet or ResourceSet","default":"userset"},"autogenerated":{"title":"Autogenerated","type":"boolean","description":"whether the set was autogenerated by the system.","default":false},"resource_id":{"title":"Resource Id","anyOf":[{"type":"string"},{"type":"string","format":"uuid"}],"description":"For ResourceSets, the id of the base resource."},"id":{"title":"Id","type":"string","description":"Unique id of the condition set","format":"uuid"},"organization_id":{"title":"Organization Id","type":"string","description":"Unique id of the organization that the condition set belongs to.","format":"uuid"},"project_id":{"title":"Project Id","type":"string","description":"Unique id of the project that the condition set belongs to.","format":"uuid"},"environment_id":{"title":"Environment Id","type":"string","description":"Unique id of the environment that the condition set belongs to.","format":"uuid"},"created_at":{"title":"Created At","type":"string","description":"Date and time when the condition set was created (ISO_8601 format).","format":"date-time"},"updated_at":{"title":"Updated At","type":"string","description":"Date and time when the condition set was last updated/modified (ISO_8601 format).","format":"date-time"},"resource":{"$ref":"#/components/schemas/ResourceRead"},"name":{"title":"Name","minLength":1,"type":"string","description":"A descriptive name for the set, i.e: 'US based employees' or 'Users behind VPN'"},"description":{"title":"Description","type":"string","description":"an optional longer description of the set"},"conditions":{"title":"Conditions","type":"object","description":"a boolean expression that consists of multiple conditions, with and/or logic.","default":{}}},"additionalProperties":false,"example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","resource_id":"e05f8571-f31e-20b2-2c45-15ae74cfb0f1","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","key":"na_based_employees","name":"US or Canada based employees","description":"All employees based in the US or Canada","type":"userset","autogenerated":false,"conditions":{"allOf":[{"user.role":{"equals":"employee"}},{"user.location":{"in":["US","Canada"]}}]}}},"ConditionSetRuleCreate":{"title":"ConditionSetRuleCreate","required":["user_set","permission","resource_set"],"type":"object","properties":{"user_set":{"title":"User Set","type":"string","description":"The userset that will be given permission, i.e: all the users matching this rule will be given the specified permission"},"permission":{"title":"Permission","type":"string","description":"The permission that will be granted to the userset *on* the resourceset. The permission can be either a resource action id, or `{resource_key}:{action_key}`, i.e: the \"permission name\"."},"resource_set":{"title":"Resource Set","type":"string","description":"The resourceset that represents the resources that are granted for access, i.e: all the resources matching this rule can be accessed by the userset to perform the granted *permission*"}},"additionalProperties":false,"example":{"user_set":"us_based_employees","permission":"repository:clone","resource_set":"private_repos"}},"ConditionSetRuleRead":{"title":"ConditionSetRuleRead","required":["id","key","user_set","permission","resource_set","organization_id","project_id","environment_id","created_at","updated_at"],"type":"object","properties":{"id":{"title":"Id","type":"string","description":"Unique id of the condition set rule","format":"uuid"},"key":{"title":"Key","type":"string","description":"A unique id by which Permit will identify this condition set rule."},"user_set":{"title":"User Set","type":"string","description":"the userset that is currently granted permissions, i.e: all the users matching this rule are granted the permission on the resourceset"},"permission":{"title":"Permission","type":"string","description":"a permission that is currently granted to the userset *on* the resourceset."},"resource_set":{"title":"Resource Set","type":"string","description":"the resourceset that represents the resources that are currently granted for access, i.e: all the resources matching this rule can be accessed by the userset to perform the granted *permission*"},"organization_id":{"title":"Organization Id","type":"string","description":"Unique id of the organization that the condition set rule belongs to.","format":"uuid"},"project_id":{"title":"Project Id","type":"string","description":"Unique id of the project that the condition set rule belongs to.","format":"uuid"},"environment_id":{"title":"Environment Id","type":"string","description":"Unique id of the environment that the condition set rule belongs to.","format":"uuid"},"created_at":{"title":"Created At","type":"string","description":"Date and time when the condition set rule was created (ISO_8601 format).","format":"date-time"},"updated_at":{"title":"Updated At","type":"string","description":"Date and time when the condition set rule was last updated/modified (ISO_8601 format).","format":"date-time"}},"additionalProperties":false,"example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","key":"us_based_employees_can_repository_clone_private_repos","user_set":"us_based_employees","permission":"repository:clone","resource_set":"private_repos","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:16:22Z"}},"ConditionSetRuleRemove":{"title":"ConditionSetRuleRemove","required":["user_set","permission","resource_set"],"type":"object","properties":{"user_set":{"title":"User Set","type":"string","description":"The userset that will be unassigned these permission, i.e: all the users matching this rule will lose the specified permission"},"permission":{"title":"Permission","type":"string","description":"The permission that will be removed from the userset *on* the resourceset. The permission can be either a resource action id, or `{resource_key}:{action_key}`, i.e: the \"permission name\"."},"resource_set":{"title":"Resource Set","type":"string","description":"The resourceset that represents the resources that are no longer granted for access, i.e: all the resources matching this rule can no longer be accessed by the userset, and will be revoked the specified *permission*"}},"additionalProperties":false,"example":{"user_set":"us_based_employees","permission":"repository:clone","resource_set":"private_repos"}},"ConditionSetType":{"title":"ConditionSetType","enum":["userset","resourceset"],"type":"string","description":"An enumeration."},"ConditionSetUpdate":{"title":"ConditionSetUpdate","type":"object","properties":{"name":{"title":"Name","minLength":1,"type":"string","description":"A descriptive name for the set, i.e: 'US based employees' or 'Users behind VPN'"},"description":{"title":"Description","type":"string","description":"an optional longer description of the set"},"conditions":{"title":"Conditions","type":"object","description":"a boolean expression that consists of multiple conditions, with and/or logic.","default":{}}},"additionalProperties":false,"example":{"name":"US based managers","conditions":{"allOf":[{"user.role":{"equals":"manager"}},{"user.location":{"in":["US"]}}]}}},"DataSourceConfig":{"title":"DataSourceConfig","required":["entries"],"type":"object","properties":{"entries":{"title":"Entries","type":"array","items":{"$ref":"#/components/schemas/DataSourceEntry"},"description":"list of data sources and how to fetch from them"}},"description":"Static list of Data Source Entries returned to client.\n\nAnswers this question for the client: from where should i get the\nfull picture of data i need? (as opposed to incremental data\nupdates)"},"DataSourceEntry":{"title":"DataSourceEntry","required":["url"],"type":"object","properties":{"url":{"title":"Url","type":"string","description":"Url source to query for data"},"config":{"title":"Config","type":"object","description":"Suggested fetcher configuration (e.g. auth or method) to fetch data with","default":{}},"topics":{"title":"Topics","type":"array","items":{"type":"string"},"description":"topics the data applies to","default":[]},"dst_path":{"title":"Dst Path","type":"string","description":"OPA data api path to store the document at","default":""},"save_method":{"title":"Save Method","type":"string","description":"Method used to write into OPA - PUT/PATCH","default":"PUT"}},"description":"Data source configuration - where client's should retrive data from and how they should store it"},"DevLogin":{"title":"DevLogin","required":["username"],"type":"object","properties":{"username":{"title":"Username","type":"string","description":"an email address from which to create a DEV MODE session"}}},"EnvironmentCreate":{"title":"EnvironmentCreate","required":["key","name"],"type":"object","properties":{"key":{"title":"Key","type":"string","description":"A URL-friendly name of the environment (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the environment."},"name":{"title":"Name","type":"string","description":"The name of the environment"},"description":{"title":"Description","type":"string","description":"an optional longer description of the environment"}},"additionalProperties":false},"EnvironmentRead":{"title":"EnvironmentRead","required":["key","id","organization_id","project_id","created_at","updated_at","name"],"type":"object","properties":{"key":{"title":"Key","type":"string","description":"A URL-friendly name of the environment (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the environment."},"id":{"title":"Id","type":"string","description":"Unique id of the environment","format":"uuid"},"organization_id":{"title":"Organization Id","type":"string","description":"Unique id of the organization that the environment belongs to.","format":"uuid"},"project_id":{"title":"Project Id","type":"string","description":"Unique id of the project that the environment belongs to.","format":"uuid"},"created_at":{"title":"Created At","type":"string","description":"Date and time when the environment was created (ISO_8601 format).","format":"date-time"},"updated_at":{"title":"Updated At","type":"string","description":"Date and time when the environment was last updated/modified (ISO_8601 format).","format":"date-time"},"name":{"title":"Name","type":"string","description":"The name of the environment"},"description":{"title":"Description","type":"string","description":"an optional longer description of the environment"}},"additionalProperties":false},"EnvironmentUpdate":{"title":"EnvironmentUpdate","type":"object","properties":{"name":{"title":"Name","type":"string","description":"The name of the environment"},"description":{"title":"Description","type":"string","description":"an optional longer description of the environment"}},"additionalProperties":false},"FailedInvite":{"title":"FailedInvite","required":["email","reason"],"type":"object","properties":{"email":{"title":"Email","type":"string"},"reason":{"title":"Reason","type":"string"}},"additionalProperties":false},"FullData":{"title":"FullData","required":["users","roles","condition_set_rules"],"type":"object","properties":{"users":{"title":"Users","type":"object","additionalProperties":{"$ref":"#/components/schemas/UserData"}},"roles":{"title":"Roles","type":"object","additionalProperties":{"$ref":"#/components/schemas/RoleData"}},"condition_set_rules":{"title":"Condition Set Rules","type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"IdentityRead":{"title":"IdentityRead","required":["user_id","provider","sub","email","email_verified","auth0_info"],"type":"object","properties":{"user_id":{"title":"User Id","type":"string","description":"Unique User Id of this identity in the identity provider (including the provider type)"},"provider":{"title":"Provider","type":"string","description":"The identity provider type this identity came from"},"sub":{"title":"Sub","type":"string","description":"Unique User Id of this identity in the identity provider (NOT including the provider type)"},"email":{"title":"Email","type":"string","description":"Email connected to this account identity","format":"email"},"email_verified":{"title":"Email Verified","type":"boolean","description":"Whether this email address connected to this account identity is verified or not. For social providers like 'Login with Google' this is done automatically, otherwise we will send the user a verification link in email."},"auth0_info":{"title":"Auth0 Info","type":"object","description":"Raw user info json coming from our identity provider and matching a specific account identity"}},"additionalProperties":false},"InviteAttemptResult":{"title":"InviteAttemptResult","type":"object","properties":{"invite_successful":{"title":"Invite Successful","type":"boolean","description":"the invite code was accepted","default":false},"invite_failed_reason":{"title":"Invite Failed Reason","type":"string","description":"if the invite failed, the reason it failed"}}},"InviteCreate":{"title":"InviteCreate","required":["email","role"],"type":"object","properties":{"email":{"title":"Email","type":"string","description":"The invited member's email address","format":"email"},"role":{"title":"Role","type":"string","description":"The role the member will be assigned with"}},"additionalProperties":false},"InviteRead":{"title":"InviteRead","required":["email","role","id","organization_id","invite_code","created_at","status"],"type":"object","properties":{"email":{"title":"Email","type":"string","description":"The invited member's email address","format":"email"},"role":{"title":"Role","type":"string","description":"The role the member will be assigned with"},"id":{"title":"Id","type":"string","description":"Unique id of the invite","format":"uuid"},"organization_id":{"title":"Organization Id","type":"string","description":"Unique id of the organization that the invite belongs to.","format":"uuid"},"invite_code":{"title":"Invite Code","type":"string","description":"The invite code that is sent to the member's email","format":"uuid"},"created_at":{"title":"Created At","type":"string","description":"Date and time when the invite was created (ISO_8601 format).","format":"date-time"},"status":{"allOf":[{"$ref":"#/components/schemas/InviteStatus"}],"description":"The status of the invite (pending, failed, etc)"},"failed_reason":{"title":"Failed Reason","type":"string","description":"if failed, the reason the invitation failed"}},"additionalProperties":false,"example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","invite_code":"40ef0e48-a11f-4963-a229-e396c9eeefff","email":"[email protected]","role":"admin","created_at":"2019-08-24T14:15:22Z","status":"pending","failed_reason":""}},"InviteStatus":{"title":"InviteStatus","enum":["pending","accepted","failed","canceled"],"type":"string","description":"An enumeration."},"Labels":{"title":"Labels","required":["id","version"],"type":"object","properties":{"id":{"title":"Id","type":"string","format":"uuid"},"version":{"title":"Version","type":"string"}}},"LanguageInstructions":{"title":"LanguageInstructions","required":["language","label","instructions"],"type":"object","properties":{"language":{"$ref":"#/components/schemas/ProgrammingLanguage"},"label":{"title":"Label","type":"string"},"instructions":{"title":"Instructions","type":"string"}},"additionalProperties":false},"LoginResult":{"title":"LoginResult","required":["logged_in","expires_at"],"type":"object","properties":{"logged_in":{"title":"Logged In","type":"boolean","description":"whether login was successful"},"expires_at":{"title":"Expires At","type":"integer","description":"when will the login session expire (the unix timestamp in seconds)"},"active_org_id":{"title":"Active Org Id","type":"string","description":"the active organization on the session after the login","format":"uuid"},"invite_attempt":{"$ref":"#/components/schemas/InviteAttemptResult"}}},"MemberAccessLevel":{"title":"MemberAccessLevel","enum":["read","write","admin"],"type":"string","description":"An enumeration."},"MemberAccessObj":{"title":"MemberAccessObj","enum":["org","project","env"],"type":"string","description":"An enumeration."},"MemberInfo":{"title":"MemberInfo","required":["member_id","login_expires","email","is_superuser","is_onboarding","settings"],"type":"object","properties":{"member_id":{"title":"Member Id","type":"string","format":"uuid"},"login_expires":{"title":"Login Expires","type":"string","format":"date-time"},"email":{"title":"Email","type":"string"},"name":{"title":"Name","type":"string"},"given_name":{"title":"Given Name","type":"string"},"family_name":{"title":"Family Name","type":"string"},"is_superuser":{"title":"Is Superuser","type":"boolean"},"is_onboarding":{"title":"Is Onboarding","type":"boolean"},"settings":{"title":"Settings","type":"object"}}},"MemberViewerContext":{"title":"MemberViewerContext","required":["type","member","session_id"],"type":"object","properties":{"type":{"title":"Type","enum":["member"],"type":"string"},"member":{"$ref":"#/components/schemas/MemberInfo"},"session_id":{"title":"Session Id","type":"string"},"user_id":{"title":"User Id","type":"string"}}},"MultiInviteResult":{"title":"MultiInviteResult","required":["success"],"type":"object","properties":{"success":{"title":"Success","type":"array","items":{"$ref":"#/components/schemas/InviteRead"}},"failed":{"title":"Failed","type":"array","items":{"$ref":"#/components/schemas/FailedInvite"},"description":"invites that were not even attempted, and the reason why","default":[]}},"additionalProperties":false},"OPADecisionLog":{"title":"OPADecisionLog","required":["decision_id","labels","timestamp"],"type":"object","properties":{"decision_id":{"title":"Decision Id","type":"string","format":"uuid"},"labels":{"$ref":"#/components/schemas/Labels"},"run_id":{"title":"Run Id","type":"string","format":"uuid"},"timestamp":{"title":"Timestamp","type":"string","format":"date-time"},"path":{"title":"Path","type":"string"},"input":{"title":"Input","type":"object"},"result":{"title":"Result","type":"object"}}},"OPALClient":{"title":"OPALClient","required":["DATA_TOPICS","CLIENT_TOKEN","SERVER_URL","SERVER_WS_URL","SERVER_PUBSUB_URL","DEFAULT_DATA_SOURCES_CONFIG_URL"],"type":"object","properties":{"DATA_TOPICS":{"title":"Data Topics","type":"array","items":{"type":"string"}},"CLIENT_TOKEN":{"title":"Client Token","type":"string"},"SERVER_URL":{"title":"Server Url","type":"string"},"SERVER_WS_URL":{"title":"Server Ws Url","type":"string"},"SERVER_PUBSUB_URL":{"title":"Server Pubsub Url","type":"string"},"DEFAULT_DATA_SOURCES_CONFIG_URL":{"title":"Default Data Sources Config Url","type":"string"},"SCOPE_ID":{"title":"Scope Id","type":"string"}},"additionalProperties":false},"OnboardingStep":{"title":"OnboardingStep","enum":["create_organization","create_project","create_resource","create_actions","assign_permissions","assign_user_roles","connect_sdk","done"],"type":"string","description":"An enumeration."},"OrgMemberRead":{"title":"OrgMemberRead","required":["id","email","email_verified","is_superuser","is_onboarding","onboarding_step","created_at","identities","settings"],"type":"object","properties":{"id":{"title":"Id","type":"string","description":"Unique id of the account member","format":"uuid"},"email":{"title":"Email","type":"string","description":"Email of the user controlling this account","format":"email"},"email_verified":{"title":"Email Verified","type":"boolean","description":"Whether this email address is verified or not. For social providers like 'Login with Google' this is done automatically, otherwise we will send the user a verification link in email."},"name":{"title":"Name","type":"string","description":"Name of this user"},"given_name":{"title":"Given Name","type":"string","description":"First name of the user"},"family_name":{"title":"Family Name","type":"string","description":"Last name of the user"},"picture":{"title":"Picture","type":"string","description":"URL to picture, photo, or avatar of the user that controls this account."},"is_superuser":{"title":"Is Superuser","type":"boolean","description":"Whether or not this user has special access to permit.io organizations"},"is_onboarding":{"title":"Is Onboarding","type":"boolean","description":"Whether or not this user is currently onboarding, needs to be replaced by a user journey object"},"onboarding_step":{"allOf":[{"$ref":"#/components/schemas/OnboardingStep"}],"description":"the step the user is currently going through in onboarding"},"created_at":{"title":"Created At","type":"string","description":"Date and time when the account member was created (ISO_8601 format).","format":"date-time"},"last_login":{"title":"Last Login","type":"string","description":"Last date and time this user logged in (ISO_8601 format).","format":"date-time"},"last_ip":{"title":"Last Ip","type":"string","description":"Last IP address from which this user logged in.","default":"0.0.0.0"},"logins_count":{"title":"Logins Count","type":"integer","description":"Total number of logins this user has performed.","default":0},"identities":{"title":"Identities","type":"array","items":{"$ref":"#/components/schemas/IdentityRead"}},"settings":{"title":"Settings","type":"object","description":"Custom permit.io dashboard settings, such as preferred theme, etc."}},"additionalProperties":false,"example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","email":"[email protected]","email_verified":true,"given_name":"Jane","family_name":"Doe","name":"Jane Josephine Doe","picture":"http://permituser.com/janedoe/me.jpg","settings":{"option":"value","another-option":"another-value"},"is_superuser":false,"is_onboarding":true,"onboarding_step":"done","created_at":"2019-08-20T14:15:22Z","last_login":"2019-08-24T14:15:22Z","last_ip":"1.2.3.4","logins_count":2,"identities":[{"user_id":"google-oauth2|000000000000000000001","provider":"google-oauth2","sub":"000000000000000000001","email":"[email protected]","email_verified":true,"user_info":{"sub":"000000000000000000001","name":"Jane Josephine Doe","given_name":"Jane","family_name":"Doe","middle_name":"Josephine","nickname":"JJ","preferred_username":"j.doe","profile":"http://permituser.com/janedoe","picture":"http://permituser.com/janedoe/me.jpg","website":"http://permituser.com","email":"[email protected]","email_verified":true,"gender":"female","birthdate":"1972-03-31","zoneinfo":"America/Los_Angeles","locale":"en-US","phone_number":"+1 (111) 222-3434","phone_number_verified":false,"address":{"country":"us"},"updated_at":"1556845729"}}]}},"OrgMemberUpdate":{"title":"OrgMemberUpdate","type":"object","properties":{"settings":{"title":"Settings","type":"object","description":"Custom permit.io dashboard settings, such as preferred theme, etc."},"onboarding_step":{"allOf":[{"$ref":"#/components/schemas/OnboardingStep"}],"description":"updates the onboarding step (optional)"}},"additionalProperties":false},"OrganizationCreate":{"title":"OrganizationCreate","required":["key","name"],"type":"object","properties":{"key":{"title":"Key","type":"string","description":"A URL-friendly name of the organization (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the organization."},"name":{"title":"Name","type":"string","description":"The name of the organization, usually it's your company's name."},"settings":{"title":"Settings","type":"object","description":"the settings for this project"}},"additionalProperties":false},"OrganizationRead":{"title":"OrganizationRead","required":["key","id","created_at","updated_at","name"],"type":"object","properties":{"key":{"title":"Key","type":"string","description":"A URL-friendly name of the organization (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the organization."},"id":{"title":"Id","type":"string","description":"Unique id of the organization","format":"uuid"},"created_at":{"title":"Created At","type":"string","description":"Date and time when the organization was created (ISO_8601 format).","format":"date-time"},"updated_at":{"title":"Updated At","type":"string","description":"Date and time when the organization was last updated/modified (ISO_8601 format).","format":"date-time"},"name":{"title":"Name","type":"string","description":"The name of the organization, usually it's your company's name."},"settings":{"title":"Settings","type":"object","description":"the settings for this project"}},"additionalProperties":false},"OrganizationUpdate":{"title":"OrganizationUpdate","type":"object","properties":{"name":{"title":"Name","type":"string","description":"The name of the organization, usually it's your company's name."},"settings":{"title":"Settings","type":"object","description":"the settings for this project"}},"additionalProperties":false},"PDPConfigRead":{"title":"PDPConfigRead","required":["id","organization_id","project_id","environment_id","client_secret"],"type":"object","properties":{"id":{"title":"Id","type":"string","format":"uuid"},"name":{"title":"Name","type":"string"},"organization_id":{"title":"Organization Id","type":"string","description":"Unique id of the organization that the pdp_config belongs to.","format":"uuid"},"project_id":{"title":"Project Id","type":"string","description":"Unique id of the project that the pdp_config belongs to.","format":"uuid"},"environment_id":{"title":"Environment Id","type":"string","description":"Unique id of the environment that the pdp_config belongs to.","format":"uuid"},"client_secret":{"title":"Client Secret","type":"string"}},"additionalProperties":false},"PDPContext":{"title":"PDPContext","required":["customer_id","client_id","backend_tier"],"type":"object","properties":{"customer_id":{"title":"Customer Id","type":"string","format":"uuid"},"client_id":{"title":"Client Id","type":"string"},"backend_tier":{"title":"Backend Tier","maxLength":65536,"minLength":1,"type":"string","format":"uri"},"component":{"title":"Component","type":"string","default":"sidecar"}},"additionalProperties":false},"PaginatedResult_OPADecisionLog_":{"title":"PaginatedResult[OPADecisionLog]","required":["data","total_count"],"type":"object","properties":{"data":{"title":"Data","type":"array","items":{"$ref":"#/components/schemas/OPADecisionLog"}},"total_count":{"title":"Total Count","minimum":0.0,"type":"integer"},"page_count":{"title":"Page Count","minimum":0.0,"type":"integer","default":0}},"additionalProperties":false},"PaginatedResult_UserRead_":{"title":"PaginatedResult[UserRead]","required":["data","total_count"],"type":"object","properties":{"data":{"title":"Data","type":"array","items":{"$ref":"#/components/schemas/UserRead"}},"total_count":{"title":"Total Count","minimum":0.0,"type":"integer"},"page_count":{"title":"Page Count","minimum":0.0,"type":"integer","default":0}},"additionalProperties":false},"PdpValues":{"title":"PdpValues","required":["BACKEND_SERVICE_URL","OPA_DECISION_LOG_INGRESS_ROUTE"],"type":"object","properties":{"BACKEND_SERVICE_URL":{"title":"Backend Service Url","type":"string"},"OPA_DECISION_LOG_INGRESS_ROUTE":{"title":"Opa Decision Log Ingress Route","type":"string"}},"additionalProperties":false},"ProgrammingLanguage":{"title":"ProgrammingLanguage","enum":["javascript","python","dotnet","java"],"description":"An enumeration."},"ProjectCreate":{"title":"ProjectCreate","required":["key","name"],"type":"object","properties":{"key":{"title":"Key","type":"string","description":"A URL-friendly name of the project (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the project."},"name":{"title":"Name","type":"string","description":"The name of the project"},"description":{"title":"Description","type":"string","description":"a longer description outlining the project objectives"},"settings":{"title":"Settings","type":"object","description":"the settings for this project"}},"additionalProperties":false},"ProjectRead":{"title":"ProjectRead","required":["key","id","organization_id","created_at","updated_at","name"],"type":"object","properties":{"key":{"title":"Key","type":"string","description":"A URL-friendly name of the project (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the project."},"id":{"title":"Id","type":"string","description":"Unique id of the project","format":"uuid"},"organization_id":{"title":"Organization Id","type":"string","description":"Unique id of the organization that the project belongs to.","format":"uuid"},"created_at":{"title":"Created At","type":"string","description":"Date and time when the project was created (ISO_8601 format).","format":"date-time"},"updated_at":{"title":"Updated At","type":"string","description":"Date and time when the project was last updated/modified (ISO_8601 format).","format":"date-time"},"name":{"title":"Name","type":"string","description":"The name of the project"},"description":{"title":"Description","type":"string","description":"a longer description outlining the project objectives"},"settings":{"title":"Settings","type":"object","description":"the settings for this project"}},"additionalProperties":false},"ProjectUpdate":{"title":"ProjectUpdate","type":"object","properties":{"name":{"title":"Name","type":"string","description":"The name of the project"},"description":{"title":"Description","type":"string","description":"a longer description outlining the project objectives"},"settings":{"title":"Settings","type":"object","description":"the settings for this project"}},"additionalProperties":false},"RelationsBlock":{"title":"RelationsBlock","type":"object","additionalProperties":false,"description":"A actions definition block, typically contained within a resource type definition block.\nThe actions represents the ways you can interact with a protected resource."},"RemoteConfig":{"title":"RemoteConfig","required":["opal_client","context"],"type":"object","properties":{"opal_common":{"title":"Opal Common","type":"object","default":{}},"opal_client":{"$ref":"#/components/schemas/OPALClient"},"pdp":{"title":"Pdp","allOf":[{"$ref":"#/components/schemas/PdpValues"}],"default":{}},"context":{"$ref":"#/components/schemas/PDPContext"}},"additionalProperties":false},"RemoveRolePermissions":{"title":"RemoveRolePermissions","required":["permissions"],"type":"object","properties":{"permissions":{"title":"Permissions","type":"array","items":{"type":"string"},"description":"List of permissions to remove from the role. If a permission is not found it is skipped. Each permission can be either a resource action id, or `{resource_key}:{action_key}`,i.e: the \"permission name\"."}},"additionalProperties":false,"example":{"permissions":["document:share"]}},"ResourceActionCreate":{"title":"ResourceActionCreate","required":["key","name"],"type":"object","properties":{"key":{"title":"Key","type":"string","description":"A URL-friendly name of the action (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the action."},"name":{"title":"Name","type":"string","description":"The name of the action"},"description":{"title":"Description","type":"string","description":"An optional longer description of what this action respresents in your system"}},"additionalProperties":false,"example":{"key":"read","name":"read","description":"read a document"}},"ResourceActionRead":{"title":"ResourceActionRead","required":["name","key","id","permission_name","organization_id","project_id","environment_id","resource_id","created_at","updated_at"],"type":"object","properties":{"name":{"title":"Name","type":"string","description":"The name of the action"},"description":{"title":"Description","type":"string","description":"An optional longer description of what this action respresents in your system"},"key":{"title":"Key","type":"string","description":"A URL-friendly name of the action (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the action."},"id":{"title":"Id","type":"string","description":"Unique id of the action","format":"uuid"},"permission_name":{"title":"Permission Name","type":"string","description":"The name of the action, prefixed by the resource the action is acting upon."},"organization_id":{"title":"Organization Id","type":"string","description":"Unique id of the organization that the action belongs to.","format":"uuid"},"project_id":{"title":"Project Id","type":"string","description":"Unique id of the project that the action belongs to.","format":"uuid"},"environment_id":{"title":"Environment Id","type":"string","description":"Unique id of the environment that the action belongs to.","format":"uuid"},"resource_id":{"title":"Resource Id","type":"string","description":"Unique id of the resource that the action belongs to.","format":"uuid"},"created_at":{"title":"Created At","type":"string","description":"Date and time when the action was created (ISO_8601 format).","format":"date-time"},"updated_at":{"title":"Updated At","type":"string","description":"Date and time when the action was last updated/modified (ISO_8601 format).","format":"date-time"}},"additionalProperties":false,"example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","key":"read","name":"read","permission_name":"document:read","description":"read a document","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","resource_id":"40ef0e48-a11f-4963-a229-e396c9f7e7dd","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z"}},"ResourceActionUpdate":{"title":"ResourceActionUpdate","type":"object","properties":{"name":{"title":"Name","type":"string","description":"The name of the action"},"description":{"title":"Description","type":"string","description":"An optional longer description of what this action respresents in your system"}},"additionalProperties":false,"example":{"description":"read a document"}},"ResourceAttributeCreate":{"title":"ResourceAttributeCreate","required":["key","type"],"type":"object","properties":{"key":{"title":"Key","type":"string","description":"A URL-friendly name of the attribute (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the attribute."},"type":{"allOf":[{"$ref":"#/components/schemas/AttributeType"}],"description":"The type of the attribute, we currently support: `bool`, `number` (ints, floats), `time` (a timestamp), `string`, and `json`."},"description":{"title":"Description","type":"string","description":"An optional longer description of what this attribute respresents in your system"}},"additionalProperties":false,"example":{"key":"private","type":"bool","description":"whether or not the github repository is private"}},"ResourceAttributeRead":{"title":"ResourceAttributeRead","required":["type","key","id","resource_id","resource_key","organization_id","project_id","environment_id","created_at","updated_at"],"type":"object","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/AttributeType"}],"description":"The type of the attribute, we currently support: `bool`, `number` (ints, floats), `time` (a timestamp), `string`, and `json`."},"description":{"title":"Description","type":"string","description":"An optional longer description of what this attribute respresents in your system"},"key":{"title":"Key","type":"string","description":"A URL-friendly name of the attribute (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the attribute."},"id":{"title":"Id","type":"string","description":"Unique id of the attribute","format":"uuid"},"resource_id":{"title":"Resource Id","type":"string","description":"Unique id of the resource that the attribute belongs to.","format":"uuid"},"resource_key":{"title":"Resource Key","type":"string","description":"A URL-friendly name of the resource (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the resource."},"organization_id":{"title":"Organization Id","type":"string","description":"Unique id of the organization that the attribute belongs to.","format":"uuid"},"project_id":{"title":"Project Id","type":"string","description":"Unique id of the project that the attribute belongs to.","format":"uuid"},"environment_id":{"title":"Environment Id","type":"string","description":"Unique id of the environment that the attribute belongs to.","format":"uuid"},"created_at":{"title":"Created At","type":"string","description":"Date and time when the attribute was created (ISO_8601 format).","format":"date-time"},"updated_at":{"title":"Updated At","type":"string","description":"Date and time when the attribute was last updated/modified (ISO_8601 format).","format":"date-time"}},"additionalProperties":false,"example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","key":"private","type":"bool","description":"whether or not the github repository is private","resource_id":"40ef0e48-a11f-4963-a229-e396c9f7e7dd","resource_key":"repository","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z"}},"ResourceAttributeUpdate":{"title":"ResourceAttributeUpdate","type":"object","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/AttributeType"}],"description":"The type of the attribute, we currently support: `bool`, `number` (ints, floats), `time` (a timestamp), `string`, and `json`."},"description":{"title":"Description","type":"string","description":"An optional longer description of what this attribute respresents in your system"}},"additionalProperties":false,"example":{"description":"whether or not the github repository is private"}},"ResourceCreate":{"title":"ResourceCreate","required":["key","name","actions"],"type":"object","properties":{"key":{"title":"Key","type":"string","description":"A URL-friendly name of the resource (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the resource."},"name":{"title":"Name","type":"string","description":"The name of the resource"},"urn":{"title":"Urn","type":"string","description":"The [URN](https://en.wikipedia.org/wiki/Uniform_Resource_Name) (Uniform Resource Name) of the resource"},"description":{"title":"Description","type":"string","description":"An optional longer description of what this resource respresents in your system"},"actions":{"title":"Actions","type":"object","additionalProperties":{"$ref":"#/components/schemas/ActionBlockEditable"},"description":"\n A actions definition block, typically contained within a resource type definition block.\n The actions represents the ways you can interact with a protected resource.\n "},"attributes":{"title":"Attributes","type":"object","additionalProperties":{"$ref":"#/components/schemas/AttributeBlockEditable"},"description":"Attributes that each resource of this type defines, and can be used in your ABAC policies."},"roles":{"title":"Roles","allOf":[{"$ref":"#/components/schemas/RolesBlock"}],"description":"Roles defined on this resource. The key is the role name, and the value contains the role properties such as granted permissions, base roles, etc."},"relations":{"title":"Relations","allOf":[{"$ref":"#/components/schemas/RelationsBlock"}],"description":"Relations to other resources. The key is the relation name, and the value is the destination resource."}},"additionalProperties":false,"example":{"key":"repository","name":"Repository","actions":{"clone":{},"read":{},"push":{}},"roles":{"contributor":{"permissions":["read"],"description":"the contributor role can only read from the repo"},"maintainer":{"permissions":["push"],"extends":["contributor"]}},"relations":{"parent":"Organization"},"attributes":{"created":{"type":"time","description":"the time (timestamp) the repository was created"},"private":{"type":"bool","description":"whether the repo is private (if false, the repo is public)"}}}},"ResourceInstanceCreate":{"title":"ResourceInstanceCreate","required":["key","resource"],"type":"object","properties":{"key":{"title":"Key","type":"string","description":"A unique identifier by which Permit will identify the resource instance for permission checks. You will later pass this identifier to the `permit.check()` API. A key can be anything: for example the resource db id, a url slug, a UUID or anything else as long as it's unique on your end. The resource instance key must be url-friendly."},"tenant":{"title":"Tenant","type":"string","description":"the *key* of the tenant that this resource belongs to, used to enforce tenant boundaries in multi-tenant apps."},"resource":{"title":"Resource","type":"string","description":"the *key* of the resource (type) of this resource instance. For example: if this resource instance is the annual budget document, the key of the resource might be `document`."},"attributes":{"title":"Attributes","type":"object","description":"Arbitraty resource attributes that will be used to enforce attribute-based access control policies.","default":{}}},"additionalProperties":false,"example":{"key":"react","resource":"repository","tenant":"default","attributes":{"private":"false","owner":"facebook"}}},"ResourceInstanceRead":{"title":"ResourceInstanceRead","required":["key","resource","id","organization_id","project_id","environment_id","created_at","updated_at","resource_id"],"type":"object","properties":{"key":{"title":"Key","type":"string","description":"A unique identifier by which Permit will identify the resource instance for permission checks. You will later pass this identifier to the `permit.check()` API. A key can be anything: for example the resource db id, a url slug, a UUID or anything else as long as it's unique on your end. The resource instance key must be url-friendly."},"tenant":{"title":"Tenant","type":"string","description":"the *key* of the tenant that this resource belongs to, used to enforce tenant boundaries in multi-tenant apps."},"resource":{"title":"Resource","type":"string","description":"the *key* of the resource (type) of this resource instance. For example: if this resource instance is the annual budget document, the key of the resource might be `document`."},"id":{"title":"Id","type":"string","description":"Unique id of the resource instance","format":"uuid"},"organization_id":{"title":"Organization Id","type":"string","description":"Unique id of the organization that the resource instance belongs to.","format":"uuid"},"project_id":{"title":"Project Id","type":"string","description":"Unique id of the project that the resource instance belongs to.","format":"uuid"},"environment_id":{"title":"Environment Id","type":"string","description":"Unique id of the environment that the resource instance belongs to.","format":"uuid"},"created_at":{"title":"Created At","type":"string","description":"Date and time when the resource instance was created (ISO_8601 format).","format":"date-time"},"updated_at":{"title":"Updated At","type":"string","description":"Date and time when the resource instance was last updated/modified (ISO_8601 format).","format":"date-time"},"resource_id":{"title":"Resource Id","type":"string","description":"the id of the resource (type) of this resource instance.","format":"uuid"},"tenant_id":{"title":"Tenant Id","type":"string","description":"the id of the tenant of this resource instance.","format":"uuid"},"attributes":{"title":"Attributes","type":"object","description":"Arbitraty resource attributes that will be used to enforce attribute-based access control policies.","default":{}}},"additionalProperties":false,"example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","resource_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c5","tenant_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c3","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","key":"react","resource":"repository","tenant":"default","attributes":{"private":"false","owner":"facebook"}}},"ResourceInstanceUpdate":{"title":"ResourceInstanceUpdate","type":"object","properties":{"attributes":{"title":"Attributes","type":"object","description":"Arbitraty resource attributes that will be used to enforce attribute-based access control policies.","default":{}}},"additionalProperties":false,"example":{"attributes":{"private":"false","owner":"facebook"}}},"ResourceRead":{"title":"ResourceRead","required":["key","id","organization_id","project_id","environment_id","created_at","updated_at","name"],"type":"object","properties":{"key":{"title":"Key","type":"string","description":"A URL-friendly name of the resource (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the resource."},"id":{"title":"Id","type":"string","description":"Unique id of the resource","format":"uuid"},"organization_id":{"title":"Organization Id","type":"string","description":"Unique id of the organization that the resource belongs to.","format":"uuid"},"project_id":{"title":"Project Id","type":"string","description":"Unique id of the project that the resource belongs to.","format":"uuid"},"environment_id":{"title":"Environment Id","type":"string","description":"Unique id of the environment that the resource belongs to.","format":"uuid"},"created_at":{"title":"Created At","type":"string","description":"Date and time when the resource was created (ISO_8601 format).","format":"date-time"},"updated_at":{"title":"Updated At","type":"string","description":"Date and time when the resource was last updated/modified (ISO_8601 format).","format":"date-time"},"name":{"title":"Name","type":"string","description":"The name of the resource"},"urn":{"title":"Urn","type":"string","description":"The [URN](https://en.wikipedia.org/wiki/Uniform_Resource_Name) (Uniform Resource Name) of the resource"},"description":{"title":"Description","type":"string","description":"An optional longer description of what this resource respresents in your system"},"actions":{"title":"Actions","type":"object","additionalProperties":{"$ref":"#/components/schemas/ActionBlockRead"},"description":"\n A actions definition block, typically contained within a resource type definition block.\n The actions represents the ways you can interact with a protected resource.\n ","default":{}},"attributes":{"title":"Attributes","type":"object","additionalProperties":{"$ref":"#/components/schemas/AttributeBlockRead"},"description":"Attributes that each resource of this type defines, and can be used in your ABAC policies.","default":{}},"roles":{"title":"Roles","allOf":[{"$ref":"#/components/schemas/RolesBlock"}],"description":"Roles defined on this resource. The key is the role name, and the value contains the role properties such as granted permissions, base roles, etc."},"relations":{"title":"Relations","allOf":[{"$ref":"#/components/schemas/RelationsBlock"}],"description":"Relations to other resources. The key is the relation name, and the value is the destination resource."}},"additionalProperties":false,"example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","key":"repository","name":"Repository","urn":"prn:github:scm:repository","description":"a git repository stored on github","actions":{"clone":{"id":"90e21d70-2b1b-42f0-b492-8fd69c1d79d1"},"read":{"id":"2bc27751-6115-43c0-b68c-928cb46e34bc"},"push":{"id":"e06da336-6e03-41d6-a495-40b0d7537b2a"}},"roles":{"contributor":{"permissions":["read"],"description":"the contributor role can only read from the repo"},"maintainer":{"permissions":["push"],"extends":["contributor"]}},"relations":{"parent":"Organization"},"attributes":{"created":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f11","type":"time","description":"the time (timestamp) the repository was created"},"private":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f22","type":"bool","description":"whether the repo is private (if false, the repo is public)"}}}},"ResourceReplace":{"title":"ResourceReplace","required":["name","actions"],"type":"object","properties":{"name":{"title":"Name","type":"string","description":"The name of the resource"},"urn":{"title":"Urn","type":"string","description":"The [URN](https://en.wikipedia.org/wiki/Uniform_Resource_Name) (Uniform Resource Name) of the resource"},"description":{"title":"Description","type":"string","description":"An optional longer description of what this resource respresents in your system"},"actions":{"title":"Actions","type":"object","additionalProperties":{"$ref":"#/components/schemas/ActionBlockEditable"},"description":"\n A actions definition block, typically contained within a resource type definition block.\n The actions represents the ways you can interact with a protected resource.\n "},"attributes":{"title":"Attributes","type":"object","additionalProperties":{"$ref":"#/components/schemas/AttributeBlockEditable"},"description":"Attributes that each resource of this type defines, and can be used in your ABAC policies."},"roles":{"title":"Roles","allOf":[{"$ref":"#/components/schemas/RolesBlock"}],"description":"Roles defined on this resource. The key is the role name, and the value contains the role properties such as granted permissions, base roles, etc."},"relations":{"title":"Relations","allOf":[{"$ref":"#/components/schemas/RelationsBlock"}],"description":"Relations to other resources. The key is the relation name, and the value is the destination resource."}},"additionalProperties":false},"ResourceRoleCreate":{"title":"ResourceRoleCreate","required":["key","name"],"type":"object","properties":{"key":{"title":"Key","type":"string","description":"A URL-friendly name of the role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the role."},"name":{"title":"Name","type":"string","description":"The name of the role"},"description":{"title":"Description","type":"string","description":"optional description string explaining what this role represents, or what permissions are granted to it."},"permissions":{"title":"Permissions","type":"array","items":{"type":"string"},"description":"list of action keys that define what actions this resource role is permitted to do"},"extends":{"title":"Extends","type":"array","items":{"type":"string"},"description":"list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list."}},"additionalProperties":false,"example":{"key":"maintainer","name":"Maintainer","description":"the maintainer role can read from the repo and push changes","permissions":["push"],"extends":["contributor"]}},"ResourceRoleRead":{"title":"ResourceRoleRead","required":["name","key","id","organization_id","project_id","environment_id","resource_id","created_at","updated_at"],"type":"object","properties":{"name":{"title":"Name","type":"string","description":"The name of the role"},"description":{"title":"Description","type":"string","description":"optional description string explaining what this role represents, or what permissions are granted to it."},"permissions":{"title":"Permissions","type":"array","items":{"type":"string"},"description":"list of action keys that define what actions this resource role is permitted to do"},"extends":{"title":"Extends","type":"array","items":{"type":"string"},"description":"list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list."},"key":{"title":"Key","type":"string","description":"A URL-friendly name of the role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the role."},"id":{"title":"Id","type":"string","description":"Unique id of the role","format":"uuid"},"organization_id":{"title":"Organization Id","type":"string","description":"Unique id of the organization that the role belongs to.","format":"uuid"},"project_id":{"title":"Project Id","type":"string","description":"Unique id of the project that the role belongs to.","format":"uuid"},"environment_id":{"title":"Environment Id","type":"string","description":"Unique id of the environment that the role belongs to.","format":"uuid"},"resource_id":{"title":"Resource Id","type":"string","description":"Unique id of the resource that the role belongs to.","format":"uuid"},"created_at":{"title":"Created At","type":"string","description":"Date and time when the role was created (ISO_8601 format).","format":"date-time"},"updated_at":{"title":"Updated At","type":"string","description":"Date and time when the role was last updated/modified (ISO_8601 format).","format":"date-time"}},"additionalProperties":false,"example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","key":"maintainer","name":"Maintainer","description":"the maintainer role can read from the repo and push changes","permissions":["push"],"extends":["contributor"],"organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","resource_id":"40ef0e48-a11f-4963-a229-e396c9f7e7dd","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z"}},"ResourceRoleUpdate":{"title":"ResourceRoleUpdate","type":"object","properties":{"name":{"title":"Name","type":"string","description":"The name of the role"},"description":{"title":"Description","type":"string","description":"optional description string explaining what this role represents, or what permissions are granted to it."},"permissions":{"title":"Permissions","type":"array","items":{"type":"string"},"description":"list of action keys that define what actions this resource role is permitted to do"},"extends":{"title":"Extends","type":"array","items":{"type":"string"},"description":"list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list."}},"additionalProperties":false,"example":{"description":"the maintainer role can read from the repo and push changes","permissions":["push"]}},"ResourceUpdate":{"title":"ResourceUpdate","type":"object","properties":{"name":{"title":"Name","type":"string","description":"The name of the resource"},"urn":{"title":"Urn","type":"string","description":"The [URN](https://en.wikipedia.org/wiki/Uniform_Resource_Name) (Uniform Resource Name) of the resource"},"description":{"title":"Description","type":"string","description":"An optional longer description of what this resource respresents in your system"},"actions":{"title":"Actions","type":"object","additionalProperties":{"$ref":"#/components/schemas/ActionBlockEditable"},"description":"\n A actions definition block, typically contained within a resource type definition block.\n The actions represents the ways you can interact with a protected resource.\n "},"attributes":{"title":"Attributes","type":"object","additionalProperties":{"$ref":"#/components/schemas/AttributeBlockEditable"},"description":"Attributes that each resource of this type defines, and can be used in your ABAC policies."},"roles":{"title":"Roles","allOf":[{"$ref":"#/components/schemas/RolesBlock"}],"description":"Roles defined on this resource. The key is the role name, and the value contains the role properties such as granted permissions, base roles, etc."},"relations":{"title":"Relations","allOf":[{"$ref":"#/components/schemas/RelationsBlock"}],"description":"Relations to other resources. The key is the relation name, and the value is the destination resource."}},"additionalProperties":false},"RoleAssignmentCreate":{"title":"RoleAssignmentCreate","required":["role","tenant","user"],"type":"object","properties":{"role":{"title":"Role","type":"string","description":"the role that will be assigned (accepts either the role id or the role key)"},"tenant":{"title":"Tenant","type":"string","description":"the tenant the role is associated with (accepts either the tenant id or the tenant key)"},"user":{"title":"User","type":"string","description":"the user the role will be assigned to (accepts either the user id or the user key)"}},"additionalProperties":false,"example":{"user":"[email protected]","role":"admin","tenant":"stripe-inc"}},"RoleAssignmentRead":{"title":"RoleAssignmentRead","required":["id","user","role","tenant","user_id","role_id","tenant_id","organization_id","project_id","environment_id","created_at"],"type":"object","properties":{"id":{"title":"Id","type":"string","description":"Unique id of the role assignment","format":"uuid"},"user":{"title":"User","type":"string","description":"the user the role is assigned to"},"role":{"title":"Role","type":"string","description":"the role that is assigned"},"tenant":{"title":"Tenant","type":"string","description":"the tenant the role is associated with"},"user_id":{"title":"User Id","type":"string","description":"Unique id of the user","format":"uuid"},"role_id":{"title":"Role Id","type":"string","description":"Unique id of the role","format":"uuid"},"tenant_id":{"title":"Tenant Id","type":"string","description":"Unique id of the tenant","format":"uuid"},"organization_id":{"title":"Organization Id","type":"string","description":"Unique id of the organization that the role assignment belongs to.","format":"uuid"},"project_id":{"title":"Project Id","type":"string","description":"Unique id of the project that the role assignment belongs to.","format":"uuid"},"environment_id":{"title":"Environment Id","type":"string","description":"Unique id of the environment that the role assignment belongs to.","format":"uuid"},"created_at":{"title":"Created At","type":"string","description":"Date and time when the role assignment was created (ISO_8601 format).","format":"date-time"}},"additionalProperties":false,"example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","user":"[email protected]","role":"admin","tenant":"stripe-inc","user_id":"7c60d51f-b44e-4682-87d6-449835ea4d11","role_id":"405d8375-3514-403b-8c43-83ae74cfe022","tenant_id":"40ef0e48-a11f-4963-a229-e396c9f7e733","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z"}},"RoleAssignmentRemove":{"title":"RoleAssignmentRemove","required":["role","tenant","user"],"type":"object","properties":{"role":{"title":"Role","type":"string","description":"the role that will be unassigned (accepts either the role id or the role key)"},"tenant":{"title":"Tenant","type":"string","description":"the tenant the role is associated with (accepts either the tenant id or the tenant key)"},"user":{"title":"User","type":"string","description":"the user the role will be unassigned from (accepts either the user id or the user key)"}},"additionalProperties":false,"example":{"user":"[email protected]","role":"editor","tenant":"google-inc"}},"RoleBlock":{"title":"RoleBlock","type":"object","properties":{"description":{"title":"Description","type":"string","description":"optional description string explaining what this role represents, or what permissions are granted to it."},"permissions":{"title":"Permissions","type":"array","items":{"type":"string"},"description":"list of action keys that define what actions this resource role is permitted to do"},"extends":{"title":"Extends","type":"array","items":{"type":"string"},"description":"list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list."}},"additionalProperties":false},"RoleCreate":{"title":"RoleCreate","required":["key","name"],"type":"object","properties":{"key":{"title":"Key","type":"string","description":"A URL-friendly name of the role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the role."},"name":{"title":"Name","type":"string","description":"The name of the role"},"description":{"title":"Description","type":"string","description":"optional description string explaining what this role represents, or what permissions are granted to it."},"permissions":{"title":"Permissions","type":"array","items":{"type":"string"},"description":"list of action keys that define what actions this resource role is permitted to do"},"extends":{"title":"Extends","type":"array","items":{"type":"string"},"description":"list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list."}},"additionalProperties":false,"example":{"key":"editor","name":"Editor","description":"the editor role can read and write to documents","permissions":["document:write"],"extends":["viewer"]}},"RoleData":{"title":"RoleData","type":"object","properties":{"grants":{"title":"Grants","type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"RoleRead":{"title":"RoleRead","required":["name","key","id","organization_id","project_id","environment_id","created_at","updated_at"],"type":"object","properties":{"name":{"title":"Name","type":"string","description":"The name of the role"},"description":{"title":"Description","type":"string","description":"optional description string explaining what this role represents, or what permissions are granted to it."},"permissions":{"title":"Permissions","type":"array","items":{"type":"string"},"description":"list of action keys that define what actions this resource role is permitted to do"},"extends":{"title":"Extends","type":"array","items":{"type":"string"},"description":"list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list."},"key":{"title":"Key","type":"string","description":"A URL-friendly name of the role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the role."},"id":{"title":"Id","type":"string","description":"Unique id of the role","format":"uuid"},"organization_id":{"title":"Organization Id","type":"string","description":"Unique id of the organization that the role belongs to.","format":"uuid"},"project_id":{"title":"Project Id","type":"string","description":"Unique id of the project that the role belongs to.","format":"uuid"},"environment_id":{"title":"Environment Id","type":"string","description":"Unique id of the environment that the role belongs to.","format":"uuid"},"created_at":{"title":"Created At","type":"string","description":"Date and time when the role was created (ISO_8601 format).","format":"date-time"},"updated_at":{"title":"Updated At","type":"string","description":"Date and time when the role was last updated/modified (ISO_8601 format).","format":"date-time"}},"additionalProperties":false,"example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","key":"editor","name":"Editor","description":"the editor role can read and write to documents","permissions":["document:write"],"extends":["viewer"],"organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z"}},"RoleUpdate":{"title":"RoleUpdate","type":"object","properties":{"name":{"title":"Name","type":"string","description":"The name of the role"},"description":{"title":"Description","type":"string","description":"optional description string explaining what this role represents, or what permissions are granted to it."},"permissions":{"title":"Permissions","type":"array","items":{"type":"string"},"description":"list of action keys that define what actions this resource role is permitted to do"},"extends":{"title":"Extends","type":"array","items":{"type":"string"},"description":"list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list."}},"additionalProperties":false,"example":{"description":"the editor role can read and write to documents","permissions":["document:write"]}},"RolesBlock":{"title":"RolesBlock","type":"object","additionalProperties":false,"description":"Resource roles definition block, defines all the roles on the resource."},"TenantCreate":{"title":"TenantCreate","required":["key","name"],"type":"object","properties":{"key":{"title":"Key","type":"string","description":"A unique id by which Permit will identify the tenant. The tenant key must be url-friendly (slugified)."},"name":{"title":"Name","type":"string","description":"A descriptive name for the tenant"},"description":{"title":"Description","type":"string","description":"an optional longer description of the tenant"},"attributes":{"title":"Attributes","type":"object","description":"Arbitraty tenant attributes that will be used to enforce attribute-based access control policies.","default":{}}},"additionalProperties":false,"example":{"key":"stripeinc","name":"Stripe Inc","attributes":{"allowed_locations":["US","CA"]}}},"TenantRead":{"title":"TenantRead","required":["key","id","organization_id","project_id","environment_id","created_at","updated_at","last_action_at","name"],"type":"object","properties":{"key":{"title":"Key","type":"string","description":"A unique id by which Permit will identify the tenant. The tenant key must be url-friendly (slugified)."},"id":{"title":"Id","type":"string","description":"Unique id of the tenant","format":"uuid"},"organization_id":{"title":"Organization Id","type":"string","description":"Unique id of the organization that the tenant belongs to.","format":"uuid"},"project_id":{"title":"Project Id","type":"string","description":"Unique id of the project that the tenant belongs to.","format":"uuid"},"environment_id":{"title":"Environment Id","type":"string","description":"Unique id of the environment that the tenant belongs to.","format":"uuid"},"created_at":{"title":"Created At","type":"string","description":"Date and time when the tenant was created (ISO_8601 format).","format":"date-time"},"updated_at":{"title":"Updated At","type":"string","description":"Date and time when the tenant was last updated/modified (ISO_8601 format).","format":"date-time"},"last_action_at":{"title":"Last Action At","type":"string","description":"Date and time when the tenant was last active (ISO_8601 format). In other words, this is the last time a permission check was done on a resource belonging to this tenant.","format":"date-time"},"name":{"title":"Name","type":"string","description":"A descriptive name for the tenant"},"description":{"title":"Description","type":"string","description":"an optional longer description of the tenant"},"attributes":{"title":"Attributes","type":"object","description":"Arbitraty tenant attributes that will be used to enforce attribute-based access control policies.","default":{}}},"additionalProperties":false,"example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","last_action_at":"2019-08-24T14:15:22Z","key":"stripeinc","name":"Stripe Inc","attributes":{"allowed_locations":["US","CA"]}}},"TenantUpdate":{"title":"TenantUpdate","type":"object","properties":{"name":{"title":"Name","type":"string","description":"A descriptive name for the tenant"},"description":{"title":"Description","type":"string","description":"an optional longer description of the tenant"},"attributes":{"title":"Attributes","type":"object","description":"Arbitraty tenant attributes that will be used to enforce attribute-based access control policies.","default":{}}},"additionalProperties":false},"UserCreate":{"title":"UserCreate","required":["key"],"type":"object","properties":{"key":{"title":"Key","type":"string","description":"A unique id by which Permit will identify the user for permission checks. You will later pass this ID to the `permit.check()` API. You can use anything for this ID, the user email, a UUID or anything else as long as it's unique on your end. The user key must be url-friendly (slugified)."},"email":{"title":"Email","type":"string","description":"The email of the user. If synced, will be unique inside the environment.","format":"email"},"first_name":{"title":"First Name","type":"string","description":"First name of the user."},"last_name":{"title":"Last Name","type":"string","description":"Last name of the user."},"attributes":{"title":"Attributes","type":"object","description":"Arbitraty user attributes that will be used to enforce attribute-based access control policies.","default":{}}},"additionalProperties":false,"example":{"key":"user|892179821739812389327","email":"[email protected]","first_name":"Jane","last_name":"Doe","attributes":{"department":"marketing","age":30,"subscription":{"tier":"pro","expired":false}}}},"UserData":{"title":"UserData","type":"object","properties":{"roleAssignments":{"title":"Roleassignments","type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"attributes":{"title":"Attributes","type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]}}}},"UserRead":{"title":"UserRead","required":["key","id","organization_id","project_id","environment_id"],"type":"object","properties":{"key":{"title":"Key","type":"string","description":"A unique id by which Permit will identify the user for permission checks. You will later pass this ID to the `permit.check()` API. You can use anything for this ID, the user email, a UUID or anything else as long as it's unique on your end. The user key must be url-friendly (slugified)."},"id":{"title":"Id","type":"string","description":"Unique id of the user","format":"uuid"},"organization_id":{"title":"Organization Id","type":"string","description":"Unique id of the organization that the user belongs to.","format":"uuid"},"project_id":{"title":"Project Id","type":"string","description":"Unique id of the project that the user belongs to.","format":"uuid"},"environment_id":{"title":"Environment Id","type":"string","description":"Unique id of the environment that the user belongs to.","format":"uuid"},"roles":{"title":"Roles","type":"array","items":{"$ref":"#/components/schemas/UserRole"},"default":[]},"email":{"title":"Email","type":"string","description":"The email of the user. If synced, will be unique inside the environment.","format":"email"},"first_name":{"title":"First Name","type":"string","description":"First name of the user."},"last_name":{"title":"Last Name","type":"string","description":"Last name of the user."},"attributes":{"title":"Attributes","type":"object","description":"Arbitraty user attributes that will be used to enforce attribute-based access control policies.","default":{}}},"additionalProperties":false,"example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","key":"user|892179821739812389327","email":"[email protected]","first_name":"Jane","last_name":"Doe","attributes":{"department":"marketing","age":30,"subscription":{"tier":"pro","expired":false}},"roles":[{"role":"admin","tenant":"stripe-inc"},{"role":"viewer","tenant":"othercompany.com"}]}},"UserRole":{"title":"UserRole","required":["role","tenant"],"type":"object","properties":{"role":{"title":"Role","type":"string","description":"the role that is assigned"},"tenant":{"title":"Tenant","type":"string","description":"the tenant the role is associated with"}},"additionalProperties":false},"UserRoleCreate":{"title":"UserRoleCreate","required":["role","tenant"],"type":"object","properties":{"role":{"title":"Role","type":"string","description":"the role that will be assigned (accepts either the role id or the role key)"},"tenant":{"title":"Tenant","type":"string","description":"the tenant the role is associated with (accepts either the tenant id or the tenant key)"}},"additionalProperties":false,"example":{"role":"admin","tenant":"stripe-inc"}},"UserRoleRemove":{"title":"UserRoleRemove","required":["role","tenant"],"type":"object","properties":{"role":{"title":"Role","type":"string","description":"the role that will be unassigned (accepts either the role id or the role key)"},"tenant":{"title":"Tenant","type":"string","description":"the tenant the role is associated with (accepts either the tenant id or the tenant key)"}},"additionalProperties":false,"example":{"role":"editor","tenant":"google-inc"}},"UserUpdate":{"title":"UserUpdate","type":"object","properties":{"email":{"title":"Email","type":"string","description":"The email of the user. If synced, will be unique inside the environment.","format":"email"},"first_name":{"title":"First Name","type":"string","description":"First name of the user."},"last_name":{"title":"Last Name","type":"string","description":"Last name of the user."},"attributes":{"title":"Attributes","type":"object","description":"Arbitraty user attributes that will be used to enforce attribute-based access control policies.","default":{}}},"additionalProperties":false},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}},"ViewerContext":{"title":"ViewerContext","required":["viewer","grants"],"type":"object","properties":{"viewer":{"title":"Viewer","oneOf":[{"$ref":"#/components/schemas/MemberViewerContext"},{"$ref":"#/components/schemas/APIKeyViewerContext"}],"discriminator":{"propertyName":"type","mapping":{"member":"#/components/schemas/MemberViewerContext","api_key":"#/components/schemas/APIKeyViewerContext"}}},"grants":{"title":"Grants","type":"array","items":{"$ref":"#/components/schemas/ViewerGrant"}},"active_org_id":{"title":"Active Org Id","type":"string","description":"the active organization id","format":"uuid"}},"description":"A Viewer Context object represents the currently logged in actor.\n\n- It can be a human user of permit.io\n- It can be a machine (using an api key) that directly interacts with the api\n- It can be an (embedded) human user of one of our customers, using an embedded UI interface.\n\nA VC object should contain *all* the data required by the internal\nauthz layer to verify whether an api request is allowed to run.\n\nThis model allows us to avoid expensive SQL queries for internal AuthZ logic."},"ViewerGrant":{"title":"ViewerGrant","required":["role","type"],"type":"object","properties":{"role":{"$ref":"#/components/schemas/MemberAccessLevel"},"type":{"$ref":"#/components/schemas/MemberAccessObj"},"org_id":{"title":"Org Id","type":"string","format":"uuid"},"project_id":{"title":"Project Id","type":"string","format":"uuid"},"env_id":{"title":"Env Id","type":"string","format":"uuid"}}}},"securitySchemes":{"HTTPBearer":{"type":"http","description":"Authorization header, we support the bearer authentication scheme (see: RFC 6750)","scheme":"bearer","bearerFormat":"JWT"}}},"tags":[{"name":"Authentication","description":"\nThe Authentication API manages user sessions (login and logout).\n"},{"name":"Members","description":"\nThe Members API allows you to invite new members to your organization (your Permit.io account).\n\nEach organization member represents a single human user of Permit.io.\nA member may have access to multiple organizations, with potentially different access levels (roles).\n\nA member may login to the Permit.io dashboard via the login screen at [app.permit.io](https://app.permit.io).\n\n**Members are not application users.** Members always represents a user of Permit.io, not a user of your application.\nFor application users, see the [Users API](/redoc#tag/Users).\n"},{"name":"OPAL Data","description":"None"},{"name":"Policy Decision Points","description":"\nThe PDP Configs API allows the user to manipulate the configuration of all Policy Decision Points\n(or PDPs) that are connected to a Permit.io environment, including the remote management of OPAL clients.\n"},{"name":"Decision Logs","description":"\nDecision logs read api\n"},{"name":"Decision Logs Ingress","description":"\nDecision logs ingress api\n"},{"name":"Organizations","description":"\nThe Organizations API gives you access to control and manage your Permit organizations.\n\nAn organization represents a **single billable account** (i.e: a company using Permit).\nYou may invite your team members to your Permit account, and thus multiple team members\nmay control an organization simultaniously (each member has access according to his role).\n"},{"name":"Projects","description":"\nProjects let you manage permissions for different business objectives from a single Permit account.\n\nFor example, you can create one project called \"Billing App\" and another project called \"Web App\".\nEvery project is a separate silo, and has its own unique set of environments and policies.\n"},{"name":"Environments","description":"\nEnvironments are silos contained within projects that enables you to safely iterate on changes.\n\nEnvironments allow you to manage your policy throughout your entire development lifecycle,\nfrom dev to production. Typical environments within a project could be `production`, `staging`,\nor individual environments.\n\nEach project must contain at least one environment.\nYou may clone an environment from a base environment, similar to git branches.\nYou can later safely merge the changes, after you tested them.\n"},{"name":"Resources","description":"\nResources are *types* of objects or feature names that you wish to protect (or gate) with permissions.\n\nFor example, if you build a document-sharing app like google docs, you might want to define a \"document\" resource.\n\nA resource definition block typically contains **actions**.\nActions are the various ways you can interact with the object / feature. Each (resource, action) pair defines a unique permission level.\n\nA resource may also contain:\n- roles (if you wish to define resource-bound roles or if your permissions model is relational)\n- relations to other resources (if your permissions model is relational, i.e: you work with a ReBAC model)\n- attributes (attributes that are typically defined on the resource, typically used in ABAC models)\n"},{"name":"Resource Actions","description":"\nActions are the various ways you can interact with a resource or affect the resource.\nEach (resource, action) pair defines a unique permission level.\n"},{"name":"Resource Roles","description":"\nRoles allow you to associate permissions indirectly via a job function.\n\nResource roles allow you to grant roles that are scoped to a resource, thus\nexpressing ownership or arbitrary relationships between an actor (i.e: user) and\na specific object.\n\nThis API allows you to manipulate roles: assign or unassign permissions to a role,\ndefine hierarchy (inheritance) between two roles or define relationships between two roles.\n"},{"name":"Resource Attributes","description":"\nResource attributes allow you to specify an arbitrary schema attributes that are part\nof the definition of resource and must be included in any of its instances.\n\nAttributes are used to enforce attribute-based access control policies.\n\nFor example, if we are building the github's permissions system, we might want to know\non the `Repository` resource whether the repo is private or now. In such case we will\ndefine a boolean `private` attributes that we can now use in our policies.\n"},{"name":"Roles","description":"\nRoles allow you to associate permissions indirectly via a job function.\n\nThe Roles API allows you to manipulate roles: assign or unassign permissions to a role,\ndefine hierarchy between roles or define relationships between resource roles.\n\nRoles manipulated by this API are **tenant roles**, meaning when they are assigned, they are\nassigned on a tenant.\n"},{"name":"Condition Sets","description":"\nCondition sets are sets of objects that are dynamically defined based on conditions on the objects' attributes.\nConditions sets allows you the flexibility of ABAC with the simplicity of RBAC.\n\nThere are currently two types of condition sets at the moment:\n1) user set = the set of users that match all the specified conditions.\n2) resource set = the set of resources that match all the specified conditions.\n\nExamples:\n\n- `us_based_employees` = {U1, ..., Un} = {all **users** who are *located in the US* and are *assigned the employee role*}\n- `private_repos` = {R1, ..., Rn} = {all **resources** *of type repository* that *are private*}\n\nWe can then picture a **matrix** of assignment between *user sets* and *resource sets*.\n\nExample:\nIf we check the checkbox where `us_based_employees` and `private_repos->clone` action intersect, we are setting a rule:\n*all US based employees can clone private repos*.\n"},{"name":"Users","description":"\nUsers represent human end-users of your applications that you'd like to enforce permissions on.\n\nYou must create a user object in Permit.io prior to trying to enforce permissions for that user.\nA user is identified by its key, an you can only create one user with the same key inside a Permit environment.\nYou can place users within tenants via role assignments in order to enforce multi-tenancy in your app.\n\nYou may create users via the API (shown below), with one of the SDKs, or via the Permit cloud console.\n"},{"name":"Tenants","description":"\nA tenant is a group of users that share a common organizational identity.\n\nEach tenant is a silo that can enforce strict boundaries between your customers.\nYou can associate your protected objects with a specific tenant, and only users\nbelonging to that tenant may access these resources (pending on adequate permissions).\n\nUsually, each tenant will represent one of the end-customer companies in your product\n(i.e. the company that you sell to). Through the tenant feature we enable you to have\nmulti-tenancy straight out of the box.\n"},{"name":"Role Assignments","description":"\nRole Assignments are RBAC-constructs that state that a actor (i.e: user) is assigned a role within a tenant.\n\nWith role assignments you can assign or unassign roles to a user.\nRole assignment define the relationship between users and tenants.\n"},{"name":"Condition Set Rules","description":"\nRepresents a \"mini\" ABAC rule comprised of (UserSet, Action, ResourceSet).\n\nIf such tuple exists, it means all users matching the UserSet\ncan perform the Action on the resources matching ResourceSet.\n\nExample:\n(`us_based_employees`, `repository:clone`, `private_repos`) where:\n- `us_based_employees` is a user set\n- `repository:clone` is an action\n- `private_repos` is a resource set\n"},{"name":"Resource Instances","description":"\nResource instances are instances of resource types.\n\nAn instance represents **a single object** in your system on which you'd want to enforce authorization.\nYou can use this API to store tenancy data (tenant) and arbitraty data (attributes).\n"}]}