Mod Roles Keycloak API (v1)

Mod Roles Keycloak API

roles

getRole

Get role by ID

path Parameters
id
required
string <uuid>
Example: 1e985e76-e9ca-401c-ad8e-0d121a11111e

Role identifier

Responses

Response samples

Content type
application/json
{ }

updateRole

Update a role

path Parameters
id
required
string <uuid>
Example: 1e985e76-e9ca-401c-ad8e-0d121a11111e

Role identifier

Request Body schema: application/json
required
id
string <uuid>

Role identifier

name
required
string

A human-readable name/label for this role

description
string

Free form description of the role

type
string (roleType)
Enum: "DEFAULT" "REGULAR" "CONSORTIUM"

Role type

object (Metadata Schema)

Metadata about creation and changes to records, provided by the server (client should not provide)

createdDate
string <date-time>

Date and time when the record was created

createdByUserId
string <uuid>

ID of the user who created the record (when available)

updatedDate
string <date-time>

Date and time when the record was last updated

updatedByUserId
string <uuid>

ID of the user who last updated the record (when available)

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

deleteRole

Delete a role

path Parameters
id
required
string <uuid>
Example: 1e985e76-e9ca-401c-ad8e-0d121a11111e

Role identifier

Responses

findRoles

Get roles by query

query Parameters
query
string
Example: query=role

A query string to filter users based on matching criteria in fields.

limit
integer >= 0
Default: 10
Example: limit=20

Limit the number of elements returned in the response.

offset
integer >= 0
Default: 0
Example: offset=2

Skip over a number of elements by specifying an offset value for the query.

Responses

Response samples

Content type
application/json
{ }

createRole

Create a role

Request Body schema: application/json
required
id
string <uuid>

Role identifier

name
required
string

A human-readable name/label for this role

description
string

Free form description of the role

type
string (roleType)
Enum: "DEFAULT" "REGULAR" "CONSORTIUM"

Role type

object (Metadata Schema)

Metadata about creation and changes to records, provided by the server (client should not provide)

createdDate
string <date-time>

Date and time when the record was created

createdByUserId
string <uuid>

ID of the user who created the record (when available)

updatedDate
string <date-time>

Date and time when the record was last updated

updatedByUserId
string <uuid>

ID of the user who last updated the record (when available)

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

createRoles

Create one or more roles

Request Body schema: application/json
required
required
Array of objects (Role schema) [ 1 .. 255 ] items

Collection of roles

Array ([ 1 .. 255 ] items)
id
string <uuid>

Role identifier

name
required
string

A human-readable name/label for this role

description
string

Free form description of the role

type
string (roleType)
Enum: "DEFAULT" "REGULAR" "CONSORTIUM"

Role type

object (Metadata Schema)

Metadata about creation and changes to records, provided by the server (client should not provide)

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

roles-users

assignRolesToUser

Create a record associating role with user

Request Body schema: application/json
required
userId
string <uuid>

User identifier (UUID)

roleIds
Array of strings <uuid> [ items <uuid > ]

Role identifiers

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

findUserRoles

Search user-role relations by CQL query

query Parameters
query
string
Example: query=role

A query string to filter users based on matching criteria in fields.

limit
integer >= 0
Default: 10
Example: limit=20

Limit the number of elements returned in the response.

offset
integer >= 0
Default: 0
Example: offset=2

Skip over a number of elements by specifying an offset value for the query.

Responses

Response samples

Content type
application/json
{ }

getUserRoles

Get roles user by user ID

path Parameters
id
required
string <uuid>
Example: 1e111e76-1111-401c-ad8e-0d121a11111e

User identifier

Responses

Response samples

Content type
application/json
{ }

updateUserRoles

Update a roles user by user ID

path Parameters
id
required
string <uuid>
Example: 1e111e76-1111-401c-ad8e-0d121a11111e

User identifier

Request Body schema: application/json
required
userId
string <uuid>

User identifier (UUID)

roleIds
Array of strings <uuid> [ items <uuid > ]

Role identifiers

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

deleteUserRoles

Delete a roles user by user ID

path Parameters
id
required
string <uuid>
Example: 1e111e76-1111-401c-ad8e-0d121a11111e

User identifier

Responses

role-capability

createRoleCapabilities

Create a record associating one or more capabilities with the role

