Create user

This API allows you to create a new user in PILOT with specified parameters: login, password, role, and contact information.

How to get data

Request address

To get the data, use the address:  https://<server_address>/api/api.php?

Request method

GET

Request parameters

  • cmd=create_user — command to create a user
  • login — login of the new user
  • password — user password
  • name — user name
  • phone — user phone number
  • email— user email
  • role_id— user role: 0 — Admin, 1 — User
  • vehicles— list of accessible vehicles (IDs or quantity)
  • folders— list of accessible folders (IDs or quantity)
  • node— node number where the command should be executed
The request must include the login and password of the administrator creating the user.
 

Example request

https://<server_address>/api/api.php?cmd=create_user&login=TestAPI3&password=123456&name=Test API&role_id=1&phone=789995&email=testapi5@mailinator.com&vehicles=15&folders=5&node=1
Response
{
    "code": 0,
    "msg": "Success create user: 48"
}
In response to the API request, the following is returned:
  • code — result code (0 — successful operation)
  • msg — server message with the ID of the created user