[]
Get all roles.
Parameters
| Name | Type | Located In | Description | Example |
|---|---|---|---|---|
| IncludePermissions | Boolean | query | Whether include the permissions of the role in the query result. | true |
| IncludeMembers | Boolean | query | Whether include the members of the role in the query result. | |
| SearchType | SearchType | query | The search type, available values are "None" and "Count". | "Count" |
Response
Status Code: 200
Success
Add a new role.
Parameters
| Name | Type | Located In | Description |
|---|---|---|---|
| id | string | query | The role id. If not specified, a new guid will be generated. |
| provider | string | query | The role provider. If not specified, the default value is 'local'. |
Request Schema
name
Response
Status Code: 201
Created
Status Code: 400
Bad Request
Get all the roles which do not belong to any organization.
Parameters
| Name | Type | Located In | Description | Example |
|---|---|---|---|---|
| IncludePermissions | Boolean | query | Whether include the permissions of the role in the query result. | true |
| IncludeMembers | Boolean | query | Whether include the members of the role in the query result. | |
| SearchType | SearchType | query | The search type, available values are "None" and "Count". | "Count" |
Response
Status Code: 200
Success
Get all the global roles of the current logged in user.
Parameters
| Name | Type | Located In | Description |
|---|---|---|---|
| all | Boolean | query | Whether retrieve all global roles, only take effect when the current logged in user is a system administrator. For example: false |
Response
Status Code: 200
Success
Get role information by id.
Parameters
| Name | Type | Located In | Description |
|---|---|---|---|
| idRequired | string | path | The role id. |
| includePermission | Boolean | query | Whether retrieve the permissions of the specified role. For example: true |
Response
Status Code: 200
Success
Status Code: 404
Not Found
Update a role.
Parameters
| Name | Type | Located In | Description |
|---|---|---|---|
| idRequired | string | path | The role id |
Request Schema
Response
Status Code: 200
Success
Status Code: 400
Bad Request
Status Code: 404
Not Found
Delete an role.
Parameters
| Name | Type | Located In | Description |
|---|---|---|---|
| idRequired | string | path | The role id. |
Response
Status Code: 204
No Content
Status Code: 400
Bad Request
Status Code: 404
Not Found
Get all users who belong to the specified role.
Parameters
| Name | Type | Located In | Description |
|---|---|---|---|
| idRequired | string | path | The role id. |
Response
Status Code: 200
Success
Status Code: 404
Not Found
Add users to the specified role.
Parameters
| Name | Type | Located In | Description |
|---|---|---|---|
| idRequired | string | path | The role id. |
Request Schema
Response
Status Code: 200
Success
Status Code: 400
Bad Request
Status Code: 404
Not Found
Update the users who belong to the specified role.
Parameters
| Name | Type | Located In | Description |
|---|---|---|---|
| idRequired | string | path | The role id. |
Request Schema
Response
Status Code: 200
Success
Status Code: 400
Bad Request
Status Code: 404
Not Found
Remove the specified user who belongs to the specified role.
Parameters
| Name | Type | Located In | Description |
|---|---|---|---|
| idRequired | string | path | The role id. |
| userIdRequired | string | path | The user id. |
Response
Status Code: 204
No Content
Status Code: 400
Bad Request
Status Code: 404
Not Found
Get the permissions of the specified role.
Parameters
| Name | Type | Located In | Description |
|---|---|---|---|
| idRequired | string | path | The role id. |
Response
Status Code: 200
Success
Status Code: 404
Not Found
Update the permissions of the specified role.
Parameters
| Name | Type | Located In | Description |
|---|---|---|---|
| idRequired | string | path | The role id. |
Request Schema
Response
Status Code: 200
Success
Status Code: 400
Bad Request
Status Code: 404
Not Found
Import roles.
Request Schema
Response
Status Code: 200
Success
Status Code: 400
Bad Request
Enum:
NoneCountThe search type for searching records.
* None - 0 - Normal search.
* Count - 1 - Only retrieve the records count.
| Name | Type | Description | Example |
|---|---|---|---|
| idNullable | string | The unique identity of the role. | "972B2A4C-8C61-4E3B-AD3D-6E889FE8D761" |
| nameNullable | string | The display name of the role. | "DataManager" |
| creatorIdNullable | string | The creator id of the role. | "CF61388C-D7CD-4A61-8FB3-A8A0B6915F3E" |
| createTime | ISO DateTime Sting | The creation time of the role. | "2000-01-01 00:00:00.000" |
| isBuiltin | Boolean | Whether it is a built-in role. | |
| allowEditPermissions | Boolean | Whether allow to edit the permissions of the role. | true |
| permissionsNullable | Array<string> |
The permissions of the role. | ["view-report","view-dashboard"] |
| membersNullable | Array<string> |
The member id list of the role. | ["CD079B35-4A56-4F42-845D-726B09E08EA9","EAAA677A-7B0A-4471-99F0-4C3F1D31738C"] |
| tenantIdNullable | string | The id of the organization to which the role belongs. | "D6FD678D-45B5-4222-BA81-58BE2E578F91" |
| modifiedByNullable | string | The modifiedBy id of the role. | "CF61388C-D7CD-4A61-8FB3-A8A0B6915F3E" |
| modifiedTime | ISO DateTime Sting | The modified time of the role. | "2000-01-01 00:00:00.000" |
The model used to describe all the errors that occurred when processing a web request.
| Name | Type | Description | Example |
|---|---|---|---|
| errorsNullable | ApiError | The errors list. |
The model used to describe an error that occurred when processing a web request.
| Name | Type | Description | Example |
|---|---|---|---|
| codeNullable | string | The unique identity of the error. | |
| messageNullable | string | The description text of the error. | |
| contextNullable | string | Some related context information of the error. |
| Name | Type | Description | Example |
|---|---|---|---|
| nameNullable | string |
| Name | Type | Description | Example |
|---|---|---|---|
| idNullable | string | ||
| usernameNullable | string | ||
| emailNullable | string | ||
| mobileNullable | string | ||
| providerNullable | string | ||
| avatarNullable | string | ||
| firstNameNullable | string | ||
| lastNameNullable | string | ||
| creationTime | ISO DateTime Sting | ||
| status | UserStatus | ||
| fullNameNullable | string | ||
| organizationIdPathNullable | string | ||
| lastLoginTimeNullable | ISO DateTime Sting | ||
| passwordChangeTimeNullable | ISO DateTime Sting | ||
| passwordExpirationPolicy | UserPasswordExpirationPolicy | ||
| rolesNullable | Array<string> |
||
| customizePropertiesNullable | Array<string> |
||
| extraClaimsNullable | string | ||
| tenantRolesNullable | Array<string> |
Enum:
NormalDisabledThe status of user.
* Normal - 1 - Normal status.
* Disabled - 2 - Disabled status.
Enum:
FollowSystemNeverExpire| Name | Type | Description | Example |
|---|---|---|---|
| userIds | Array<string> |
The user ids list. | ["F00FC3E6-8554-467D-9A7E-4598E623BB2F","8259E551-5AFB-489E-8593-0FD6384E123B"] |
| Name | Type | Description | Example |
|---|---|---|---|
| nameNullable | string | ||
| descriptionNullable | string | ||
| enabled | Boolean | ||
| order | int32 | ||
| moduleNullable | string | ||
| categoryNullable | string | ||
| isCustomPermission | Boolean |
| Name | Type | Description | Example |
|---|---|---|---|
| permissions | Array<string> |
Permissions list. | ["view-dashboard","view-report"] |
| Name | Type | Description | Example |
|---|---|---|---|
| roles | RoleBizModel | The roles list. |