The super administrator can request a list of all existing users. For that purpose submit a GET request to the following URI:
https://hostname/api/v1/users.format
Where format should be replaced by the desired response format. JSON and CSV are the supported response formats.
If the submitting user is not super administrator HTTP 401 status code will be returned.
On the following lines you may find an execution example:
Request:
HTTP Verb: GET
URI: https://hostname/api/v1/users.json?auth_token=eeeeee
Response:
{
"query": true,
"users": [
{
"id": 5,
"email": "user@redborder.net",
"login": "User",
"admin": true,
"name": "John Doe",
"enabled": true,
"authentication_token": "xxxxxx",
"sensor_id": 472,
"sensor_name": "redBorder",
"sensor_uuid": "4935760011107548256"
},
{
"id": 6,
"email": "user@redborder.net",
"login": "User",
"admin": true,
"name": "John Doe",
"enabled": true,
"authentication_token": "xxxxxx",
"sensor_id": 472,
"sensor_name": "redBorder",
"sensor_uuid": "4935760011107548256"
},
{
"id": 7,
"email": "user@redborder.net",
"login": "User",
"admin": false,
"name": "User",
"enabled": true,
"authentication_token": "xxxxxx",
"sensor_id": 1,
"sensor_name": "root",
"sensor_uuid": "2584761509592299795"
},
{
"id": 8,
"email": "user@redborder.net",
"login": "User",
"admin": false,
"name": "John Doe",
"enabled": true,
"authentication_token": "xxxxxx",
"sensor_id": 6,
"sensor_name": "planta1",
"sensor_uuid": "9032532605146231448"
},
{
"id": 11,
"email": "user@redborder.net",
"login": "User",
"admin": false,
"name": "John Doe",
"enabled": true,
"authentication_token": "xxxxxx",
"sensor_id": 260,
"sensor_name": "Julio",
"sensor_uuid": "8726017729975087448"
},
{
"id": 1,
"email": "admin@redborder.net",
"login": "admin",
"admin": true,
"name": "Administrator",
"enabled": true,
"authentication_token": "xxxxxx",
"sensor_id": 1,
"sensor_name": "root",
"sensor_uuid": "2584761509592299795"
},
{
"id": 4,
"email": "user@redborder.net",
"login": "User",
"admin": true,
"name": "John Dow",
"enabled": true,
"authentication_token": "xxxxxx",
"sensor_id": 1,
"sensor_name": "root",
"sensor_uuid": "2584761509592299795"
},
{
"id": 13,
"email": "user@redborder.net",
"login": "User",
"admin": true,
"name": "John Dow",
"enabled": true,
"authentication_token": "xxxxxx",
"sensor_id": 11,
"sensor_name": "Spain",
"sensor_uuid": "6396049722605916538"
},
{
"id": 12,
"email": "user@redborder.net",
"login": "User",
"admin": false,
"name": "John Dow",
"enabled": true,
"authentication_token": "xxxxxx",
"sensor_id": 2,
"sensor_name": "Adamo",
"sensor_uuid": "796168482310467136"
}
]
}
Request:
HTTP Verb: GET
URI: https://hostname/api/v1/users.csv?auth_token=eeeeee
Response:
Name,Email,ID,Login,Admin,Enabled,Authentication_token,Sensor_ID
John Doe,user@redborder.net,5,User,true,true,xxxxxx,472
John Doe,user@redborder.net,6,User,true,true,xxxxxx,472
John Doe,user@redborder.net,7,User,false,true,xxxxxx,1
John Doe,user@redborder.net,8,User,false,true,xxxxxx,6
John Doe,user.ext@redborder.net,11,User,false,true,xxxxxx,260
Administrator,admin@redborder.net,1,admin,true,true,xxxxxx,1
John Doe,user@redborder.net,4,User,true,true,xxxxxx,1
John Doe,user@redborder.net,13,User,true,true,xxxxxx,11
John Doe,user@redborder.net,12,User,false,true,xxxxxx,2