STNS

Simple TOML Name Service

Api Version 1

path Description
/users user list
/groups group list

1.user

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

1.1 list request

$ 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"
  ]
}]

1.2 name/id request

$ curl http://localhost:1104/v1/users?name=example1
[{
  "name": "example1",
    "id": 1001,
    "password": "",
    "group_id": 0,
    "directory": "",
    "shell": "",
    "gecos": "",
    "keys": [
      "ssh-rsa xxxx"
    ],
}]

2.group

Name Required Description
id gid
users users who belong to the group

2.1 list request

$ curl http://localhost:1104/v1/groups

[{
  "name": "example1",
    "id": 1001,
    "users": [
      "example1"
    ],
},
{
  "name": "example2",
  "id": 1002,
  "users": [
    "example2"
  ],
}]

2.2 name/id request

$ curl http://localhost:1104/v1/groups?id=1001

[{
  "name": "example1",
    "id": 1001,
    "users": [
      "example1"
    ],
}]


This theme is a fork of Solo.