[]
        
(Showing Draft Content)

RoleApiV1

RoleApiV1

[POST] /Manager/Role/AddRole

添加角色。

Request Body

Type: application/json-patch+json

RoleNameParam

Example:

{
  "RoleName": "Intern"
}

Type: application/json

RoleNameParam

Example:

{
  "RoleName": "Intern"
}

Type: text/json

RoleNameParam

Example:

{
  "RoleName": "Intern"
}

Type: application/*+json

RoleNameParam

Example:

{
  "RoleName": "Intern"
}

Responses

[200] OK

ResultDataBase

Type: [text/plain]

Example:

{
  "Result": false,
  "Message": "Error message.",
  "ErrorCode": 0,
  "MessageProperties": null
}

ResultDataBase

Type: [application/json]

Example:

{
  "Result": false,
  "Message": "Error message.",
  "ErrorCode": 0,
  "MessageProperties": null
}

ResultDataBase

Type: [text/json]

Example:

{
  "Result": false,
  "Message": "Error message.",
  "ErrorCode": 0,
  "MessageProperties": null
}

[POST] /Manager/Role/UpdateRoleName

更新角色名。

Request Body

Type: application/json-patch+json

UpdateRoleNameParam

Example:

{
  "OldRoleName": "Intern",
  "NewRoleName": "Newbie"
}

Type: application/json

UpdateRoleNameParam

Example:

{
  "OldRoleName": "Intern",
  "NewRoleName": "Newbie"
}

Type: text/json

UpdateRoleNameParam

Example:

{
  "OldRoleName": "Intern",
  "NewRoleName": "Newbie"
}

Type: application/*+json

UpdateRoleNameParam

Example:

{
  "OldRoleName": "Intern",
  "NewRoleName": "Newbie"
}

Responses

[200] OK

ResultDataBase

Type: [text/plain]

Example:

{
  "Result": false,
  "Message": "Error message.",
  "ErrorCode": 0,
  "MessageProperties": null
}

ResultDataBase

Type: [application/json]

Example:

{
  "Result": false,
  "Message": "Error message.",
  "ErrorCode": 0,
  "MessageProperties": null
}

ResultDataBase

Type: [text/json]

Example:

{
  "Result": false,
  "Message": "Error message.",
  "ErrorCode": 0,
  "MessageProperties": null
}

[POST] /Manager/Role/DeleteRole

删除角色。

Request Body

Type: application/json-patch+json

RoleNameParam

Example:

{
  "RoleName": "Intern"
}

Type: application/json

RoleNameParam

Example:

{
  "RoleName": "Intern"
}

Type: text/json

RoleNameParam

Example:

{
  "RoleName": "Intern"
}

Type: application/*+json

RoleNameParam

Example:

{
  "RoleName": "Intern"
}

Responses

[200] OK

ResultDataBase

Type: [text/plain]

Example:

{
  "Result": false,
  "Message": "Error message.",
  "ErrorCode": 0,
  "MessageProperties": null
}

ResultDataBase

Type: [application/json]

Example:

{
  "Result": false,
  "Message": "Error message.",
  "ErrorCode": 0,
  "MessageProperties": null
}

ResultDataBase

Type: [text/json]

Example:

{
  "Result": false,
  "Message": "Error message.",
  "ErrorCode": 0,
  "MessageProperties": null
}

[POST] /Manager/Role/AddUsersToRole

给指定的角色添加普通用户。

Request Body

Type: application/json-patch+json

UsersToRoleParam

Example:

{
  "Users": [
    "Bob",
    "Andy"
  ],
  "RoleName": "Developer"
}

Type: application/json

UsersToRoleParam

Example:

{
  "Users": [
    "Bob",
    "Andy"
  ],
  "RoleName": "Developer"
}

Type: text/json

UsersToRoleParam

Example:

{
  "Users": [
    "Bob",
    "Andy"
  ],
  "RoleName": "Developer"
}

Type: application/*+json

UsersToRoleParam

Example:

{
  "Users": [
    "Bob",
    "Andy"
  ],
  "RoleName": "Developer"
}

Responses

[200] OK

ResultDataBase

Type: [text/plain]

Example:

{
  "Result": false,
  "Message": "Error message.",
  "ErrorCode": 0,
  "MessageProperties": null
}

ResultDataBase

Type: [application/json]

Example:

{
  "Result": false,
  "Message": "Error message.",
  "ErrorCode": 0,
  "MessageProperties": null
}

ResultDataBase

Type: [text/json]

Example:

{
  "Result": false,
  "Message": "Error message.",
  "ErrorCode": 0,
  "MessageProperties": null
}

[POST] /Manager/Role/AddWindowsUsersToRole

给指定的角色添加域用户。

Request Body

Type: application/json-patch+json

UsersToRoleParam

Example:

{
  "Users": [
    "Bob",
    "Andy"
  ],
  "RoleName": "Developer"
}

Type: application/json

UsersToRoleParam

Example:

{
  "Users": [
    "Bob",
    "Andy"
  ],
  "RoleName": "Developer"
}

Type: text/json

UsersToRoleParam

Example:

{
  "Users": [
    "Bob",
    "Andy"
  ],
  "RoleName": "Developer"
}

Type: application/*+json

UsersToRoleParam

Example:

{
  "Users": [
    "Bob",
    "Andy"
  ],
  "RoleName": "Developer"
}

Responses

[200] OK

ResultDataBase

Type: [text/plain]

Example:

{
  "Result": false,
  "Message": "Error message.",
  "ErrorCode": 0,
  "MessageProperties": null
}

ResultDataBase

Type: [application/json]

Example:

{
  "Result": false,
  "Message": "Error message.",
  "ErrorCode": 0,
  "MessageProperties": null
}

ResultDataBase

Type: [text/json]

Example:

{
  "Result": false,
  "Message": "Error message.",
  "ErrorCode": 0,
  "MessageProperties": null
}

[POST] /Manager/Role/RemoveUsersFromRole

从指定的角色移除普通用户。

Request Body

Type: application/json-patch+json

UsersToRoleParam

Example:

{
  "Users": [
    "Bob",
    "Andy"
  ],
  "RoleName": "Developer"
}

Type: application/json

UsersToRoleParam

Example:

{
  "Users": [
    "Bob",
    "Andy"
  ],
  "RoleName": "Developer"
}

Type: text/json

UsersToRoleParam

Example:

{
  "Users": [
    "Bob",
    "Andy"
  ],
  "RoleName": "Developer"
}

Type: application/*+json

UsersToRoleParam

Example:

{
  "Users": [
    "Bob",
    "Andy"
  ],
  "RoleName": "Developer"
}

Responses

[200] OK

ResultDataBase

Type: [text/plain]

Example:

{
  "Result": false,
  "Message": "Error message.",
  "ErrorCode": 0,
  "MessageProperties": null
}

ResultDataBase

Type: [application/json]

Example:

{
  "Result": false,
  "Message": "Error message.",
  "ErrorCode": 0,
  "MessageProperties": null
}

ResultDataBase

Type: [text/json]

Example:

{
  "Result": false,
  "Message": "Error message.",
  "ErrorCode": 0,
  "MessageProperties": null
}

[POST] /Manager/Role/RemoveWindowsUsersFromRole

从指定的角色移除域用户。

Request Body

Type: application/json-patch+json

UsersToRoleParam

Example:

{
  "Users": [
    "Bob",
    "Andy"
  ],
  "RoleName": "Developer"
}

Type: application/json

UsersToRoleParam

Example:

{
  "Users": [
    "Bob",
    "Andy"
  ],
  "RoleName": "Developer"
}

Type: text/json

UsersToRoleParam

Example:

{
  "Users": [
    "Bob",
    "Andy"
  ],
  "RoleName": "Developer"
}

Type: application/*+json

UsersToRoleParam

Example:

{
  "Users": [
    "Bob",
    "Andy"
  ],
  "RoleName": "Developer"
}

Responses

[200] OK

ResultDataBase

Type: [text/plain]

Example:

{
  "Result": false,
  "Message": "Error message.",
  "ErrorCode": 0,
  "MessageProperties": null
}

ResultDataBase

Type: [application/json]

Example:

{
  "Result": false,
  "Message": "Error message.",
  "ErrorCode": 0,
  "MessageProperties": null
}

ResultDataBase

Type: [text/json]

Example:

{
  "Result": false,
  "Message": "Error message.",
  "ErrorCode": 0,
  "MessageProperties": null
}

[GET] /Manager/Role/GetRoles

获取所有角色。

Responses

[200] OK

RolesResultData

Type: [text/plain]

Example:

{
  "Roles": [
    "Intern",
    "Developer",
    "RoleA",
    "RoleB",
    "RoleC"
  ],
  "Result": false,
  "Message": null,
  "ErrorCode": 0,
  "MessageProperties": null
}

RolesResultData

Type: [application/json]

Example:

{
  "Roles": [
    "Intern",
    "Developer",
    "RoleA",
    "RoleB",
    "RoleC"
  ],
  "Result": false,
  "Message": null,
  "ErrorCode": 0,
  "MessageProperties": null
}

RolesResultData

Type: [text/json]

Example:

{
  "Roles": [
    "Intern",
    "Developer",
    "RoleA",
    "RoleB",
    "RoleC"
  ],
  "Result": false,
  "Message": null,
  "ErrorCode": 0,
  "MessageProperties": null
}

Models

Ƭ ResultDataBase

请求结果。

属性名 类型 说明 Example
Result Boolean 请求是否成功。
MessageNullable string 请求返回的信息。
ErrorCode int32 请求返回的错误码。
MessagePropertiesNullable Array 请求返回信息中的数据。

Ƭ RoleNameParam

角色相关请求中的参数。

属性名 类型 说明 Example
RoleNameNullable string 角色名。

Ƭ UpdateRoleNameParam

更新角色请求中的参数。

属性名 类型 说明 Example
OldRoleNameNullable string 旧的角色名。
NewRoleNameNullable string 新的角色名。

Ƭ UsersToRoleParam

给指定角色添加用户请求中的参数。

属性名 类型 说明 Example
UsersNullable Array<string> 用户列表。
RoleNameNullable string 指定角色的名称。

Ƭ RolesResultData

请求返回的角色。

属性名 类型 说明 Example
RolesNullable Array<string> 角色列表。
Result Boolean 请求是否成功。
MessageNullable string 请求返回的信息。
ErrorCode int32 请求返回的错误码。
MessagePropertiesNullable Array 请求返回信息中的数据。