Device users
Get list of devices users
GET
http://localhost:5000/api/device-users/index
This endpoint allows you to get a list of all current device users. In the example below we assume we have two device users; a 1 and a 2:
Headers
Authentication
string
Bearer access_token
{
"model": [{
"siteId": 187924,
"siteName": "a 1",
"firstName": "a",
"lastName": "1",
"customerNo": 342345,
"otpCode": 950286,
"unitId": 185092,
"workerUid": 161047
}, {
"siteId": 165341,
"siteName": "a 2",
"firstName": "a",
"lastName": "2",
"customerNo": 342345,
"otpCode": 193498,
"unitId": 129455,
"workerUid": 923185
}],
"success": true,
"message": "Success"
}
Create a new device user
PUT
http://locahost:5000/api/device-users/create
Headers
Authentication
string
Bearer access_token
Request Body
userFirstName
string
First name of the user to create, eg: John
userLastName
string
Last name of the user to create, eg: Doe
{
"success": true,
"message": "Device user \"John Doe\" was created successfully"
}
Update a device user
POST
http://locahost:5000/api/device-users/update
Headers
Authentication
string
Bearer access_token
Request Body
id
number
Id of the user to update (siteId from the index)
userFirstName
string
First name of the user to update, eg: John
userLastName
string
Last name of the user to update, eg: Doe
{
"success": true,
"message": "Device user updated successfully"
}
Delete a device user
DELETE
http://locahost:5000/api/device-users/delete
id is the siteId from the index response
Path Parameters
id
string
siteId of the device user to delete
Headers
Authentication
string
Bearer access_token
{
"success": true,
"message": "Device user \"John Doe\" deleted successfully"
}
Last updated
Was this helpful?