Administrative Accounts for system administrators.
Returns an administrator based on her login name.
Access: System administrators only.
| name | type | description | constraints |
|---|---|---|---|
| login | path | of the administrator | required |
| 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) |
| 404 | if no administrator exists with the given login (404001) |
| media type | data type | description |
|---|---|---|
| application/json | Admin (JSON) | an administrator |
GET /admins/login/{login}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"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"
}
Updates an administrator.
Access: System administrators only.
| name | type | description | constraints |
|---|---|---|---|
| login | path | of the administrator to update | required |
| 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 | UpdateAdminRequest (JSON) | the user details of the administrator that should be updated. |
| application/merge-patch+json | UpdateAdminRequest (JSON) |
| code | condition |
|---|---|
| 204 | if the administrator was updated successfully |
| 400 | 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) |
| 404 | if no administrator exists with the given login (404001) |
| 409 | if there already is an administrator or organisation with the new login specified in the request (error code 409001) |
PATCH /admins/login/{login}
Content-Type: application/json
{
"login" : "TestAdmin",
"password" : "enigma",
"surname" : "Turing",
"forename" : "Alan",
"email" : "a.turing@example.org",
"phone" : "+49 69 1525 0"
}
HTTP/1.1 204 No Content
Deletes an administrator.
It is not possible to delete an administrator if it is the only one registered in the system. It is also not possible to delete ones own administrator account.
Access: System administrators only.
| name | type | description | constraints |
|---|---|---|---|
| login | path | of the administrator to delete | required |
| runas | query | optional login name whose identity is used to execute the request (only available to users with the RunAs privilege) |
| code | condition |
|---|---|
| 204 | if the administrator was deleted successfully |
| 401 | if the user is not authenticated (error code 401001) |
| 403 |
|
| 404 | if no administrator exists with the given login (404001) |
DELETE /admins/login/{login}
Content-Type: */*
...
HTTP/1.1 204 No Content