Returns the list of users registered to the system. Each registered user can search in his/her own private list of contacts, which includes only the users that invited him/her or were invited by him/her in previous projects.

Endpoint

GET http(s)://hostname/api/user/list

Request Parameters

Header field
Type Value
X-Api-Key
string Required. A valid access token from a registered MT-EQuAl account. The access token must have been issued on behalf of the current user.

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": {
		"size": "Number of users in the MT-EQuAl release installed on the specified hostname",
		"users": [{
			"id": "The user id",
			"username": "The user name",
        	"firstname": "The user's first name",
            "lastname": "The user's last name",
            "affiliation": "The user's affiliation",
            "email": "The user's first name",
            "roles": [
                "The user's roles"
            ],
            "registered": "Date and time of the registration process",
            "logged": "Date and time of the last login"
		}]
	}
}

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

Example

curl -X GET "https://hostname/api/user/list" -H "X-Api-Key: {user access token}"
{
	"header": {
		"date": "Wednesday, 2016-06-08 12:00:44 Europe\/Paris",
		"description": "Returns the list of users registered to the system",
		"status": "200"
	},
	"result": {
		"size": 1,
		"users": [{
			"id": 1,
			"username": "tom",
			"firstname": "Tom",
			"lastname": "",
			"affiliation": "Vendor",
			"email": "mtequalfbk@gmail.com",
			"roles": [
				"evaluator"
			],
			"registered": "Thursday, 2015-11-05 14:30:01 Europe\/Paris",
			"logged": "Wednesday, 2015-12-16 15:08:58 Europe\/Paris"
		}]
	}
}