Create a custom role

Defines a role owned by the caller's own tenant, granting the named
permissions. Requires role:create, and the path tenant must equal
the caller's tenant_id claim. A caller may not grant a permission
they do not hold themselves; the names to pick from are the catalog
at GET /api/permissions.

The trimmed name must be free: a platform role name or one already
used by this tenant is 409, compared case-insensitively. Returns
200, not 201.

Path Params
uuid
required

The tenant. Must equal the caller's tenant_id claim; a mismatch is
403 Invalid tenant id.

Body Params
string
required
length between 1 and 50

Trimmed. Unique per tenant and not one of the platform role names,
both compared case-insensitively; either clash is 409.

string | null

Trimmed; a blank value is stored as null.

permissions
array of strings
required

The permission names to grant, from the catalog at
GET /api/permissions. Required, though it may be empty. Blank
entries are dropped and the rest trimmed; a name not in the catalog
is 400.

permissions*
Headers
string
required
^\d+\.\d+\.\d+$

The version of the Quant Flow API the request follows, as major.minor.patch (for example 1.0.0). The request is interpreted, and the response shaped, according to that version.

Responses

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json