文档首页> ISDP> API参考> API接口> 权限角色> 批量新增岗位角色权限(API名称:batchSavePositionRoleGrant)
更新时间:2024-04-26 GMT+08:00
分享

批量新增岗位角色权限(API名称:batchSavePositionRoleGrant)

功能介绍

批量新增岗位角色权限

相关接口

接口名称

调用说明

获取Token

调用该接口获取到Token,再调用其他接口时,需要在请求消息头中添加“Authorization”,其值即为Token。

URL

请求方式

HTTPS地址

服务架构

消息体类型

POST

https://isdp+域名/openapi/v1/privilege/batchSavePositionRoleGrant

OpenAPI

application/json

请求头

KEY

VALUE

是否必填

描述

Content-Type

application/json

Authorization

bearer ${access_token}

bearer +“ ”+5.2.1中获取的access_token的值

请求参数

参数

类型

是否必填

描述

beginDate

String

权限起始日期,格式:yyyy-MM-dd

endDate

String

权限结束日期,格式:yyyy-MM-dd

roleNo

String

角色编码

positionList

List<Object>

岗位列表,格式:[

{

"positionCode": "ut岗位编码aa"

}

] ,positionCode为岗位编码

说明:

最大批量新增数不能超过200条。

rules

List<Object>

通用规则,格式:[{"ruleCode": "1001"}],ruleCode为规则编码

说明:

最大批量新增数不能超过10条。

响应参数

参数

类型

描述

status

String

状态 success/failed

msg

String

提示信息

data

Object

返回数据

failed

boolean

true/false

success

boolean

true/false

请求示例

{
    "beginDate": "2024-01-24",
    "endDate": "2025-01-24",
    "roleNo": "Admin",
    "positionList": [
        {
            "positionCode": "ut岗位编码aa"
        }
    ],
    "rules": [
        {
            "ruleCode": "1001"
        }
    ]
}

响应示例

{
    "status": "success",
    "msg": "批量岗位角色授权成功!",
    "data": null,
    "success": true,
    "failed": false
}
分享:

    相关文档

    相关产品