Edit access rights to groups / objects /account

Get a list of available folders of the authorized user
 
The request can be made using either the GET or POST method.
 
Parameters can be passed either in the query string or in the request body in JSON format.
 
GET request:
GET /api/api.php?cmd=get_folders_user HTTP/1.1
Host: sandbox.pilot-gps.com
Authorization: Basic [auth]
 
*POST request with parameters in the body:*
 
POST /api/api.php HTTP/1.1
Host: sandbox.pilot-gps.com
Content-Type: application/json
Authorization: Basic [auth]
 
{
 "cmd": "get_folders_user"
}
 
Answer:
 
{
 "code": 0,
 "msg": "Success",
 "data": [
 {"id":1,"name":"DEMO"},
 {"id":6,"name":"IP Emelyanov"},
 {"id":11,"name":"FOLDER1"},
{"id":12,"name":"FOLDER2"}
]
}
 
Get a list of available folders of another user
 
The request can be made using the GET or POST method, parameters can be passed in the query string or in the request body.
 
*GET request with parameters in the string:*
 
GET /api/api.php?cmd=get_folders_user&user_id=19 HTTP/1.1
Host: sandbox.pilot-gps.com
Authorization: Basic [auth]
 
*POST request with parameters in the body:*
 
POST /api/api.php HTTP/1.1
Host: sandbox.pilot-gps.com
Content-Type: application/json
Authorization: Basic [auth]
 
{
"cmd": "get_folders_user",
"user_id": 19
}
 
Change the list of available user folders
 
POST /api/api.php HTTP/1.1
Host: sandbox.pilot-gps.com
Content-Type: application/json
Authorization: Basic [auth]
 
{
"cmd": "update_user_folders",
"folders": "1,11",
"user_id": 19
}
 
Change the list of available objects
 
POST /api/api.php HTTP/1.1
Host: sandbox.pilot-gps.com
Content-Type: application/json
Authorization: Basic [auth]
 
{
"cmd": "update_user_vehicles",
"vehicles": "2,18",
"user_id": 19
}
 
Change the list of available contracts
 
*Note:* accounts are comma-separated and must belong to the owner's partner.
If the partner is 0, then mapping is not possible.
 
POST /api/api.php HTTP/1.1
Host: sandbox.pilot-gps.com
Content-Type: application/json
Authorization: Basic [auth]
 
{
"cmd": "update_user_accounts_map",
"accounts": "1005",
"user_id": 19
}
 
Get a list of available accounts
 
The request can be made using the GET or POST method, parameters can be passed in the query string or in the request body.
 
*GET request:*
 
GET /api/api.php?cmd=get_account_map HTTP/1.1
Host: sandbox.pilot-gps.com
Authorization: Basic [auth]
 
*POST request with parameters in the body:*
 
POST /api/api.php HTTP/1.1
Host: sandbox.pilot-gps.com
Content-Type: application/json
Authorization: Basic [auth]
 
{
"cmd": "get_account_map"
}
 
Response:
 
{
"code": 0,
"data": [
{"account_id": 1005},
{"account_id": 1000}
]
}
 
Get a list of users of your account
 
The request can be made using the GET or POST method.
 
*GET request:*
 
GET /api/api.php?cmd=get_account_user_list HTTP/1.1
Host: sandbox.pilot-gps.com
Authorization: Basic [auth]
 
*POST request with parameters in the body:*
 
POST /api/api.php HTTP/1.1
Host: sandbox.pilot-gps.com
Content-Type: application/json
Authorization: Basic [auth]
 
{
 "cmd": "get_account_user_list"
}
 
 
Answer:
 
{
 "code": 0,
 "data": [
 {
 "id":19,
 "roleid":1,
 "info":"",
 "msisdn":"123123",
 "email":"testTOTP@testTOTP.com",
 "name":"dasd",
"account_id":1000,
"lang":"en",
"parent_id":2
},
// ... other users ...
]
}