Get Users
/documents/api/1.2/users/items
Get information about one or more users for folder and file sharing purposes.
The service uses search text provided with the call to match possible users. The search uses a "fuzzy" search of user names and email addresses to return matching users with the most likely matches listed first.
Request
- application/json
- application/xml
-
info: string
(Required) Specify a search string used to return matching users. Note that wildcard characters are not supported and an empty parameter value is treated as a missing parameter.
Response
- application/json
- application/xml
200 Response
The request was fulfilled.
If no users are matched, count
and errorCode
will be "0" and items will not be returned.
object
-
count(optional):
string
The number of users found.
-
errorCode(optional):
string
An error code of zero (0) indicates no errors.
-
items(optional):
array items
Minimum Number of Items:
0
array
0
-
Array of:
object User
User information
object
-
displayName(optional):
string
The display name for the user.
-
id(optional):
string
Globally unique identifier (GUID) for the user.
-
loginName(optional):
string
The login name for the user.
-
type(optional):
string
Item type
user
.
{
"count":"3",
"errorCode":"0",
"items":[
{
"id":"U0EAA20910FAF3052ACB79E4T00000000001",
"displayName":"User AA",
"loginName":"userAALoginName",
"type":"user"
},
{
"id":"U7ECC74059E0FEDFEC66BF5AT00000000001",
"displayName":"User BB",
"loginName":"userBBLoginName",
"type":"user"
},
{
"id":"UEB4B3EFA6C02D1B46A121B4T00000000001",
"displayName":"User CC",
"loginName":"userCCLoginName",
"type":"user"
}
]
}
400 Response
Required field "info" is not provided.
Examples
The following example returns user information for users whose names contain the specified string.
GET .../users/items?info=user%20A
Request Header
None.
Request Body
None.
HTTP Status Code
HTTP_STATUS = 200
JSON Response
{ "count": "3", "errorCode": "0", "items": [ { "type": "user", "id": "U0EAA20910FAF3052ACB79E4T00000000001", "displayName": "User AA", "loginName": "userAALoginName" }, { "type": "user", "id": "U7ECC74059E0FEDFEC66BF5AT00000000001", "displayName": "User BB", "loginName": "userBBLoginName" }, { "type": "user", "id": "UEB4B3EFA6C02D1B46A121B4T00000000001", "displayName": "User CC", "loginName": "userCCLoginName" } ] }