Request Body schema: application/json
required
roleId
required
string <uuid>

ID of the role

capabilityIds
Array of strings <uuid> [ items <uuid > ]

List of capability identifiers

capabilityNames
Array of strings

List of capability names

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

getRoleCapabilities

Get role-capability relation items by CQL query and pagination parameters

query Parameters
query
string
Example: query=role

A query string to filter users based on matching criteria in fields.

limit
integer >= 0
Default: 10
Example: limit=20

Limit the number of elements returned in the response.

offset
integer >= 0
Default: 0
Example: offset=2

Skip over a number of elements by specifying an offset value for the query.

Responses

Response samples

Content type
application/json
{ }

findCapabilitiesByRoleId

Get capabilities assigned to role by role identifier

path Parameters
id
required
string <uuid>
Example: 1e985e76-e9ca-401c-ad8e-0d121a11111e

Role identifier

query Parameters
expand
boolean
Default: false

Defines if capability sets must be expanded

includeDummy
boolean
Default: false

Include dummy capabilities.

limit
integer >= 0
Default: 10
Example: limit=20

Limit the number of elements returned in the response.

offset
integer >= 0
Default: 0
Example: offset=2

Skip over a number of elements by specifying an offset value for the query.

Responses

Response samples

Content type
application/json
{ }

updateRoleCapabilities

Modifies the set of capabilities assigned to the specified role.

path Parameters
id
required
string <uuid>
Example: 1e985e76-e9ca-401c-ad8e-0d121a11111e

Role identifier

Request Body schema: application/json
required
capabilityIds
Array of strings <uuid> [ items <uuid > ]

List of capability identifiers

capabilityNames
Array of strings

List of capability names

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

deleteRoleCapabilities

Removes all capabilities assignments for the specified role identifier

path Parameters
id
required
string <uuid>
Example: 1e985e76-e9ca-401c-ad8e-0d121a11111e

Role identifier

Responses

Response samples

Content type
application/json
{ }

role-capability-set

createRoleCapabilitySets

Create a record associating one or more capabilities with the role

Request Body schema: application/json
required
roleId
required
string <uuid>

ID of the role

capabilitySetIds
Array of strings <uuid> [ items <uuid > ]

List of capability set identifiers

capabilitySetNames
Array of strings

List of capability set names

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

getRoleCapabilitySets

Get role-capability-set relation items by CQL query

query Parameters
query
string
Example: query=role

A query string to filter users based on matching criteria in fields.

limit
integer >= 0
Default: 10
Example: limit=20

Limit the number of elements returned in the response.

offset
integer >= 0
Default: 0
Example: offset=2

Skip over a number of elements by specifying an offset value for the query.

Responses

Response samples

Content type
application/json
{ }

getCapabilitySetsByRoleId

Get capability sets assigned to role by role identifier

path Parameters
id
required
string <uuid>
Example: 1e985e76-e9ca-401c-ad8e-0d121a11111e

Role identifier

query Parameters
limit
integer >= 0
Default: 10
Example: limit=20

Limit the number of elements returned in the response.

offset
integer >= 0
Default: 0
Example: offset=2

Skip over a number of elements by specifying an offset value for the query.

Responses

Response samples

Content type
application/json
{ }

updateRoleCapabilitySets

Modifies the set of capability sets assigned to the specified role.

path Parameters
id
required
string <uuid>
Example: 1e985e76-e9ca-401c-ad8e-0d121a11111e

Role identifier

Request Body schema: application/json
required
capabilitySetIds
Array of strings <uuid> [ items <uuid > ]

List of capability set identifiers

capabilitySetNames
Array of strings

List of capability names

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

deleteRoleCapabilitySets

Removes all capability sets assignments for the specified role identifier

path Parameters
id
required
string <uuid>
Example: 1e985e76-e9ca-401c-ad8e-0d121a11111e

Role identifier

Responses

Response samples

Content type
application/json
{ }

policies

getPolicy

Get policy by ID

path Parameters
id
required
string <uuid>
Example: 1e589e76-e9ca-401c-ad8e-0d121a11111e

Policy identifier

Responses

Response samples

Content type
application/json
{ }

updatePolicy

Update a policy

path Parameters
id
required
string <uuid>
Example: 1e589e76-e9ca-401c-ad8e-0d121a11111e

Policy identifier

