Get Users

Gets information of users.

MethodGET
URLhttps://{subdomain}.kintone.com/v1/users.json
AuthenticationPassword Authentication
Content-Typeapplication/json (not needed if specifying the query with a query string)

Contents

Permissions

All users other than Guest Users can use this API.

Request Parameters

Parameter Value Required Description
ids Array Optional A list of User IDs, as ID types .
Up to 100 ids can be specified.
codes Array Optional A list of User Codes (log-in names), as Strings.
Up to 100 codes can be specified.
offset Integer Optional The offset.
If ignored, this value is 0.
size Integer Optional The maximum number of User information to get.
If ignored, this value is 100.

*If ids and codes are both ignored, up to 100 ids will be responded in ascending order of id.
**If ids and codes are both set, an error will return. Only one can be set.

Sample Request

JavaScript (using Kintone REST API Request )

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
var body = {
  'ids': [1, 2, 3],
  'offset': 0,
  'size': 100
};
kintone.api(kintone.api.url('/v1/users', true), 'GET', body, function(resp) {
  // success
  console.log(resp);
}, function(error) {
  // error
  console.log(error);
});

XMLHttpRequest

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
var params = '?ids[0]=1&ids[1]=2&ids[2]=3&offset=0&size=100';
var url = 'https://{subdomain}.kintone.com/v1/users.json' + params;
console.log(url);
var xhr = new XMLHttpRequest();
xhr.open('GET', url);
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
xhr.onload = function() {
  if (xhr.status === 200) {
    // success
    console.log(JSON.parse(xhr.responseText));
  } else {
    // error
    console.log(JSON.parse(xhr.responseText));
  }
};
xhr.send();

Response Parameters

Parameter Type Description
user Array A list of user information, as user types .

Sample Response

 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
73
74
75
76
77
78
79
80
{
  "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": "en",
      "locale": "",
      "mobilePhone": "",
      "mtime": "2013-07-22T09:00:00Z",
      "name": "a",
      "phone": "",
      "primaryOrganization": null,
      "sortOrder": 2147483647,
      "surName": "a",
      "surNameReading": "",
      "timezone": "America/Los_Angeles",
      "url": "",
      "valid": true
    },
    {
      "birthDate": null,
      "callto": "",
      "code": "Administrator",
      "ctime": "2013-07-19T08:16:00Z",
      "customItemValues": [
        {
          "code": "item1",
          "value": "adminitem1"
        },
        {
          "code": "secret",
          "value": "adminitem2"
        }
      ],
      "description": "",
      "email": "",
      "employeeNumber": "",
      "extensionNumber": "",
      "givenName": "",
      "givenNameReading": "",
      "id": "7532782697181632512",
      "joinDate": null,
      "localName": "",
      "localNameLocale": "en",
      "locale": "",
      "mobilePhone": "",
      "mtime": "2013-07-22T08:13:00Z",
      "name": "Administrator",
      "phone": "",
      "primaryOrganization": null,
      "sortOrder": 2147483647,
      "surName": "",
      "surNameReading": "",
      "timezone": "America/Los_Angeles",
      "url": "",
      "valid": true
    }
  ]
}