The information contained in this document is subject to change. This document contains proprietary information, which is protected by copyright
laws. All rights are reserved. No part of this document may be photocopied, reproduced or translated to another language or program language
without prior written consent of RFI Engineering B.V.
RefGuide_U-routerNGW_v1.01.docx
Page: 50(
57)
14.10 User
The ‘
user
’ endpoints provide information about the users on the U-router NGW. You can retrieve a
list of users or add, change and delete users.
ENDPOINTS
GET /api/user
POST /api/user
You can use the
GET /api/user
endpoint to retrieve a list of users on the system.
For example:
curl https://192.168.168.1/api/user -u rfi:rfi123
Returns:
{
"user": [{
"username": "rfi",
"password": "****",
"canBeDeleted": false,
"shell": "/bin/bash"
}, {
"username": "user2",
"password": "****",
"canBeDeleted": true,
"shell": "/usr/local/bin/ngw-term.sh"
}, {
"username": "user3",
"password": "****",
"canBeDeleted": true,
"shell": "/bin/bash"
}],
"status": "OK"
}
All passwords are returned as ‘****’ since they are not exposed through the API.
The first user on the system cannot be deleted. This is to prevent that you accidentally delete all the
users on the system, thereby locking yourself out. This is determined on the U-router NGW itself
and con not be changed through the API.
You can use the POST /api/user endpoint to add, change and delete users on the system. The
possible POST parameters are:
username
The username of the user on the system.
password
The password of the user on the system.
shell
The shell that this user gets upon login. Possible values
are:
•
/bin/bash
•
/usr/bin/minicom
•
/usr/sbin/nologin
•
/usr/local/bin/ngw-term.sh
All other values will be ignored and result in the error:
Illegal shell selected
action
Determines what the endpoints does. Possible actions are:
•
add
•
change
•
delete