Request Body schema: application/json
required
id
string <uuid>

A unique identifier for this policy. System-generated if not provided.

name
required
string

A human-readable name/label for this policy. Required.

description
string

Free form description of the policy. Optional.

type
required
string (policyType)
Enum: "USER" "TIME" "ROLE"

The type of policy. Required.

source
string (sourceType)
Enum: "SYSTEM" "USER" "CONSORTIUM"

Source type for roles and policies.

object (userPolicy)

Object containing the details of the user-based policy

users
required
Array of strings <uuid> [ items <uuid > ]

Collection of user IDs. Required.

logic
string (Policy logic enum)
Default: "POSITIVE"
Enum: "POSITIVE" "NEGATIVE"

The logic type of policy.

object (timePolicy)

Object containing the details of the time-based policy.

repeat
boolean
Default: false

Whether or not to repeat the policy.

start
string <date-time>

Defines the time before which access must not be granted. Permission is granted only if the current date/time is later than or equal to this value. Ignored if repeat is true.

expires
string <date-time>

Defines the time after which access must not be granted. Permission is granted only if the current date/time is earlier than or equal to this value. Must be greater than the start time. Ignored if repeat is true.

dayOfMonthStart
integer [ 1 .. 31 ]

Defines the day of the month that access must be granted. You can also specify a range of dates. In this case, permission is granted only if the current day of the month is between or equal to the two values specified. Ignored if repeat is false.

dayOfMonthEnd
integer [ 1 .. 31 ]

Defines the end of the day of the month range. Must be greater than dayOfMonthStart. Ignored if repeat is false.

monthStart
integer [ 1 .. 12 ]

Defines the month that access must be granted. You can also specify a range of months. In this case, permission is granted only if the current month is between or equal to the two values specified. Ignored if repeat is false.

monthEnd
integer [ 1 .. 12 ]

Defines the end of the month range. Must be greater than monthStart. Ignored if repeat is false.

hourStart
integer [ 0 .. 23 ]

Defines the hour that access must be granted. You can also specify a range of hours. In this case, permission is granted only if the current hour is between or equal to the two values specified. Ignored if repeat is false.

hourEnd
integer [ 0 .. 23 ]

Defines the end of the hour range. Must be greater than hourStart. Ignored if repeat is false.

minuteStart
integer [ 0 .. 59 ]

Defines the minute that access must be granted. You can also specify a range of minutes. In this case, permission is granted only if the current minute is between or equal to the two values specified. Ignored if repeat is false.

minuteEnd
integer [ 0 .. 59 ]

Defines the end of the minutes range. Must be greater than minuteStart. Ignored if repeat is false.

logic
string (Policy logic enum)
Default: "POSITIVE"
Enum: "POSITIVE" "NEGATIVE"

The logic type of policy.

object (rolePolicy)

Object containing the details of the aggregated policy.

required
Array of objects (rolePolicyRole)

Specifies which roles are permitted by this policy. Required

logic
string (Policy logic enum)
Default: "POSITIVE"
Enum: "POSITIVE" "NEGATIVE"

The logic type of policy.

object (Metadata Schema)

Metadata about creation and changes to records, provided by the server (client should not provide)

createdDate
string <date-time>

Date and time when the record was created

createdByUserId
string <uuid>

ID of the user who created the record (when available)

updatedDate
string <date-time>

Date and time when the record was last updated

updatedByUserId
string <uuid>

ID of the user who last updated the record (when available)

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

deletePolicy

Delete a policy

path Parameters
id
required
string <uuid>
Example: 1e589e76-e9ca-401c-ad8e-0d121a11111e

Policy identifier

Responses

findPolicies

Get policies by query

query Parameters
query
string
Example: query=role

A query string to filter users based on matching criteria in fields.

limit
integer >= 0
Default: 10
Example: limit=20

Limit the number of elements returned in the response.

offset
integer >= 0
Default: 0
Example: offset=2

Skip over a number of elements by specifying an offset value for the query.

Responses

Response samples

Content type
application/json
{ }

createPolicy

Create a policy

Request Body schema: application/json
required
id
string <uuid>

A unique identifier for this policy. System-generated if not provided.

name
required
string

A human-readable name/label for this policy. Required.

description
string

Free form description of the policy. Optional.

type
required
string (policyType)
Enum: "USER" "TIME" "ROLE"

