MT-EQuAl REST API
GET user/evaluations
Shows all evaluations done by the user on the specified project.
Endpoint
GET http(s)://hostname/api/user/evaluations
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. |
Request parameters | Type | Value |
---|---|---|
id | string | Required. The project id. |
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": {
"project": "the project id",
"username": "the user name",
"evaluations": [
{
"i": "the evaluation id",
"output_id": "the TU id",
"num": "the sentence id",
"text": "The output",
"username": "The user name",
"active": "true if the TU is active; false otherwise",
"revuser": "the reviewer id",
"isintra": ">1 if the TU is used to calculate the the intra-annotator agreement; 0 or 1 otherwise",
"project": "the project id",
"eval": "the evaluation number",
"type": "the evaluation type",
"label": "the evaluation label",
"min" : "the evaluation min value",
"max" : "the evaluation max value"
},
...
}
}
On error, the header status and description fields contain the error code and message, respectively.
Example
curl -X GET "https://mtequaldev.fbk.eu/api/user/evaluations" -H "X-Api-Key: {user access token}"
{
"header": {
"date": "Wednesday, 2016-06-08 12:00:44 Europe\/Paris",
"description": "Shows all evaluations done by the user on the specified project.",
"status": "200"
},
"result": {
"project": "7",
"username": "mark",
"X-Api-Key": "1479996347-15836f3bb6732b",
"evaluations": [
{
"i": 1,
"output_id": "1",
"num": 2149,
"text": "Translation TU 1 Sys 1",
"username": "mark",
"active": true,
"revuser": 15,
"isintra": 0,
"project": 7,
"eval": "2",
"type": "binary",
"label": "good",
"min": 1,
"max": 2
},
...
}