应用身份管理服务 ONEACCESS-创建用户:请求示例

时间:2024-08-30 15:55:33

请求示例

创建一个用户,用户名zhangsan,手机号12345678901,邮箱zhangsan@example.com。

POST https://{domain_name}/api/v2/tenant/users

Authorization: Bearer 334963fc-1e4a-473b-9096-52a929140...
{
    "user_name": "zhangsan",
    "password": "p******d",
    "org_code": "10000",
    "name": "zhangsan",
    "mobile": "12345678901",
    "email": "zhangsan@example.com",
    "employee_id": "123456789",
    "pwd_must_modify": false,
    "first_name": "F",
    "middle_name": "M",
    "last_name": "L",
    "attr_gender": "male",
    "attr_birthday": "1990-02-01",
    "attr_nick_name": "zhangsan",
    "attr_identity_type": "id_card",
    "attr_identity_number": "123456789",
    "attr_area": "CN",
    "attr_city": "xxx",
    "attr_manager_id": "123456789",
    "attr_user_type": "regular",
    "attr_hire_date": "2021-04-01",
    "attr_work_place": "xxx",
    "user_org_relation_list": [
      {
            "orgCode": "10000",
            "relationType": 1
      },
      {
            "orgCode": "TestOrg1",
            "relationType": 0
      },
      {
            "orgCode": "TestOrg2",
            "relationType": 0
      }
    ],
    "extension": {
        "age": "18"
    }
}
support.huaweicloud.com/api-oneaccess/CreateUser.html