企业组织管理接口
更新时间:2020-02-25
创建企业组织
接口描述
创建企业组织。
调用者的账户自动成为企业组织的master account。
创建企业组织,需要先完成账户的实名认证;同时账户下没有待处理的企业组织邀请。
请求结构
Plain Text
1POST /v1/organization HTTP/1.1
2Host: organization.bj.baidubce.com
3Authorization: authorization string
4
5{
6 "name":"name",
7 "description": "description"
8}
请求头域
除公共头域外,无其它特殊头域。
请求参数
名称 | 类型 | 位置 | 描述 | 是否必须 |
---|---|---|---|---|
name | String | RequestBody参数 | 企业组织名称 | 是 |
description | String | RequestBody参数 | 企业组织描述 | 否 |
响应头域
除公共头域外,无其它特殊头域。
响应参数
请求示例
Plain Text
1POST /v1/organization
2host: organization.bj.baidubce.com
3content-type: application/json
4Content-Length: 54
5Authorization: AuthorizationString
6
7{"name":"testOrg", "description": "test organization"}
响应示例
Plain Text
1HTTP/1.1 201 Created
2Content-Type: application/json;charset=UTF-8
3X-Bce-Request-Id: 8d51a788-e79d-4ced-a9e0-0662ec85b7f7
4Server: BWS
5
6{
7 "createTime": "2018-08-29T04:02:23Z",
8 "description": "test organization",
9 "id": "25fc10b3bc61437aa72b35f76515b375",
10 "masterAccountId": "9fe073b94d6041c7b13617db3a52761e",
11 "masterAccountMobile": "13312345678",
12 "name": "testOrg"
13}
查看企业组织
接口描述
查看当前所在的企业组织。
请求结构
Plain Text
1GET /v1/organization HTTP/1.1
2Host: organization.bj.baidubce.com
3Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
无。
响应头域
除公共头域外,无其它特殊头域。
响应参数
账户仅能加入一个企业组织,故列表中最多只有一条记录;若未创建或加入过账户组,则返回空列表。
名称 | 类型 | 描述 |
---|---|---|
Organizations | List<Organization> | 企业组织列表 |
请求示例
Plain Text
1GET /v1/organization
2host: organization.bj.baidubce.com
3Authorization: AuthorizationString
响应示例
Plain Text
1HTTP/1.1 200 OK
2Content-Type: application/json;charset=UTF-8
3X-Bce-Request-Id: 8d51a788-e79d-4ced-a9e0-0662ec85b7f7
4Server: BWS
5
6[
7 {
8 "description": "",
9 "createTime": "2018-08-29T04:02:23Z",
10 "masterAccountMobile": "13312345678",
11 "masterAccountId": "9fe073b94d6041c7b13617db3a52761e",
12 "id": "25fc10b3bc61437aa72b35f76515b375",
13 "name": "test"
14 }
15]
更新企业组织
接口描述
修改企业组织信息。
请求结构
Plain Text
1PUT /v1/organization/{organizationId} HTTP/1.1
2Host: organization.bj.baidubce.com
3Authorization: authorization string
4
5{
6 "name": "name",
7 "description": "description"
8}
请求头域
除公共头域外,无其它特殊头域。
请求参数
名称 | 类型 | 位置 | 描述 | 是否必须 |
---|---|---|---|---|
organizationId | String | URL参数 | 企业组织ID | 是 |
name | String | RequestBody参数 | 企业组织名称 | 否 |
description | String | RequestBody参数 | 企业组织描述 | 否 |
响应头域
除公共头域外,无其它特殊头域。
响应参数
请求示例
Plain Text
1PUT /v1/organization/25fc10b3bc61437aa72b35f76515b375
2host: organization.bj.baidubce.com
3content-type: application/json
4Content-Length: 51
5Authorization: AuthorizationString
6
7{"name":"test", "description": "test organization"}
响应示例
Plain Text
1HTTP/1.1 200 OK
2Content-Type: application/json;charset=UTF-8
3X-Bce-Request-Id: bcc416b6-0bd0-4c3f-aa77-6b211bacb630
4Server: BWS
5
6{
7 "description": "test organization",
8 "createTime": "2018-08-29T04:02:23Z",
9 "masterAccountMobile": "13312345678",
10 "masterAccountId": "9fe073b94d6041c7b13617db3a52761e",
11 "id": "25fc10b3bc61437aa72b35f76515b375",
12 "name": "test"
13}