Users

Attributes

  • id integer

    Unique identifier for the object.

  • username string

  • email string

  • phone

  • type string

    Either a type user or application, to keep track of API vs human consumers.

  • group string

    The name of the group this user is part of.

  • groupId string

    The ID to the group this user belongs to.

Endpoints

List Users

get /api/users

Get the list of users and return a JSON response.

Arguments

  • name string

  • limit

  • offset integer

    Will return items, but only those after the integer amount.

  • countOnly boolean

Request with curl
curl "http://[Your IP]/api/users" \ -X get \-H "Content-Type: application/json" \-H "Authorization: Bearer [Your JWT Access Token]"
Example Response
{ "users": [{ "id": "integer", "username": "string", "email": "string", "phone": "", "type": "string", "group": "string", "groupId": "string", }] }] }

Create User

post /api/users

Create a user and get a response.

Body Parameters

  • username string REQUIRED

    The name of the user account.

  • password string REQUIRED

    Plaintext password (will be encoded in transit).

  • type string

    Either "user" or "application".

Request with curl
curl "http://[Your IP]/api/users" \ -X post \ -H "Content-Type: application/json" \-H "Authorization: Bearer [Your JWT Access Token]" \ -d '{ "username": "string", "password": "string", }'
Example Response
{ "": { "id": "integer", "username": "string", "email": "string", "phone": "", "type": "string", "group": "string", "groupId": "string", } }

Login User

post /api/users/login

Arguments

  • username string REQUIRED

    The username of the logged in user.

  • password string REQUIRED

    Plaintext password (will be encoded in transit).

Request with curl
curl "http://[Your IP]/api/users/login" \ -X post \-H "Content-Type: application/json" \-H "Authorization: Bearer [Your JWT Access Token]"
Example Response
{ "": { "id": "integer", "username": "string", "email": "string", "phone": "", "type": "string", "group": "string", "groupId": "string", } }

Generate Token

post /api/users/application-token
Request with curl
curl "http://[Your IP]/api/users/application-token" \ -X post \ -H "Content-Type: application/json" \-H "Authorization: Bearer [Your JWT Access Token]" \ -d '{ }'
Example Response
{ "": { "id": "integer", "username": "string", "email": "string", "phone": "", "type": "string", "group": "string", "groupId": "string", } }