NATSorganization.member.remove移除组织成员

移出成员并解除其组织内全部角色(角色解除经 permission_service);不能移除最后一位所有者。

Request Payload

消息格式:JSON

NameData TypeRequiredDescription
orgIdstringYes组织 ID
userIdstringYes要移除的用户 ID
operatorIdstringYes操作者用户 ID
type RequestBody = {
  /** 组织 ID */
  orgId: string
  /** 要移除的用户 ID */
  userId: string
  /** 操作者用户 ID */
  operatorId: string
}
{
  "orgId": "01JD8SRP1N4T8W6XQ5V9XDL2Y7K",
  "userId": "01JD8SRQ2N5U9W7YR6W0YEM3Z8L",
  "operatorId": "01JD8SEGQ0P9N2XK4L7VDH3T6C"
}

Response Payload

回复使用统一信封 {id, code, messages, result},其 result:

result type: null

Response Code

回复使用统一信封 {id, code, messages, result},其 code 字段:

code Meaning Notes
0 成功 移除组织成员
2505 成员不存在
2506 不能移除所有者

Examples

{
  "orgId": "01JD8SRP1N4T8W6XQ5V9XDL2Y7K",
  "userId": "01JD8SRQ2N5U9W7YR6W0YEM3Z8L",
  "operatorId": "01JD8SEGQ0P9N2XK4L7VDH3T6C"
}
{
  "id": "01JD8SVZDO7Q4RN",
  "code": 0,
  "messages": [],
  "result": null
}

Remarks

管理权限校验由调用方经 permission_service 完成后调用。