Remove an existing user or project permanently. This method doesn't need registration, it can be invoked using the admin secret token stored in the file app/config/parameters.yml..

Endpoint

GET http(s)://hostname/api/admin/remove

Request Parameters

Header field
Type Value
X-Api-Key
string Required. The secret token stored in the file app/config/parameters.yml.

Request data Type Value
type string Required. The type can be "user" or "project".

WARNING! Choosing to remove a "user" all information about his roles and evaluation for all projects will be lost.
WARNING! Choosing to remove a "project" all data about the project, includes the user roles and all evaluations will be lost.
id string Optional. The user or project id.

name string Optional. The username or project name.

Response

On success, the HTTP status code in the response header is 200 (OK) and the response is structured in JSON as follow:

{
  "header": {
    "date": "Date and time of the response generation process",
    "description": "Description of the invoked method or error message",
    "status": "status/error code"
  },
  "result": {
      "type": "type of removed data",
      "name": "removed username or project name"
  }
}

On error, the header status and description fields contain the error code and message, respectively.

Examples

  • REMOVE A USER
    curl -X GET "https://mtequaldev.fbk.eu/api/admin/remove?type=user&name=chris"
    {
      "header": {
        "date": "Monday, 2016-05-16 11:54:17 Europe/Paris",
        "description": "Removed an existing user",
        "status": "200"
      },
      "result": {
        "type": "user",
        "name": "chris"
      }
    }
                    
  • REMOVE A PROJECT
    curl -X GET "https://hostname/api/admin/remove?type=project&id=5" -H "X-Api-Key: {admin secret token}"
    {
      "header": {
        "date": "Monday, 2016-05-16 11:57:11 Europe/Paris",
        "description": "Removed an existing project",
        "status": "200"
      },
        "result": {
          "type": "project",
          "name": "Test-20160701"
        }
      }