All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
assign_role_to_user | POST /v2/facts/{proj_id}/{env_id}/users/{user_id}/roles | Assign Role To User |
create_user | POST /v2/facts/{proj_id}/{env_id}/users | Create User |
delete_user | DELETE /v2/facts/{proj_id}/{env_id}/users/{user_id} | Delete User |
get_user | GET /v2/facts/{proj_id}/{env_id}/users/{user_id} | Get User |
list_users | GET /v2/facts/{proj_id}/{env_id}/users | List Users |
replace_user | PUT /v2/facts/{proj_id}/{env_id}/users/{user_id} | Replace User |
unassign_role_from_user | DELETE /v2/facts/{proj_id}/{env_id}/users/{user_id}/roles | Unassign Role From User |
update_user | PATCH /v2/facts/{proj_id}/{env_id}/users/{user_id} | Update User |
models::RoleAssignmentRead assign_role_to_user(proj_id, env_id, user_id, user_role_create) Assign Role To User
Assigns a role to the user within the tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant.
Name | Type | Description | Required | Notes |
---|---|---|---|---|
proj_id | String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | [required] | |
env_id | String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | [required] | |
user_id | String | Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug"). | [required] | |
user_role_create | UserRoleCreate | [required] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
models::UserRead create_user(proj_id, env_id, user_create) Create User
Creates a new user inside the Permit.io system, from that point forward you may run permission checks on that user. If the user is already created: will return 200 instead of 201, and will return the existing user object in the response body.
Name | Type | Description | Required | Notes |
---|---|---|---|---|
proj_id | String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | [required] | |
env_id | String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | [required] | |
user_create | UserCreate | [required] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_user(proj_id, env_id, user_id) Delete User
Deletes the user and all its related data.
Name | Type | Description | Required | Notes |
---|---|---|---|---|
proj_id | String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | [required] | |
env_id | String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | [required] | |
user_id | String | Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug"). | [required] |
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
models::UserRead get_user(proj_id, env_id, user_id) Get User
Gets a user, if such user exists. Otherwise returns 404.
Name | Type | Description | Required | Notes |
---|---|---|---|---|
proj_id | String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | [required] | |
env_id | String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | [required] | |
user_id | String | Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug"). | [required] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
models::PaginatedResultUserRead list_users(proj_id, env_id, search, role, include_resource_instance_roles, page, per_page) List Users
Lists all the users defined within an environment.
Name | Type | Description | Required | Notes |
---|---|---|---|---|
proj_id | String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | [required] | |
env_id | String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | [required] | |
search | Option<String> | Text search for the email field | ||
role | Option<String> | Match users with a specific role | ||
include_resource_instance_roles | Option<bool> | Should add resource instance roles | [default to false] | |
page | Option<i32> | Page number of the results to fetch, starting at 1. | [default to 1] | |
per_page | Option<i32> | The number of results per page (max 100). | [default to 30] |
models::PaginatedResultUserRead
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
models::UserRead replace_user(proj_id, env_id, user_id, user_create) Replace User
Name | Type | Description | Required | Notes |
---|---|---|---|---|
proj_id | String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | [required] | |
env_id | String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | [required] | |
user_id | String | Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug"). | [required] | |
user_create | UserCreate | [required] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
unassign_role_from_user(proj_id, env_id, user_id, user_role_remove) Unassign Role From User
Unassigns the role from the user within the tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. If the role is not actually assigned, will return 404.
Name | Type | Description | Required | Notes |
---|---|---|---|---|
proj_id | String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | [required] | |
env_id | String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | [required] | |
user_id | String | Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug"). | [required] | |
user_role_remove | UserRoleRemove | [required] |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
models::UserRead update_user(proj_id, env_id, user_id, user_update) Update User
Partially updates the user definition. Fields that will be provided will be completely overwritten.
Name | Type | Description | Required | Notes |
---|---|---|---|---|
proj_id | String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | [required] | |
env_id | String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | [required] | |
user_id | String | Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug"). | [required] | |
user_update | UserUpdate | [required] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]