The type of policy. Required.

source
string (sourceType)
Enum: "SYSTEM" "USER" "CONSORTIUM"

Source type for roles and policies.

object (userPolicy)

Object containing the details of the user-based policy

users
required
Array of strings <uuid> [ items <uuid > ]

Collection of user IDs. Required.

logic
string (Policy logic enum)
Default: "POSITIVE"
Enum: "POSITIVE" "NEGATIVE"

The logic type of policy.

object (timePolicy)

Object containing the details of the time-based policy.

repeat
boolean
Default: false

Whether or not to repeat the policy.

start
string <date-time>

Defines the time before which access must not be granted. Permission is granted only if the current date/time is later than or equal to this value. Ignored if repeat is true.

expires
string <date-time>

Defines the time after which access must not be granted. Permission is granted only if the current date/time is earlier than or equal to this value. Must be greater than the start time. Ignored if repeat is true.

dayOfMonthStart
integer [ 1 .. 31 ]

Defines the day of the month that access must be granted. You can also specify a range of dates. In this case, permission is granted only if the current day of the month is between or equal to the two values specified. Ignored if repeat is false.

dayOfMonthEnd
integer [ 1 .. 31 ]

Defines the end of the day of the month range. Must be greater than dayOfMonthStart. Ignored if repeat is false.

monthStart
integer [ 1 .. 12 ]

Defines the month that access must be granted. You can also specify a range of months. In this case, permission is granted only if the current month is between or equal to the two values specified. Ignored if repeat is false.

monthEnd
integer [ 1 .. 12 ]

Defines the end of the month range. Must be greater than monthStart. Ignored if repeat is false.

hourStart
integer [ 0 .. 23 ]

Defines the hour that access must be granted. You can also specify a range of hours. In this case, permission is granted only if the current hour is between or equal to the two values specified. Ignored if repeat is false.

hourEnd
integer [ 0 .. 23 ]

Defines the end of the hour range. Must be greater than hourStart. Ignored if repeat is false.

minuteStart
integer [ 0 .. 59 ]

Defines the minute that access must be granted. You can also specify a range of minutes. In this case, permission is granted only if the current minute is between or equal to the two values specified. Ignored if repeat is false.

minuteEnd
integer [ 0 .. 59 ]

Defines the end of the minutes range. Must be greater than minuteStart. Ignored if repeat is false.

logic
string (Policy logic enum)
Default: "POSITIVE"
Enum: "POSITIVE" "NEGATIVE"

The logic type of policy.

object (rolePolicy)

Object containing the details of the aggregated policy.

required
Array of objects (rolePolicyRole)

Specifies which roles are permitted by this policy. Required

logic
string (Policy logic enum)
Default: "POSITIVE"
Enum: "POSITIVE" "NEGATIVE"

The logic type of policy.

object (Metadata Schema)

Metadata about creation and changes to records, provided by the server (client should not provide)

createdDate
string <date-time>

Date and time when the record was created

createdByUserId
string <uuid>

ID of the user who created the record (when available)

updatedDate
string <date-time>

Date and time when the record was last updated

updatedByUserId
string <uuid>

ID of the user who last updated the record (when available)

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

createPolicies

Create one or more policies

Request Body schema: application/json
required
required
Array of objects (policy) [ 1 .. 255 ] items

A list of policies.

Array ([ 1 .. 255 ] items)
id
string <uuid>

A unique identifier for this policy. System-generated if not provided.

name
required
string

A human-readable name/label for this policy. Required.

description
string

Free form description of the policy. Optional.

type
required
string (policyType)
Enum: "USER" "TIME" "ROLE"

The type of policy. Required.

source
string (sourceType)
Enum: "SYSTEM" "USER" "CONSORTIUM"

Source type for roles and policies.

object (userPolicy)

Object containing the details of the user-based policy

object (timePolicy)

Object containing the details of the time-based policy.

object (rolePolicy)

Object containing the details of the aggregated policy.

object (Metadata Schema)

Metadata about creation and changes to records, provided by the server (client should not provide)

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

migration

findMigrations

Retrieve a list of permission migrations

query Parameters
query
string
Example: query=role

A query string to filter users based on matching criteria in fields.

offset
integer >= 0
Default: 0
Example: offset=2

Skip over a number of elements by specifying an offset value for the query.

