Master
Versions: Euwe / Fine / Latest /

User Management

Management of Users is provided via the following collection:

/api/users

Full CRUD actions on users is available:

Querying Users

Querying all users in the system is simply:

GET /api/users

Getting details on a specific user:

GET /api/users/:id

Creating Users

Users can be created via a POST to the users collection or via the create action signature which also allows creation of multiple users in a single request.

POST /api/users
{
  "userid" : "testuser",
  "password" : "secret",
  "name" : "Test User",
  "group" : { "id" : 11 }
}

group can be specified via description, href, or id

or creating multiple users:

{
  "action" : "create",
  "resources" : [
    { "userid" : "testuser1", "name" : "Test User1", ... },
    { "userid" : "testuser2", "name" : "Test User2", ... },
    ...
  ]
}

Please refer to the Resource Attributes page for a list of available attributes when creating Users.

Editing Users

POST /api/users/:id
{
  "action" : "edit",
  "resource" : {
    "group" : { "id" : 12 }
  }
}

or editing multiple users:

POST /api/users
{
  "action" : "edit",
  "resources" : [
    {
      "href" : "http://localhost:3000/api/users/101",
      "group" : { "href" : "http://localhost:3000/api/groups/15" }
    },
    {
      "href" : "http://localhost:3000/api/users/102",
      "group" : { "href" : "http://localhost:3000/api/groups/15" }
    },
    {
      "href" : "http://localhost:3000/api/users/103",
      "group" : { "href" : "http://localhost:3000/api/groups/15" }
    },
    ...
  ]
}

Deleting Users

users can be deleted via either the delete POST action or via the DELETE HTTP method.

POST /api/users/101
{
  "action" : "delete"
}

or simply:

DELETE /api/users/101

Deleting multiple users can be done as follows:

POST /api/users
{
  "action" : "delete",
  "resources" : [
    { "href" : "http://localhost:3000/api/users/101" },
    { "href" : "http://localhost:3000/api/users/102" },
    ...
  ]
}