Administrative Accounts for system administrators.
Returns a list of all administrators.
Access: System administrators only.
| name | type | description |
|---|---|---|
| runas | query | optional login name whose identity is used to execute the request (only available to users with the RunAs privilege) |
| 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) |
| media type | data type | description |
|---|---|---|
| application/json | Collection (JSON) | a collection of Admins. |
GET /admins
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"self" : "http://example.org/collection",
"totalItems" : 42,
"items" : [ { }, { } ]
}
Creates a new administrator.
Access: System administrators only.
| name | type | description |
|---|---|---|
| runas | query | optional login name whose identity is used to execute the request (only available to users with the RunAs privilege) |
| media type | data type | description |
|---|---|---|
| application/json | CreateAdminRequest (JSON) | user details of the new administrator |
| code | condition |
|---|---|
| 201 | if the administrator was created successfully |
| 400 |
|
| 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) |
| media type | data type | description |
|---|---|---|
| application/json | Admin (JSON) | the new administrator |
| name | description |
|---|---|
| Location | URI pointing to the new administrator |
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"
}
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"
}