All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
addParentResourceRole | PUT /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/parents/{parent_role_id} | Add Parent Role |
assignPermissionsToResourceRole | POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/permissions | Assign Permissions to Role |
createResourceRole | POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles | Create Resource Role |
deleteResourceRole | DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id} | Delete Resource Role |
getResourceRole | GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id} | Get Resource Role |
listResourceRoles | GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles | List Resource Roles |
removeParentResourceRole | DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/parents/{parent_role_id} | Remove Parent Role |
removePermissionsFromResourceRole | DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/permissions | Remove Permissions from Role |
updateResourceRole | PATCH /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id} | Update Resource Role |
ResourceRoleRead addParentResourceRole(projId, envId, resourceId, roleId, parentRoleId)
Add Parent Role
This endpoint is part of the role hierarchy feature. Makes role with id `role_id` extend the role with id `parent_role_id`. In other words, `role_id` will automatically be assigned any permissions that are granted to `parent_role_id`. We can say the `role_id` extends `parent_role_id` or inherits from `parent_role_id`. If `role_id` is already an ancestor of `parent_role_id`, the request will fail with HTTP 400 to prevent a cycle in the role hierarchy. Both roles must be defined on the same resource, identified by id `resource_id`.
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = ResourceRolesApi()
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 resourceId : kotlin.String = resourceId_example // kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").
val roleId : kotlin.String = roleId_example // kotlin.String | Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").
val parentRoleId : kotlin.String = parentRoleId_example // kotlin.String | Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\").
try {
val result : ResourceRoleRead = apiInstance.addParentResourceRole(projId, envId, resourceId, roleId, parentRoleId)
println(result)
} catch (e: ClientException) {
println("4xx response calling ResourceRolesApi#addParentResourceRole")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ResourceRolesApi#addParentResourceRole")
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"). | |
resourceId | kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug"). | |
roleId | kotlin.String | Either the unique id of the role, or the URL-friendly key of the role (i.e: the "slug"). | |
parentRoleId | kotlin.String | Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the "slug"). |
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
ResourceRoleRead assignPermissionsToResourceRole(projId, envId, resourceId, roleId, addRolePermissions)
Assign Permissions to Role
Assign permissions to role. If some of the permissions specified are already unassigned, will skip them.
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = ResourceRolesApi()
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 resourceId : kotlin.String = resourceId_example // kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").
val roleId : kotlin.String = roleId_example // kotlin.String | Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").
val addRolePermissions : AddRolePermissions = // AddRolePermissions |
try {
val result : ResourceRoleRead = apiInstance.assignPermissionsToResourceRole(projId, envId, resourceId, roleId, addRolePermissions)
println(result)
} catch (e: ClientException) {
println("4xx response calling ResourceRolesApi#assignPermissionsToResourceRole")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ResourceRolesApi#assignPermissionsToResourceRole")
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"). | |
resourceId | kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug"). | |
roleId | kotlin.String | Either the unique id of the role, or the URL-friendly key of the role (i.e: the "slug"). | |
addRolePermissions | AddRolePermissions |
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: application/json
- Accept: application/json
ResourceRoleRead createResourceRole(projId, envId, resourceId, resourceRoleCreate)
Create Resource Role
Creates a new role associated with the resource.
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = ResourceRolesApi()
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 resourceId : kotlin.String = resourceId_example // kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").
val resourceRoleCreate : ResourceRoleCreate = // ResourceRoleCreate |
try {
val result : ResourceRoleRead = apiInstance.createResourceRole(projId, envId, resourceId, resourceRoleCreate)
println(result)
} catch (e: ClientException) {
println("4xx response calling ResourceRolesApi#createResourceRole")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ResourceRolesApi#createResourceRole")
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"). | |
resourceId | kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug"). | |
resourceRoleCreate | ResourceRoleCreate |
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: application/json
- Accept: application/json
deleteResourceRole(projId, envId, resourceId, roleId)
Delete Resource Role
Deletes the role and all its related data. This includes any permissions granted to said role.
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = ResourceRolesApi()
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 resourceId : kotlin.String = resourceId_example // kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").
val roleId : kotlin.String = roleId_example // kotlin.String | Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").
try {
apiInstance.deleteResourceRole(projId, envId, resourceId, roleId)
} catch (e: ClientException) {
println("4xx response calling ResourceRolesApi#deleteResourceRole")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ResourceRolesApi#deleteResourceRole")
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"). | |
resourceId | kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug"). | |
roleId | kotlin.String | Either the unique id of the role, or the URL-friendly key of the role (i.e: the "slug"). |
null (empty response body)
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
ResourceRoleRead getResourceRole(projId, envId, resourceId, roleId)
Get Resource Role
Gets a single role defined on the resource, if such role exists.
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = ResourceRolesApi()
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 resourceId : kotlin.String = resourceId_example // kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").
val roleId : kotlin.String = roleId_example // kotlin.String | Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").
try {
val result : ResourceRoleRead = apiInstance.getResourceRole(projId, envId, resourceId, roleId)
println(result)
} catch (e: ClientException) {
println("4xx response calling ResourceRolesApi#getResourceRole")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ResourceRolesApi#getResourceRole")
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"). | |
resourceId | kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug"). | |
roleId | kotlin.String | Either the unique id of the role, or the URL-friendly key of the role (i.e: the "slug"). |
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
kotlin.collections.List<ResourceRoleRead> listResourceRoles(projId, envId, resourceId, page, perPage)
List Resource Roles
Lists all the roles defined on the resource.
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = ResourceRolesApi()
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 resourceId : kotlin.String = resourceId_example // kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").
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<ResourceRoleRead> = apiInstance.listResourceRoles(projId, envId, resourceId, page, perPage)
println(result)
} catch (e: ClientException) {
println("4xx response calling ResourceRolesApi#listResourceRoles")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ResourceRolesApi#listResourceRoles")
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"). | |
resourceId | kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug"). | |
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<ResourceRoleRead>
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
ResourceRoleRead removeParentResourceRole(projId, envId, resourceId, roleId, parentRoleId)
Remove Parent Role
This endpoint is part of the role hierarchy feature. Removes `parent_role_id` from the list of parent roles of role with id `role_id`. In other words, `role_id` will no longer be automatically assigned permissions that are granted to `parent_role_id`. We can say the `role_id` not longer extends `parent_role_id` or no longer inherits from `parent_role_id`. Both roles must be defined on the same resource, identified by id `resource_id`.
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = ResourceRolesApi()
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 resourceId : kotlin.String = resourceId_example // kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").
val roleId : kotlin.String = roleId_example // kotlin.String | Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").
val parentRoleId : kotlin.String = parentRoleId_example // kotlin.String | Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\").
try {
val result : ResourceRoleRead = apiInstance.removeParentResourceRole(projId, envId, resourceId, roleId, parentRoleId)
println(result)
} catch (e: ClientException) {
println("4xx response calling ResourceRolesApi#removeParentResourceRole")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ResourceRolesApi#removeParentResourceRole")
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"). | |
resourceId | kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug"). | |
roleId | kotlin.String | Either the unique id of the role, or the URL-friendly key of the role (i.e: the "slug"). | |
parentRoleId | kotlin.String | Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the "slug"). |
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
ResourceRoleRead removePermissionsFromResourceRole(projId, envId, resourceId, roleId, removeRolePermissions)
Remove Permissions from Role
Remove permissions from role. If some of the permissions specified are already unassigned, will skip them.
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = ResourceRolesApi()
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 resourceId : kotlin.String = resourceId_example // kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").
val roleId : kotlin.String = roleId_example // kotlin.String | Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").
val removeRolePermissions : RemoveRolePermissions = // RemoveRolePermissions |
try {
val result : ResourceRoleRead = apiInstance.removePermissionsFromResourceRole(projId, envId, resourceId, roleId, removeRolePermissions)
println(result)
} catch (e: ClientException) {
println("4xx response calling ResourceRolesApi#removePermissionsFromResourceRole")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ResourceRolesApi#removePermissionsFromResourceRole")
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"). | |
resourceId | kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug"). | |
roleId | kotlin.String | Either the unique id of the role, or the URL-friendly key of the role (i.e: the "slug"). | |
removeRolePermissions | RemoveRolePermissions |
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: application/json
- Accept: application/json
ResourceRoleRead updateResourceRole(projId, envId, resourceId, roleId, resourceRoleUpdate)
Update Resource Role
Partially updates the role defined on a resource. Fields that will be provided will be completely overwritten.
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = ResourceRolesApi()
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 resourceId : kotlin.String = resourceId_example // kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").
val roleId : kotlin.String = roleId_example // kotlin.String | Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").
val resourceRoleUpdate : ResourceRoleUpdate = // ResourceRoleUpdate |
try {
val result : ResourceRoleRead = apiInstance.updateResourceRole(projId, envId, resourceId, roleId, resourceRoleUpdate)
println(result)
} catch (e: ClientException) {
println("4xx response calling ResourceRolesApi#updateResourceRole")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ResourceRolesApi#updateResourceRole")
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"). | |
resourceId | kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug"). | |
roleId | kotlin.String | Either the unique id of the role, or the URL-friendly key of the role (i.e: the "slug"). | |
resourceRoleUpdate | ResourceRoleUpdate |
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: application/json
- Accept: application/json