HTTP状态码 | 错误码 | 描述 | 排查建议 |
---|---|---|---|
500 | 1051000 | unknown server error | 服务内部错误,请稍后重试 |
400 | 1051001 | request contain invalid param | 请求中包含非法参数 |
403 | 1051002 | request to exceed authority | 请求发生越权 |
400 | 1051200 | grant name are duplicated | 授予名单名称发生冲突 |
400 | 1051201 | cannot exceed the max length limit of grant name | 授予名单名称的长度超过限制 |
400 | 1051202 | already choose all staff, cannot related other user entity | 禁止为全员授予类型名单关联用户群体 |
400 | 1051204 | reach the count limit of grant | 授予名单数量达到上限 |
400 | 1051113 | cannot find this badge | 未找到该勋章的信息 |
curl --location --request POST 'https://open.feishu.cn/open-apis/admin/v1/badges//grants?user_id_type=&department_id_type=' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "激励勋章的授予名单",
"grant_type": 0,
"time_zone": "Asia/Shanghai",
"rule_detail": {
"effective_time": "1649606400",
"expiration_time": "1649692799",
"anniversary": 1,
"effective_period": 1
},
"is_grant_all": false,
"user_ids": [
"u273y71"
],
"department_ids": [
"h121921"
],
"group_ids": [
"g122817"
]
}'
{
"code": 0,
"msg": "success",
"data": {
"grant": {
"id": "g_49Z7CQ",
"badge_id": "m_qTR2HM",
"name": "激励勋章的授予名单",
"grant_type": 0,
"time_zone": "Asia/Shanghai",
"rule_detail": {
"effective_time": "1649606400",
"expiration_time": "1649692799",
"anniversary": 1,
"effective_period": 1
},
"is_grant_all": false,
"user_ids": [
"u273y71"
],
"department_ids": [
"h121921"
],
"group_ids": [
"g122817"
]
}
}
}