limit
integer >= 0
Default: 10
Example: limit=20

Limit the number of elements returned in the response.

Responses

Response samples

Content type
application/json
{
  • "migrations": [
    ],
  • "totalRecords": 0
}

migratePermissions

Migrate user permissions from mod-permissions to Keycloak

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "status": "in_progress",
  • "startedAt": "2019-08-24T14:15:22Z",
  • "finishedAt": "2019-08-24T14:15:22Z"
}

getMigration

Retrieve a permission migration

path Parameters
id
required
string <uuid>

Entity id

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "status": "in_progress",
  • "startedAt": "2019-08-24T14:15:22Z",
  • "finishedAt": "2019-08-24T14:15:22Z"
}

deleteMigration

Delete a permission migration

path Parameters
id
required
string <uuid>

Entity id

Responses

capability

findCapabilities

Get capabilities by query

query Parameters
query
string
Example: query=role

A query string to filter users based on matching criteria in fields.

limit
integer >= 0
Default: 10
Example: limit=20

Limit the number of elements returned in the response.

offset
integer >= 0
Default: 0
Example: offset=2

Skip over a number of elements by specifying an offset value for the query.

Responses

Response samples

Content type
application/json
{ }

getCapabilityById

Get capability by ID

path Parameters
id
required
string <uuid>

Entity id

Responses

Response samples

Content type
application/json
{ }

findCapabilitiesByCapabilitySetId

Find capabilities by capability set ID

path Parameters
id
required
string <uuid>

Entity id

query Parameters
includeDummy
boolean
Default: false

Include dummy capabilities.

limit
integer >= 0
Default: 10
Example: limit=20

Limit the number of elements returned in the response.

offset
integer >= 0
Default: 0
Example: offset=2

Skip over a number of elements by specifying an offset value for the query.

Responses

Response samples

Content type
application/json
{ }

capability-set

findCapabilitySets

Get capabilities by query

query Parameters
query
string
Example: query=role

A query string to filter users based on matching criteria in fields.

limit
integer >= 0
Default: 10
Example: limit=20

Limit the number of elements returned in the response.

offset
integer >= 0
Default: 0
Example: offset=2

Skip over a number of elements by specifying an offset value for the query.

Responses

Response samples

Content type
application/json
{ }

getCapabilitySetById

Get capability set by ID

path Parameters
id
required
string <uuid>

Entity id

Responses

Response samples

Content type
application/json
{ }

user-capability

createUserCapabilities

Create a record associating one or more capabilities with a user.

Request Body schema: application/json
required
userId
required
string <uuid>

User identifier

capabilityIds
required
Array of strings <uuid> non-empty [ items <uuid > ]

List of capability identifiers

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

getUserCapabilities

Search user capabilities by CQL query

query Parameters
query
string
Example: query=role

A query string to filter users based on matching criteria in fields.

limit
integer >= 0
Default: 10
Example: limit=20

Limit the number of elements returned in the response.

offset
integer >= 0
Default: 0
Example: offset=2

Skip over a number of elements by specifying an offset value for the query.

Responses

Response samples

Content type
application/json
{ }

findCapabilitiesByUserId

Retrieve capabilities assigned to role by role identifier

path Parameters
id
required
string <uuid>
Example: 1e111e76-1111-401c-ad8e-0d121a11111e

User identifier

query Parameters
expand
boolean
Default: false

Defines if capability sets must be expanded

includeDummy
boolean
Default: false

Include dummy capabilities.

limit
integer >= 0
Default: 10
Example: limit=20

Limit the number of elements returned in the response.

offset
integer >= 0
Default: 0
Example: offset=2

Skip over a number of elements by specifying an offset value for the query.

Responses

Response samples

Content type
application/json
{ }

updateUserCapabilities

Modifies the set of capabilities assigned to the specified user.

path Parameters
id
required
string <uuid>
Example: 1e111e76-1111-401c-ad8e-0d121a11111e

User identifier

Request Body schema: application/json
required
capabilityIds
Array of strings <uuid> [ items <uuid > ]

List of capability identifiers

capabilityNames
Array of strings

List of capability names

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

deleteUserCapabilities

Removes all capability assignments for the specified user identifier

path Parameters
id
required
string <uuid>
Example: 1e111e76-1111-401c-ad8e-0d121a11111e

