Skip to main content
GET
/
tenant
/
{tenantId}
/
admin
/
roles
GetTenantRoles
curl --request GET \
  --url https://api.example.com/tenant/{tenantId}/admin/roles
{
  "isSuccess": true,
  "isFailure": false,
  "error": null,
  "value": {
    "id": 42,
    "name": "Example"
  }
}

Description

This endpoint retrieves the complete catalogue of roles available for assignment within a tenant, including role identifiers, names, descriptions, and associated permissions.

Input

  • tenantId (path, required): Identifier of the tenant requesting role information
  • request (query, optional): Pagination or filtering parameters for scoping the role list
  • cancellationToken (optional): Token to cancel the asynchronous operation

Output

Returns a Result<TenantRoleViewModel[]> containing an array of role definitions with their permissions.

Examples

Request:
GET /api/tenant/1024/roles
Response (200 OK):
{
  "data": [
    {
      "id": 1,
      "name": "TenantAdministrator",
      "description": "Grants full tenant administration capabilities.",
      "permissions": [
        { "id": 101, "name": "ManageUsers" },
        { "id": 102, "name": "ManageWallets" },
        { "id": 103, "name": "ManageRoles" }
      ]
    },
    {
      "id": 2,
      "name": "WalletOperator",
      "description": "Allows wallet and transaction management.",
      "permissions": [
        { "id": 102, "name": "ManageWallets" },
        { "id": 104, "name": "CreateTransactions" }
      ]
    }
  ],
  "isSuccess": true
}

Errors

  • 400 Bad Request: Invalid tenant identifier or request parameters
  • 401 Unauthorized: Authentication credentials are missing or invalid
  • 403 Forbidden: User lacks permission to view tenant roles
  • 404 Not Found: Tenant does not exist or no roles are defined
  • 500 Internal Server Error: Unexpected server error occurred during retrieval

Notes

  • Returns all roles configured for the tenant, regardless of current assignments
  • Permissions collection describes capabilities granted by each role
  • Role list may be filtered or paginated using query parameters

Path Parameters

tenantId
integer<int64>
required

Identifier of the tenant whose roles are requested.

Query Parameters

TenantId
integer<int64>

Identifier of the tenant whose resources should be queried.

Example:

1024

Response

Roles retrieved successfully.

Wrapper for API operation results containing success status, error information, and return value.

isSuccess
boolean

True if the operation completed successfully, false otherwise.

Example:

true

isFailure
boolean

True if the operation failed, false otherwise.

Example:

false

error
object

Error information returned when the operation fails.

Example:
{
"code": "ValidationError",
"message": "The request parameters failed validation.",
"info": [
"The Name field is required.",
"The Id field must be greater than 0."
]
}
value
object[] | null

The result value returned when the operation is successful.