獲取使用者

information

本頁面使用機器翻譯而成。
機器翻譯免責聲明 (External link)

目錄

獲取使用者

檢索用戶資訊。

有關匯出 CSV 檔的 API 的詳細資訊,請參閱 匯出用戶

URL

https://sample.cybozu.com/v1/users.json

HTTP 方法

GET

所需許可權

請求

參數
參數名稱 必須 說明
ids 陣列 自選 使用者ID清單
codes 是相互排斥的。
ids codes 如果省略 和 ,則最多可獲得100個用戶資訊。
codes 陣列 自選 用戶登錄名清單

ids 是相互排斥的。
ids codes 如果省略 和 ,則最多可獲得100個用戶資訊。
size 數值 自選 要檢索的用戶數
您可以指定 1 到 100。如果省略,則設置為100。
offset 數值 自選 從一開始就跳過的用戶數
您可以指定一個從 0 到無窮大的數位。
如果省略,則設置為0。
示例請求
URL

https://sample.cybozu.com/v1/users.json?codes[0]=sato-noboru&codes[1]=kato-misaki

頁眉
1
2
3
{
  "X-Cybozu-Authorization": "QWRtaW5pc3RyYXRvcjpjeWJvenU="
}

有關請求頭的詳細資訊,請參閱 通用使用者 API 規範

回應

財產
屬性名稱 說明
user 陣列 使用者資訊清單
有關詳細資訊,請參閱 用戶類型
排序順序為升序。users[].id
示例回應
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{
  "users": [
    {
      "id": "1",
      "code": "sato-noboru",
      "ctime": "2019-04-01T00:33:58Z",
      "mtime": "2023-03-31T02:11:11Z",
      "valid": true,
      "name": "佐藤登",
      "surName": "佐藤",
      "givenName": "上升",
      "surNameReading": "佐藤",
      "givenNameReading": "Noboru",
      "localName": "",
      "localNameLocale": "ja",
      "timezone": "Asia/Tokyo",
      "locale": "ja",
      "description": "",
      "phone": "0000-000-0000",
      "mobilePhone": "090-000-0000",
      "extensionNumber": "",
      "email": "sato-noboru@example.com",
      "callto": "",
      "url": "",
      "employeeNumber": "n00012",
      "birthDate": "1985-09-19",
      "joinDate": "2010-04-01",
      "primaryOrganization": "9",
      "sortOrder": null,
      "customItemValues": [
        {
            "code": "boss",
            "value": ""
        }
      ]
    },
    {
      "id": "2",
      "code": "kato-misaki",
      "ctime": "2019-04-01T00:33:58Z",
      "mtime": "2023-03-31T02:11:11Z",
      "valid": true,
      "name": "加藤 美咲",
      "surName": "加藤",
      "givenName": "美咲",
      "surNameReading": "加藤",
      "givenNameReading": "美咲",
      "localName": "",
      "localNameLocale": "ja",
      "timezone": "Asia/Tokyo",
      "locale": "ja",
      "description": "",
      "phone": "0000-000-0000",
      "mobilePhone": "090-000-0000",
      "extensionNumber": "",
      "email": "kato-misaki@example.com",
      "callto": "",
      "url": "",
      "employeeNumber": "m00312",
      "birthDate": "1991-04-17",
      "joinDate": "2022-04-01",
      "primaryOrganization": "9",
      "sortOrder": null,
      "customItemValues": [
        {
          "code": "boss",
          "value": "1"
        }
      ]
    }
  ]
}

示例代碼

使用 curl 的請求
1
2
curl -X GET 'https://sample.cybozu.com/v1/users.json?codes%5B0%5D=sato-noboru&codes%5B1%5D=kato-misaki' \
  -H 'X-Cybozu-Authorization: QWRtaW5pc3RyYXRvcjpjeWJvenU='

限制

  • 無法獲取kintone訪客使用者。