Returns the list of requests (both accepted and declined) for the specified user.

Endpoint

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

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": {
      "requests": [{
        "id":	"The project id",
        "name": "The project name",
        "role": "The assigned role",
        "role_status": "The status of the role",
        "created": "The creation date",
        "activated": "The accepted or declined date",
        "hash": "The unique hash code associated to this request"
      }]
  }
}

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

Example

curl -X GET "https://hostname/api/user/requests" -H "X-Api-Key: {user access token}"
{
	"header": {
		"date": "Wednesday, 2016-06-08 12:00:44 Europe\/Paris",
		"description": "Returns the list of requests (both accepted and declined) for the specified user.",
		"status": "200"
	},
	"result": {
        "requests": [
            {
                "id": 1
                "name": "Project test",
                "role": "evaluator",
                "role_status": "pending",
                "created": "2016-06-09 17:31:21",
                "activated": "2016-07-01 01:16:14",
                "hash": "02491c84b926e9b1df69e0daa47ef0f8"
            },
            ...
        ]
	}
}