list

<< Click to Display Table of Contents >>

Navigation:  API > users >

list

Description

List the organization's user accounts.

Syntax

https://api.cameyo.com/users/list?clientId=...&clientSecret=...&filter=...

Optional parameters

filter: allows filtering users based on their account status. Syntax: 'status=xxx' (without the quotes, URL-encoded). For 'expired' status, an optional days specifier is allowed in the form: 'status=expired:days'. Examples:

ofilter=status%3dactive (URL-encoded string 'status=active') => returns only user accounts whose status is active.

ofilter=status%3dexpired (URL-encoded string 'status=expired') => returns only user accounts whose status is expired.

ofilter=status%3dexpired%3a10 (URL-encoded string 'status=expired:10') => returns only user accounts whose status has been expired for 10 days or less.

Return

200: success.

400: invalid parameters.

403: authentication failed or insufficient permissions.

Response examples:

{

 "users": [

   {

     "id": "7a3e177e-f18f-4797-bf8c-7f4d767393bd",

     "created": "2019-02-07T02:25:05.457",

     "lastLogin": "2019-02-07T02:26:45.657",

     "expiration": null,

     "groupName": null,

     "groupId": null,

     "userName": "user@gmail.com",

     "status": "active",

     "metadata": null

   },

   {

     "id": "e9555559-7f5c-4e61-8053-938f93cfab57",

     "created": "2019-02-02T00:59:18.463",

     "lastLogin": "2019-02-02T01:05:11.03",

     "expiration": "2019-03-01T00:00:00",

     "groupName": "Trial users",

     "groupId": "bb190e45-ec56-4a60-b873-e1612d25c551",

     "userName": "john@doe.com",

     "status": "expired",

     "metadata": [

       "SomeData1=SomeValue1",

       "SomeData2=SomeValue2"

     ]

   }

 ]

}