layout |
permalink |
default |
/en/interface |
path |
Description |
/users |
user list |
/groups |
group list |
Name |
Required |
Description |
id |
● |
uid |
password |
|
login password by /etc/shadow format |
directory |
|
home directory |
shell |
|
default shell |
gecos |
|
general information about the account |
keys |
|
public keys |
$ curl http://localhost:1104/v1/users
[{
"name": "example1",
"id": 1001,
"password": "",
"group_id": 0,
"directory": "",
"shell": "",
"gecos": "",
"keys": [
"ssh-rsa xxxx"
],
},
{
"name": "example2",
"id": 1002,
"password": "",
"group_id": 0,
"directory": "",
"shell": "",
"gecos": "",
"keys": [
"ssh-rsa xxxx"
]
}]
$ curl http://localhost:1104/v1/users?name=example1
[{
"name": "example1",
"id": 1001,
"password": "",
"group_id": 0,
"directory": "",
"shell": "",
"gecos": "",
"keys": [
"ssh-rsa xxxx"
],
}]
Name |
Required |
Description |
id |
● |
gid |
users |
● |
users who belong to the group |
$ curl http://localhost:1104/v1/groups
[{
"name": "example1",
"id": 1001,
"users": [
"example1"
],
},
{
"name": "example2",
"id": 1002,
"users": [
"example2"
],
}]
$ curl http://localhost:1104/v1/groups?id=1001
[{
"name": "example1",
"id": 1001,
"users": [
"example1"
],
}]