Examples

GET /api/users
200
{
  "total": 10,
  "subtotal": 10,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "firstname": "Admin",
      "lastname": "User",
      "mail": "admin@someware.com",
      "admin": true,
      "auth_source_id": 200482051,
      "disabled": false,
      "auth_source_name": "Internal",
      "timezone": null,
      "locale": null,
      "last_login_on": "2009-10-12 21:50:04 UTC",
      "created_at": "2021-05-19 07:53:37 UTC",
      "updated_at": "2021-05-19 07:53:37 UTC",
      "id": 135138680,
      "login": "secret_admin",
      "description": null,
      "ssh_keys": [],
      "default_location": null,
      "locations": [],
      "default_organization": null,
      "organizations": [],
      "effective_admin": true
    },
    {
      "firstname": "apiadmin",
      "lastname": "User",
      "mail": "apiadmin@someware.com",
      "admin": true,
      "auth_source_id": 200482051,
      "disabled": false,
      "auth_source_name": "Internal",
      "timezone": null,
      "locale": null,
      "last_login_on": "2009-10-12 21:50:04 UTC",
      "created_at": "2021-05-19 07:53:37 UTC",
      "updated_at": "2021-05-19 07:53:37 UTC",
      "id": 886836129,
      "login": "apiadmin",
      "description": null,
      "ssh_keys": [],
      "default_location": null,
      "locations": [],
      "default_organization": null,
      "organizations": [],
      "effective_admin": true
    },
    {
      "firstname": "External",
      "lastname": "User",
      "mail": "external_user@someware.com",
      "admin": false,
      "auth_source_id": 408068537,
      "disabled": false,
      "auth_source_name": "External",
      "timezone": null,
      "locale": null,
      "last_login_on": "2009-10-12 21:50:04 UTC",
      "created_at": "2021-05-19 07:53:37 UTC",
      "updated_at": "2021-05-19 07:53:37 UTC",
      "id": 408068537,
      "login": "external",
      "description": null,
      "ssh_keys": [],
      "default_location": null,
      "locations": [],
      "default_organization": null,
      "organizations": [],
      "effective_admin": false
    },
    {
      "firstname": "One",
      "lastname": "User",
      "mail": "userone@someware.com",
      "admin": false,
      "auth_source_id": 980190962,
      "disabled": false,
      "auth_source_name": "ldap-server",
      "timezone": null,
      "locale": null,
      "last_login_on": "2009-10-12 21:50:04 UTC",
      "created_at": "2021-05-19 07:53:37 UTC",
      "updated_at": "2021-05-19 07:53:37 UTC",
      "id": 980190962,
      "login": "one",
      "description": null,
      "ssh_keys": [],
      "default_location": null,
      "locations": [
        {
          "id": 255093256,
          "name": "Location 1"
        }
      ],
      "default_organization": null,
      "organizations": [
        {
          "id": 447626438,
          "name": "Organization 1"
        }
      ],
      "effective_admin": false
    },
    {
      "firstname": "Restricted",
      "lastname": "User",
      "mail": "userrestricted@someware.com",
      "admin": false,
      "auth_source_id": 980190962,
      "disabled": false,
      "auth_source_name": "ldap-server",
      "timezone": null,
      "locale": null,
      "last_login_on": "2009-10-12 21:50:04 UTC",
      "created_at": "2021-05-19 07:53:37 UTC",
      "updated_at": "2021-05-19 07:53:37 UTC",
      "id": 130842698,
      "login": "restricted",
      "description": null,
      "ssh_keys": [],
      "default_location": null,
      "locations": [],
      "default_organization": null,
      "organizations": [],
      "effective_admin": false
    },
    {
      "firstname": "Scoped",
      "lastname": "User",
      "mail": "userscoped@someware.com",
      "admin": false,
      "auth_source_id": 980190962,
      "disabled": false,
      "auth_source_name": "ldap-server",
      "timezone": null,
      "locale": null,
      "last_login_on": "2009-10-12 21:50:05 UTC",
      "created_at": "2021-05-19 07:53:37 UTC",
      "updated_at": "2021-05-19 07:53:37 UTC",
      "id": 117925625,
      "login": "scoped",
      "description": null,
      "ssh_keys": [],
      "default_location": null,
      "locations": [
        {
          "id": 255093256,
          "name": "Location 1"
        }
      ],
      "default_organization": null,
      "organizations": [
        {
          "id": 447626438,
          "name": "Organization 1"
        }
      ],
      "effective_admin": false
    },
    {
      "firstname": "system_admin",
      "lastname": "User",
      "mail": "system_admin@anywhere.com",
      "admin": false,
      "auth_source_id": 200482051,
      "disabled": false,
      "auth_source_name": "Internal",
      "timezone": null,
      "locale": null,
      "last_login_on": "2009-10-12 21:50:04 UTC",
      "created_at": "2021-05-19 07:53:37 UTC",
      "updated_at": "2021-05-19 07:53:37 UTC",
      "id": 482449135,
      "login": "system_admin",
      "description": null,
      "ssh_keys": [],
      "default_location": null,
      "locations": [],
      "default_organization": null,
      "organizations": [],
      "effective_admin": false
    },
    {
      "firstname": "test",
      "lastname": "User",
      "mail": "testuser@someware.com",
      "admin": false,
      "auth_source_id": 200482051,
      "disabled": false,
      "auth_source_name": "Internal",
      "timezone": null,
      "locale": null,
      "last_login_on": "2009-10-12 21:50:04 UTC",
      "created_at": "2021-05-19 07:53:37 UTC",
      "updated_at": "2021-05-19 07:53:37 UTC",
      "id": 200482051,
      "login": "test",
      "description": null,
      "ssh_keys": [],
      "default_location": null,
      "locations": [],
      "default_organization": null,
      "organizations": [],
      "effective_admin": false
    },
    {
      "firstname": "Two",
      "lastname": "User",
      "mail": "usertwo@someware.com",
      "admin": false,
      "auth_source_id": 980190962,
      "disabled": false,
      "auth_source_name": "ldap-server",
      "timezone": null,
      "locale": null,
      "last_login_on": "2009-10-12 21:50:04 UTC",
      "created_at": "2021-05-19 07:53:37 UTC",
      "updated_at": "2021-05-19 07:53:37 UTC",
      "id": 298486374,
      "login": "two",
      "description": null,
      "ssh_keys": [],
      "default_location": null,
      "locations": [],
      "default_organization": null,
      "organizations": [],
      "effective_admin": false
    },
    {
      "firstname": "view_hosts",
      "lastname": "User",
      "mail": "view_hosts@someware.com",
      "admin": false,
      "auth_source_id": 200482051,
      "disabled": false,
      "auth_source_name": "Internal",
      "timezone": null,
      "locale": null,
      "last_login_on": "2009-10-12 21:50:04 UTC",
      "created_at": "2021-05-19 07:53:37 UTC",
      "updated_at": "2021-05-19 07:53:37 UTC",
      "id": 988725676,
      "login": "view_hosts",
      "description": null,
      "ssh_keys": [],
      "default_location": null,
      "locations": [],
      "default_organization": null,
      "organizations": [],
      "effective_admin": false
    }
  ]
}

Params

Param name Description
auth_source_ldap_id
optional

ID of LDAP authentication source

Validations:

  • Must be a String

usergroup_id
optional

ID of user group

Validations:

  • Must be a String

role_id
optional

ID of role

Validations:

  • Must be a String

location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organizations

Validations:

  • Must be a Integer

search
optional

filter results

Validations:

  • Must be a String

order
optional

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
optional

Number of results per page to return, ‘all’ to return all results

Validations:

  • Must match regular expression /\A([1-9]\d|all)\Z$/.

Search fields

Field name Type Possible values
admin true, false
auth_source string
auth_source_type string
description text
disabled true, false
firstname string
last_login_on datetime
lastname string
location string
location_id integer
login string
mail string
organization string
organization_id integer
role string
role_id integer
usergroup string