导出组内的用户的API(仅输出JSON)
此API用于通过JSON格式导出所指定的组内的用户列表。
HTTP 方法
GET
URI
https://(子域名).cybozu.cn/v1/group/users.json
请求
头部
头部 | 值和说明 |
---|---|
X-Cybozu-Authorization | 值为“登录名:密码”通过BASE64编码之后的字符。 |
Authorization | 使用Basic验证时,值为“Basic”和“登录名:密码”通过BASE64编码之后的字符。 |
参数
参数名称 | 要指定的类型 | 必须 | 说明 |
---|---|---|---|
code | 字符串 | 必须 | 组代码 |
offset | 数值 | 可省略(省略时为0) | 偏移量 |
size | 数值 | 可省略(省略时为100) | 大小 |
请求范例
通过HTTP的查询字符串发送参数
查询字符串
code=group1&offset=0&size=50
包含请求头部的字符串
GET /v1/group/users.json?code=group1&offset=0&size=50 HTTP/1.1 Host: example.cybozu.cn:443 X-Cybozu-Authorization: QWRtaW5pc3RyYXRvcjpjeWJvenU= Authorization: Basic QWRtaW5pc3RyYXRvcjpjeWJvenU=
Content-Type头部不需要。
应答
参数
key | 类型 | 内容 |
---|---|---|
users | user类型的数组 | 所属于组的用户的信息 |
应答范例
{ "users": [ { "birthDate": "2011-05-01", "callto": "", "code": "a", "ctime": "2013-07-22T08:12:18Z", "customItemValues": [ { "code": "item1", "value": "aitem1" }, { "code": "secret", "value": "aitem2" } ], "description": "", "email": "", "employeeNumber": "", "extensionNumber": "", "givenName": "", "givenNameReading": "", "id": "1", "joinDate": "2013-01-01", "localName": "", "localNameLocale": "zh", "locale": "", "mobilePhone": "", "mtime": "2013-07-22T09:00:45Z", "name": "a", "phone": "", "primaryOrganization": null, "sortOrder": 2147483647, "surName": "a", "surNameReading": "", "timezone": "Asia/Shanghai", "url": "", "valid": true }, { "birthDate": "2011-05-01", "callto": "", "code": "b", "ctime": "2013-07-22T08:12:18Z", "customItemValues": [ { "code": "item1", "value": "bitem1" }, { "code": "secret", "value": "bitem2" } ], "description": "", "email": "", "employeeNumber": "", "extensionNumber": "", "givenName": "", "givenNameReading": "", "id": "1", "joinDate": "2013-01-01", "localName": "", "localNameLocale": "zh", "locale": "", "mobilePhone": "", "mtime": "2013-07-22T09:00:45Z", "name": "a", "phone": "", "primaryOrganization": null, "sortOrder": 2147483647, "surName": "a", "surNameReading": "", "timezone": "Asia/Shanghai", "url": "", "valid": true } ] }
代码范例
用curl发送请求的范例 :
curl -X GET 'https://sample.cybozu.com/v1/group/users.json?code=Recruit2022' \ -H 'X-Cybozu-Authorization: QWRtaW5pc3RyYXRvcjpjeWJvenU='
访问权限
所有用户均可访问。
※kintone的来宾用户不可访问。