/admins Resource

Administrative Accounts for system administrators.

GET /admins

Returns a list of all administrators.

Access: System administrators only.

Request Parameters
name type description
runas query optional login name whose identity is used to execute the request (only available to users with the RunAs privilege)
Response Codes
code condition
200 if the request was completed successfully
401 if the user is not authenticated (error code 401001)
403 if the user is not authorized to access administrators (error code 403001)
Response Body
media type data type description
application/json Collection (JSON) a collection of Admins.

Example

Request
GET /admins
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "self" : "http://example.org/collection",
  "totalItems" : 42,
  "items" : [ { }, { } ]
}
                
              

POST /admins

Creates a new administrator.

Access: System administrators only.

Request Parameters
name type description
runas query optional login name whose identity is used to execute the request (only available to users with the RunAs privilege)
Request Body
media type data type description
application/json CreateAdminRequest (JSON) user details of the new administrator
Response Codes
code condition
201 if the administrator was created successfully
400
  • if mandatory fields are missing in the request (error code 400005) or
  • if a field is not valid (error code 400007).
401 if the user is not authenticated (error code 401001)
403 if the user is not authorized to access administrators (error code 403001)
409 if there already is an administrator or organisation with the login specified in the request (error code 409001)
Response Body
media type data type description
application/json Admin (JSON) the new administrator
Response Headers
name description
Location URI pointing to the new administrator

Example

Request
POST /admins
Content-Type: application/json
Accept: application/json

                
{
  "login" : "TestAdmin",
  "password" : "enigma",
  "surname" : "Turing",
  "forename" : "Alan",
  "email" : "a.turing@example.org",
  "phone" : "+49 69 1525 0"
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json
Location: ...

                
{
  "self" : "http://example.org/admins/login/turing",
  "login" : "turing",
  "created" : "2017-03-02T15:23:16.123Z",
  "lastModified" : "2017-03-02T15:23:16.123Z",
  "surname" : "Turing",
  "forename" : "Alan",
  "email" : "a.turing@example.org",
  "phone" : "+49 69 1525 0"
}