Skip to content

Latest commit

 

History

History
217 lines (157 loc) · 7.9 KB

File metadata and controls

217 lines (157 loc) · 7.9 KB

Contents


Get Users

GET /api/application/users

Returns a list of user objects.

Parameters

Name Visibility Type Allowed Values
filter optional [key]=value email, external_id, username, uuid
include optional array[string] servers
sort optional string id, uuid
page optional number >= 1
per_page optional number >= 1

Responses

Code Description
200 The request was successful.

Example Response

{
  "object": "list",
  "data": [
    {
      "object": "user",
      "attributes": {
        "2fa": false,
        "created_at": "2022-09-15T17:33:34+00:00",
        "email": "example@example.com",
        "external_id": null,
        "first_name": "test",
        "id": 4,
        "language": "en",
        "last_name": "user",
        "root_admin": true,
        "updated_at": "2022-09-15T17:33:35+00:00",
        "username": "test-user",
        "uuid": "4c45016d-0148-4794-89b6-970e0b429b54"
      }
    }
  ]
}

Sources

Get User

GET /api/application/users/:id

Returns a user by its id (number).

Parameters

Name Visibility Type Allowed Values
include optional array[string] servers

Responses

Code Description
200 The request was successful.
404 The user was not found.

Example Response

{
  "object": "user",
  "attributes": {
    "2fa": false,
    "created_at": "2022-09-15T17:33:34+00:00",
    "email": "example@example.com",
    "external_id": null,
    "first_name": "test",
    "id": 4,
    "language": "en",
    "last_name": "user",
    "root_admin": true,
    "updated_at": "2022-09-15T17:33:35+00:00",
    "username": "test-user",
    "uuid": "4c45016d-0148-4794-89b6-970e0b429b54"
  }
}

Sources

Get External User

GET /api/application/users/external/:external_id

Return a user by its external_id (string).

Parameters

Name Visibility Type Allowed Values
include optional array[string] servers

Responses

Code Description
200 The request was successful.
404 The user was not found.

Sources

Create User

POST /api/application/users

Creates a user.

Body

Field Visibility Type Description
email required string The account email.
external_id optional string An external identifier for the account.
first_name required string The first name for the account.
language optional string The language identifier for the account.
last_name required string The last name for the account.
password optional string The password for the account. Manual input by the account holder is required if this is not set.
root_admin optional boolean Whether the account will have administrative access.
username required string The account username.

Responses

Code Description
201 The request was successful.
422 One or more validation rules failed.

Sources

Update User

PATCH /api/application/users/:id

Updates a user account by its id (number).

Body

Field Visibility Type Description
email required string The account email.
external_id optional string An external identifier for the account.
first_name required string The first name for the account.
language optional string The language identifier for the account.
last_name required string The last name for the account.
password optional string The password for the account.
root_admin optional boolean Whether the account will have administrative access.
username required string The account username.

Responses

Code Description
200 The request was successful.
404 The user was not found.
422 One or more validation rules failed.

Sources

Delete User

DELETE /api/application/users/:id

Deletes a user account by its id (number).

Responses

Code Description
200 The request was successful.
400 There are servers connected to the user account.
404 The user was not found.

Sources