[]
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| IncludePermissions | query | boolean | Whether include the permissions of the role in the query result. |
| IncludeMembers | query | boolean | Whether include the members of the role in the query result. |
| SearchType | query | The search type, available values are "None" and "Count". |
Get all roles.
Responses
[200] Success
Type: [application/json]
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| id | query | string | The role id. If not specified, a new guid will be generated. |
| provider | query | string | The role provider. If not specified, the default value is 'local'. |
Add a new role.
Request Body
Description: The role name. For example: DataManager
Type: application/json
name
Responses
[201] Created
Type: [application/json]
[400] Bad Request
Type: [application/json]
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| IncludePermissions | query | boolean | Whether include the permissions of the role in the query result. |
| IncludeMembers | query | boolean | Whether include the members of the role in the query result. |
| SearchType | query | The search type, available values are "None" and "Count". |
Get all the roles which do not belong to any organization.
Responses
[200] Success
Type: [application/json]
Parameters
| Name | In | Type | Description | Default |
|---|---|---|---|---|
| all | query | boolean | Whether retrieve all global roles, only take effect when the current logged in user is a system administrator. For example: false | false |
Get all the global roles of the current logged in user.
Responses
[200] Success
Type: [application/json]
Parameters
| Name | In | Type | Description | Default |
|---|---|---|---|---|
| idRequired | path | string | The role id. | |
| includePermission | query | boolean | Whether retrieve the permissions of the specified role. For example: true | true |
Get role information by id.
Responses
[200] Success
Type: [application/json]
[404] Not Found
Type: [application/json]
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| idRequired | path | string | The role id |
Update a role.
Request Body
Description: The role update model
Type: application/json
Responses
[200] Success
Type: [application/json]
[400] Bad Request
Type: [application/json]
[404] Not Found
Type: [application/json]
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| idRequired | path | string | The role id. |
Delete an role.
Responses
[204] No Content
[400] Bad Request
Type: [application/json]
[404] Not Found
Type: [application/json]
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| idRequired | path | string | The role id. |
Get all users who belong to the specified role.
Responses
[200] Success
Type: [application/json]
[404] Not Found
Type: [application/json]
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| idRequired | path | string | The role id. |
Add users to the specified role.
Request Body
Description: The role users update model.
Type: application/json
Responses
[200] Success
Type: [application/json]
[400] Bad Request
Type: [application/json]
[404] Not Found
Type: [application/json]
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| idRequired | path | string | The role id. |
Update the users who belong to the specified role.
Request Body
Description: The role users update model.
Type: application/json
Responses
[200] Success
Type: [application/json]
[400] Bad Request
Type: [application/json]
[404] Not Found
Type: [application/json]
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| idRequired | path | string | The role id. |
| userIdRequired | path | string | The user id. |
Remove the specified user who belongs to the specified role.
Responses
[204] No Content
[400] Bad Request
Type: [application/json]
[404] Not Found
Type: [application/json]
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| idRequired | path | string | The role id. |
Get the permissions of the specified role.
Responses
[200] Success
Type: [application/json]
[404] Not Found
Type: [application/json]
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| idRequired | path | string | The role id. |
Update the permissions of the specified role.
Request Body
Description: The role permissions update model.
Type: application/json
Responses
[200] Success
Type: [application/json]
[400] Bad Request
Type: [application/json]
[404] Not Found
Type: [application/json]
Import roles.
Request Body
Description: Role import model.
Type: application/json
Responses
[200] Success
Type: [application/json]
[400] Bad Request
Type: [application/json]
Enum:
None
Count
The 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. | false |
| 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 |
|---|---|---|
| errorsNullable | Array<ApiError> |
The errors list. |
The model used to describe an error that occurred when processing a web request.
| Name | Type | Description |
|---|---|---|
| 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 |
|---|---|
| nameNullable | string |
| Name | Type |
|---|---|
| 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:
Normal
Disabled
The status of user.
* Normal - 1 - Normal status.
* Disabled - 2 - Disabled status.
Enum:
FollowSystemNeverExpire| Name | Type | Description | Example |
|---|---|---|---|
| userIdsRequired | Array<string> |
The user ids list. | ["F00FC3E6-8554-467D-9A7E-4598E623BB2F","8259E551-5AFB-489E-8593-0FD6384E123B"] |
| Name | Type |
|---|---|
| nameNullable | string |
| descriptionNullable | string |
| enabled | Boolean |
| order | int32 |
| moduleNullable | string |
| categoryNullable | string |
| isCustomPermission | Boolean |
| Name | Type | Description | Example |
|---|---|---|---|
| permissionsRequired | Array<string> |
Permissions list. | ["view-dashboard","view-report"] |
| Name | Type | Description |
|---|---|---|
| rolesRequired | Array<RoleBizModel> |
The roles list. |