All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
elementsAssignRoleToUser | POST /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users/{user_id}/roles | Assign role to user |
elementsCreateUser | POST /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users | Create user |
elementsDeleteUser | DELETE /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users/{user_id} | Delete user |
elementsListRoles | GET /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/roles | List roles |
elementsListUsers | GET /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users | List users |
elementsUnassignRoleFromUser | DELETE /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users/{user_id}/roles | Unassign role from user |
setConfigActive | POST /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/active | Set Config Active |
RoleAssignmentRead elementsAssignRoleToUser(projId, envId, elementsConfigId, userId, elementsUserRoleCreate)
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.
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = UsersElementsDataApi()
val projId : kotlin.String = projId_example // kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
val envId : kotlin.String = envId_example // kotlin.String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
val elementsConfigId : kotlin.String = elementsConfigId_example // kotlin.String | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").
val userId : kotlin.String = userId_example // kotlin.String | Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").
val elementsUserRoleCreate : ElementsUserRoleCreate = // ElementsUserRoleCreate |
try {
val result : RoleAssignmentRead = apiInstance.elementsAssignRoleToUser(projId, envId, elementsConfigId, userId, elementsUserRoleCreate)
println(result)
} catch (e: ClientException) {
println("4xx response calling UsersElementsDataApi#elementsAssignRoleToUser")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling UsersElementsDataApi#elementsAssignRoleToUser")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
projId | kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | |
envId | kotlin.String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | |
elementsConfigId | kotlin.String | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug"). | |
userId | kotlin.String | Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug"). | |
elementsUserRoleCreate | ElementsUserRoleCreate |
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: application/json
- Accept: application/json
UserRead elementsCreateUser(projId, envId, elementsConfigId, elementsUserCreate)
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.
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = UsersElementsDataApi()
val projId : kotlin.String = projId_example // kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
val envId : kotlin.String = envId_example // kotlin.String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
val elementsConfigId : kotlin.String = elementsConfigId_example // kotlin.String | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").
val elementsUserCreate : ElementsUserCreate = // ElementsUserCreate |
try {
val result : UserRead = apiInstance.elementsCreateUser(projId, envId, elementsConfigId, elementsUserCreate)
println(result)
} catch (e: ClientException) {
println("4xx response calling UsersElementsDataApi#elementsCreateUser")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling UsersElementsDataApi#elementsCreateUser")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
projId | kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | |
envId | kotlin.String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | |
elementsConfigId | kotlin.String | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug"). | |
elementsUserCreate | ElementsUserCreate |
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: application/json
- Accept: application/json
elementsDeleteUser(projId, envId, elementsConfigId, userId)
Delete user
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = UsersElementsDataApi()
val projId : kotlin.String = projId_example // kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
val envId : kotlin.String = envId_example // kotlin.String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
val elementsConfigId : kotlin.String = elementsConfigId_example // kotlin.String | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").
val userId : kotlin.String = userId_example // kotlin.String | Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").
try {
apiInstance.elementsDeleteUser(projId, envId, elementsConfigId, userId)
} catch (e: ClientException) {
println("4xx response calling UsersElementsDataApi#elementsDeleteUser")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling UsersElementsDataApi#elementsDeleteUser")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
projId | kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | |
envId | kotlin.String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | |
elementsConfigId | kotlin.String | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug"). | |
userId | kotlin.String | Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug"). |
null (empty response body)
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
kotlin.collections.List<ElementsRoleRead> elementsListRoles(projId, envId, elementsConfigId, search, page, perPage)
List roles
Lists all the users defined within an environment.
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = UsersElementsDataApi()
val projId : kotlin.String = projId_example // kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
val envId : kotlin.String = envId_example // kotlin.String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
val elementsConfigId : kotlin.String = elementsConfigId_example // kotlin.String | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").
val search : kotlin.String = search_example // kotlin.String | Text search for the email field
val page : kotlin.Int = 56 // kotlin.Int | Page number of the results to fetch, starting at 1.
val perPage : kotlin.Int = 56 // kotlin.Int | The number of results per page (max 100).
try {
val result : kotlin.collections.List<ElementsRoleRead> = apiInstance.elementsListRoles(projId, envId, elementsConfigId, search, page, perPage)
println(result)
} catch (e: ClientException) {
println("4xx response calling UsersElementsDataApi#elementsListRoles")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling UsersElementsDataApi#elementsListRoles")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
projId | kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | |
envId | kotlin.String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | |
elementsConfigId | kotlin.String | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug"). | |
search | kotlin.String | Text search for the email field | [optional] |
page | kotlin.Int | Page number of the results to fetch, starting at 1. | [optional] [default to 1] |
perPage | kotlin.Int | The number of results per page (max 100). | [optional] [default to 30] |
kotlin.collections.List<ElementsRoleRead>
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
PaginatedResultUserRead elementsListUsers(projId, envId, elementsConfigId, search, page, perPage)
List users
Lists all the users defined within an environment.
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = UsersElementsDataApi()
val projId : kotlin.String = projId_example // kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
val envId : kotlin.String = envId_example // kotlin.String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
val elementsConfigId : kotlin.String = elementsConfigId_example // kotlin.String | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").
val search : kotlin.String = search_example // kotlin.String | Text search for the email field
val page : kotlin.Int = 56 // kotlin.Int | Page number of the results to fetch, starting at 1.
val perPage : kotlin.Int = 56 // kotlin.Int | The number of results per page (max 100).
try {
val result : PaginatedResultUserRead = apiInstance.elementsListUsers(projId, envId, elementsConfigId, search, page, perPage)
println(result)
} catch (e: ClientException) {
println("4xx response calling UsersElementsDataApi#elementsListUsers")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling UsersElementsDataApi#elementsListUsers")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
projId | kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | |
envId | kotlin.String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | |
elementsConfigId | kotlin.String | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug"). | |
search | kotlin.String | Text search for the email field | [optional] |
page | kotlin.Int | Page number of the results to fetch, starting at 1. | [optional] [default to 1] |
perPage | kotlin.Int | The number of results per page (max 100). | [optional] [default to 30] |
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
elementsUnassignRoleFromUser(projId, envId, elementsConfigId, userId, elementsUserRoleRemove)
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.
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = UsersElementsDataApi()
val projId : kotlin.String = projId_example // kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
val envId : kotlin.String = envId_example // kotlin.String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
val elementsConfigId : kotlin.String = elementsConfigId_example // kotlin.String | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").
val userId : kotlin.String = userId_example // kotlin.String | Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").
val elementsUserRoleRemove : ElementsUserRoleRemove = // ElementsUserRoleRemove |
try {
apiInstance.elementsUnassignRoleFromUser(projId, envId, elementsConfigId, userId, elementsUserRoleRemove)
} catch (e: ClientException) {
println("4xx response calling UsersElementsDataApi#elementsUnassignRoleFromUser")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling UsersElementsDataApi#elementsUnassignRoleFromUser")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
projId | kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | |
envId | kotlin.String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | |
elementsConfigId | kotlin.String | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug"). | |
userId | kotlin.String | Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug"). | |
elementsUserRoleRemove | ElementsUserRoleRemove |
null (empty response body)
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: application/json
- Accept: application/json
setConfigActive(elementsConfigId, projId, envId)
Set Config Active
Updates the embed_config.
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = UsersElementsDataApi()
val elementsConfigId : kotlin.String = elementsConfigId_example // kotlin.String | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").
val projId : kotlin.String = projId_example // kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
val envId : kotlin.String = envId_example // kotlin.String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
try {
apiInstance.setConfigActive(elementsConfigId, projId, envId)
} catch (e: ClientException) {
println("4xx response calling UsersElementsDataApi#setConfigActive")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling UsersElementsDataApi#setConfigActive")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
elementsConfigId | kotlin.String | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug"). | |
projId | kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | |
envId | kotlin.String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). |
null (empty response body)
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json