空间管理
更新时间:2022-11-15
获取空间列表
接口简介
获取空间列表
接口详情
请求地址
/openapi/v1/company/group?__scp__={__scp__}&searchText=&page=1&perPage=10
请求类型
GET
请求参数
参数名 | 类型 | 必填 | 描述 | 默认值 | 参考值 |
---|---|---|---|---|---|
page | Number | 否 | 第几页 | 1 | 1 |
perPage | Number | 否 | 每页条数 | 10 | 10 |
searchText | String | 否 | 搜索的用户名 | - | - |
返回正确 JSON 示例
Javascript
1{
2 status: 0,
3 msg: "",
4 data: {
5 count: 2,
6 rows: [
7 {
8 config: { },
9 hash: "g_ada15-5fidzg4-p284kv",
10 name: "第一个空间",
11 avatar: "",
12 remark: "系统自动创建的空间,如果要让其用户浏览,需要将用户加入您的组织并加入该空间",
13 type: 0,
14 token: "***",
15 navWidth: "normal",
16 key: "first",
17 createDate: "2019-11-26T12:37:04.000Z",
18 admins: [
19 {
20 name: "test@baidu.com",
21 email: "test@baidu.com",
22 realName: "test",
23 avatar: ""
24 }
25 ]
26 },
27 {
28 config: { },
29 hash: "g_ada15-1a3y97mo-9kqzkx", // 空间hash
30 name: "Sugar官方示例报表组", // 空间名称
31 remark: "", // 空间描述
32 type: 3, //
33 key: "sugar_offical_demo_qazwsx", // 空间key值,即接口中的{groupKey}
34 admins: [ ] // 管理员信息
35 }
36 ]
37 }
38}
返回错误 JSON 示例
Javascript
1{
2 msg: '错误详情',
3 status: 499,
4 requestId: '',
5 code: 'NoSuchKey'
6}
修改空间管理员
接口简介
修改空间管理员
接口详情
请求地址
/openapi/v1/company/group/{groupHash}?__scp__={__scp__}
注:groupHash 从[空间列表]返回数据中 hash 获取
请求类型
PUT
请求参数
Javascript
1{
2 admins: ['test@baidu.com'];
3}
参数名 | 类型 | 必填 | 描述 | 默认值 | 参考值 |
---|---|---|---|---|---|
admins | Array | 是 | 邮箱列表 | - | ['test@baidu.com'] |
返回正确 JSON 示例
Javascript
1{
2 status: 0,
3 msg: "",
4 data: {}
5}
返回错误 JSON 示例
Javascript
1{
2 msg: '错误详情',
3 status: 499,
4 requestId: '',
5 code: 'NoSuchKey'
6}