/admins/login/{login} Resource

Administrative Accounts for system administrators.

GET /admins/login/{login}

Returns an administrator based on her login name.

Access: System administrators only.

Request Parameters
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)  
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)
404 if no administrator exists with the given login (404001)
Response Body
media type data type description
application/json Admin (JSON) an administrator

Example

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

                
...
                
              
Response
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"
}
                
              

PATCH /admins/login/{login}

Updates an administrator.

Access: System administrators only.

Request Parameters
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)  
Request Body
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)
Response Codes
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)

Example

Request
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"
}
                
              
Response
HTTP/1.1 204 No Content

              

DELETE /admins/login/{login}

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.

Request Parameters
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)  
Response Codes
code condition
204 if the administrator was deleted successfully
401 if the user is not authenticated (error code 401001)
403
  • if the user is not authorized to access administrators (error code 403001),
  • if it is the only administrator in the system (403002) or
  • if an administrator tries to delete her own account.
404 if no administrator exists with the given login (404001)

Example

Request
DELETE /admins/login/{login}
Content-Type: */*

                
...
                
              
Response
HTTP/1.1 204 No Content