Search
K
Cipherscale API

Get User Role Assignments

Retrieves all roles currently assigned to a specific user, including both direct role assignments and roles inherited through group memberships. This information is crucial for understanding user permissions and access levels.

get
https://public-api.cipherscale.com/qa/tenants/users/{id}/roles

Query Parameters

groupsOnlyboolean
rolesOnlyboolean

Path Parameters

idstringrequired

Response

200 application/json

User role definition with specific permissions and capabilities

idstring(uuid)required

Unique identifier for the role

createdAtstring(date-time)required

Timestamp when the role was created

updatedAtstring(date-time)required

Timestamp when the role was last modified

namestringrequired

Human-readable name of the role

descriptionstring

Detailed description of the role’s purpose and permissions

deleteablebooleanrequired

Whether this role can be deleted (system roles are typically not deletable)

typestringrequired

Predefined role type that determines the base permissions

Allowed values:OWNERADMINDEFAULTBASICBILLINGAUDITORSUPPORT

get/tenants/users/{id}/roles
 
curl --request GET \
  --url https://public-api.cipherscale.com/qa/tenants/users//roles \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'apikey: '
200 application/json
{
  "id": "id",
  "createdAt": "createdAt",
  "updatedAt": "updatedAt",
  "name": "name",
  "description": "description",
  "deleteable": false,
  "type": "OWNER"
}

Modify User Role Assignments

Adds or removes roles from a user’s account. This operation allows administrators to dynamically adjust user permissions by modifying their role assignments. Changes take effect immediately and affect the user’s access to system resources.

patch
https://public-api.cipherscale.com/qa/tenants/users/{id}/roles

Path Parameters

idstringrequired

Body

application/json

UpdateUserRoles

Data for adding or removing roles from a user

addedRolesarray[string]required

Array of role IDs to add to the user

Example:["550e8400-e29b-41d4-a716-446655440000"]

removedRolesarray[string]required

Array of role IDs to remove from the user

Example:["550e8400-e29b-41d4-a716-446655440001"]

Response

200
patch/tenants/users/{id}/roles

Body

{
  "addedRoles": [
    "550e8400-e29b-41d4-a716-446655440000"
  ],
  "removedRoles": [
    "550e8400-e29b-41d4-a716-446655440001"
  ]
}
{ "addedRoles": [ "550e8400-e29b-41d4-a716-446655440000" ], "removedRoles": [ "550e8400-e29b-41d4-a716-446655440001" ] }
 
curl --request PATCH \
  --url https://public-api.cipherscale.com/qa/tenants/users//roles \
  --header 'Content-Type: application/json' \
  --header 'apikey: ' \
  --data '{
  "addedRoles": [
    "550e8400-e29b-41d4-a716-446655440000"
  ],
  "removedRoles": [
    "550e8400-e29b-41d4-a716-446655440001"
  ]
}'
200

Add User to Group

Associates a user with a specific group, which may grant them additional roles and permissions based on the group’s configuration. Group membership can affect access policies and resource availability.

post
https://public-api.cipherscale.com/qa/tenants/users/{id}/groups

Path Parameters

idstringrequired

Response

201
post/tenants/users/{id}/groups
 
curl --request POST \
  --url https://public-api.cipherscale.com/qa/tenants/users//groups \
  --header 'Content-Type: application/json' \
  --header 'apikey: '
201

Remove User from Group

Disassociates a user from a specific group, which may revoke roles and permissions that were granted through group membership. This operation helps maintain proper access control and organizational structure.

delete
https://public-api.cipherscale.com/qa/tenants/users/{id}/groups/{groupId}

Path Parameters

idstringrequired
groupIdstringrequired

Response

204
delete/tenants/users/{id}/groups/{groupId}
 
curl --request DELETE \
  --url https://public-api.cipherscale.com/qa/tenants/users//groups/ \
  --header 'Content-Type: application/json' \
  --header 'apikey: '
204

List All Users

Retrieves a paginated list of all users within the tenant, with support for sorting, filtering, and search functionality. This endpoint is essential for user management dashboards and administrative operations.

get
https://public-api.cipherscale.com/qa/tenants/users

Query Parameters

sortarray[string]
limitnumber

Number of items to return per page. Use together with “offset” for pagination. If omitted, a sensible default is applied (e.g., 10). Upper bound may be enforced by the server (e.g., 100).

offsetnumber

Number of items to skip before starting to collect results. Use together with “limit”. For page-based navigation, compute as (page × limit). Example: page=2 with limit=25 -> offset=50.

Response

application/json

Successfully retrieved users

PaginatedResponse

Paginated response containing data and pagination metadata

dataarray

Array of items for the current page

totalinteger

Total number of items across all pages for the given filters. Use this with “limit” to compute total pages: totalPages = ceil(total / limit).

pageinteger

Current page index (0-based). For offset-based pagination, page = floor(offset / limit). For page[] style, this equals the N used in page[offset] = N × page[limit].

limitinteger

Number of items per page returned in this response. Mirrors the query “limit” or “page[limit]” parameter used for the request.

hasNextboolean

Whether there are more pages available

hasPreviousboolean

Whether there are previous pages available

get/tenants/users
 
curl --request GET \
  --url https://public-api.cipherscale.com/qa/tenants/users \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'apikey: '
application/json
{
  "data": [
    "[]"
  ],
  "total": 0,
  "page": 0,
  "limit": 0,
  "hasNext": false,
  "hasPrevious": false
}