User identifier

Responses

Response samples

Content type
application/json
{ }

user-capability-set

createUserCapabilitySets

Create a record associating one or more capabilities with a user.

Request Body schema: application/json
required
userId
string <uuid>

User identifier

capabilitySetIds
required
Array of strings <uuid> non-empty [ items <uuid > ]

List of capability identifiers

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

getUserCapabilitySets

Get user capabilities by CQL query and pagination parameters

query Parameters
query
string
Example: query=role

A query string to filter users based on matching criteria in fields.

limit
integer >= 0
Default: 10
Example: limit=20

Limit the number of elements returned in the response.

offset
integer >= 0
Default: 0
Example: offset=2

Skip over a number of elements by specifying an offset value for the query.

Responses

Response samples

Content type
application/json
{ }

getCapabilitySetsByUserId

Retrieve capability sets assigned to role by role identifier

path Parameters
id
required
string <uuid>
Example: 1e111e76-1111-401c-ad8e-0d121a11111e

User identifier

query Parameters
limit
integer >= 0
Default: 10
Example: limit=20

Limit the number of elements returned in the response.

offset
integer >= 0
Default: 0
Example: offset=2

Skip over a number of elements by specifying an offset value for the query.

Responses

Response samples

Content type
application/json
{ }

updateUserCapabilitySets

Modifies the set of capability sets assigned to the specified user.

path Parameters
id
required
string <uuid>
Example: 1e111e76-1111-401c-ad8e-0d121a11111e

User identifier

Request Body schema: application/json
required
capabilitySetIds
Array of strings <uuid> [ items <uuid > ]

List of capability set identifiers

capabilitySetNames
Array of strings

List of capability names

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

deleteUserCapabilitySets

Removes all capability set assignments for the specified user identifier

path Parameters
id
required
string <uuid>
Example: 1e111e76-1111-401c-ad8e-0d121a11111e

User identifier

Responses

Response samples

Content type
application/json
{ }

permissions-users

getPermissionsUser

Get permissions by user ID. If there is onlyVisible=true, then desiredPermissions are ignored.

path Parameters
id
required
string <uuid>

Entity id

query Parameters
onlyVisible
boolean
Default: false

Return only visible permission sets

desiredPermissions
Array of strings
Example: desiredPermissions=users.item.get&desiredPermissions=users.collection.*

A list of permissions to filter by

Responses

Response samples

Content type
application/json
{ }

loadable-roles

findLoadableRoles

Get loadable roles by query

query Parameters
query
string
Example: query=role

A query string to filter users based on matching criteria in fields.

limit
integer >= 0
Default: 10
Example: limit=20

Limit the number of elements returned in the response.

offset
integer >= 0
Default: 0
Example: offset=2

Skip over a number of elements by specifying an offset value for the query.

Responses

Response samples

Content type
application/json
{
  • "loadableRoles": [
    ],
  • "totalRecords": 0
}

upsertLoadableRole

A default role is created or updated, role is populated with the specified permissions (capabilities and capability sets) as they become available in the system. Default role cannot be changed via Roles API.

Request Body schema: application/json
required
Array of objects (Loadable Permission schema)

List of permissions associated with role

Array
roleId
string <uuid>

Loadable Role identifier

permissionName
required
string

Permission name

capabilityId
string <uuid>

Capability Id associated with this permission

capabilitySetId
string <uuid>

Capability Set Id associated with this permission

object (Metadata Schema)

Metadata about creation and changes to records, provided by the server (client should not provide)

id
string <uuid>

Role identifier

name
required
string

A human-readable name/label for this role

description
string

Free form description of the role

type
string (roleType)
Enum: "DEFAULT" "REGULAR" "CONSORTIUM"

Role type

object (Metadata Schema)

Metadata about creation and changes to records, provided by the server (client should not provide)

createdDate
string <date-time>

Date and time when the record was created

createdByUserId
string <uuid>

ID of the user who created the record (when available)

updatedDate
string <date-time>

Date and time when the record was last updated

updatedByUserId
string <uuid>

ID of the user who last updated the record (when available)

Responses

Request samples

Content type
application/json
{
  • "permissions": [
    ],
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "type": "DEFAULT",
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "permissions": [
    ],
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "type": "DEFAULT",
  • "metadata": {
    }
}