MT-EQuAl REST API
GET project/show
Returns all information associated with the specified project. The output includes the project name, description, evaluation format, user list, and guidelines.
Endpoint
GET http(s)://hostname/api/project/show
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 data | Value 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": {
"settings": {
"id": "The project id",
"name": "The project name",
"description": "The project description",
"evalformat": {
"type": "The evaluation format type: binary, scale, ranking, or tree",
"ranges": "The evaluation format ranges",
"requiref": "true to require references; false otherwise"
},
"guidelines": {
"specification": {
"randout": "true to sort randomly the TUs; false otherwise",
"blindrev": "true to blind the evaluators' names; false otherwise",
"maxdontknow": "The maximum number of don't know answers",
"intragree": "percentage of TUs to use to calculate the intra-annotator agreement",
"pooling": "The pooling algorithm: bowins"
},
"instructions": "The project instructions"
},
"created": "creation date"
},
"users": "list of users involved in the project",
"tasks": "list of tasks in which the project is split",
"progress": "evaluation progress"
}
}
}
Example
curl -X GET "https://hostname/api/project/show?id=1" -H "X-Api-Key: {user access token}"
{
"header": {
"date": "Friday, 2016-11-04 17:46:16 Europe\/Paris",
"description": "Returns all information associated with the specified project. The output includes the project name, description, evaluation format, user list, and guidelines.",
"status": "200"
},
"result": {
"project": {
"settings": {
"id": 12,
"name": "project-test-api",
"description": "This is a scale 1-4 project",
"evalformat": {
"type": "scale",
"ranges": [
{
"color": "#ff0000",
"label": "very bad",
"val": 1
},
{
"color": "#ff8000",
"label": "bad",
"val": 2
},
{
"color": "#ffbf00",
"label": "good",
"val": 3
},
{
"color": "#40ff00",
"label": "very good",
"val": 4
}
],
"requiref": true
},
"guidelines": {
"specification": {
"randout": true,
"blindrev": true,
"maxdontknow": 5,
"intragree": 0.5,
"pooling": "bowins"
},
"instructions": "These are the instructions"
},
"created": "Friday, 2016-11-04 17:02:17 Europe\/Paris"
},
"users": [
{
"id": 3,
"username": "tom",
"email": "tom@company.com",
"role": "evaluator",
"status": "accepted",
"created": {
"date": "2016-11-04 17:02:31.000000",
"timezone_type": 3,
"timezone": "Europe\/Paris"
},
"activated": {
"date": "2016-11-04 17:02:34.000000",
"timezone_type": 3,
"timezone": "Europe\/Paris"
},
"inviter": 45
},
{
"id": 50,
"username": "bob",
"email": "bob@company.com",
"role": "owner",
"status": "accepted",
"created": {
"date": "2016-11-04 17:02:17.000000",
"timezone_type": 3,
"timezone": "Europe\/Paris"
},
"activated": {
"date": "2016-11-04 17:02:17.000000",
"timezone_type": 3,
"timezone": "Europe\/Paris"
},
"inviter": 50
},
{
"id": 4,
"username": "mary",
"email": "mary@company.com",
"role": "admin",
"status": "accepted",
"created": {
"date": "2016-11-04 17:02:37.000000",
"timezone_type": 3,
"timezone": "Europe\/Paris"
},
"activated": {
"date": "2016-11-04 17:02:41.000000",
"timezone_type": 3,
"timezone": "Europe\/Paris"
},
"inviter": 1
}
],
"tasks": [
{
"id": 75,
"task": "creation",
"completed": true,
"disabled": true,
"modified": {
"date": "2016-11-04 17:02:17.000000",
"timezone_type": 3,
"timezone": "Europe\/Paris"
},
"duedate": null,
"user": 50,
"username": "bob"
},
{
"id": 76,
"task": "evalformat",
"completed": true,
"disabled": true,
"modified": {
"date": "2016-11-04 17:02:22.000000",
"timezone_type": 3,
"timezone": "Europe\/Paris"
},
"duedate": null,
"user": 1,
"username": "mary"
},
{
"id": 77,
"task": "import_corpus",
"completed": true,
"disabled": true,
"modified": {
"date": "2016-11-04 17:02:24.000000",
"timezone_type": 3,
"timezone": "Europe\/Paris"
},
"duedate": null,
"user": 1,
"username": "mary"
},
{
"id": 78,
"task": "guidelines",
"completed": true,
"disabled": true,
"modified": {
"date": "2016-11-04 17:02:24.000000",
"timezone_type": 3,
"timezone": "Europe\/Paris"
},
"duedate": null,
"user": 1,
"username": "mary"
},
{
"id": 79,
"task": "check_corpus",
"completed": true,
"disabled": true,
"modified": {
"date": "2016-11-04 17:02:42.000000",
"timezone_type": 3,
"timezone": "Europe\/Paris"
},
"duedate": null,
"user": 1,
"username": "mary"
},
{
"id": 82,
"task": "evaluation",
"completed": true,
"disabled": true,
"modified": {
"date": "2016-11-04 17:15:03.000000",
"timezone_type": 3,
"timezone": "Europe\/Paris"
},
"duedate": null,
"user": 3,
"username": "tom"
},
{
"id": 80,
"task": "finalize",
"completed": false,
"disabled": true,
"modified": {
"date": "2016-11-04 17:15:44.000000",
"timezone_type": 3,
"timezone": "Europe\/Paris"
},
"duedate": null,
"user": 50,
"username": "mary"
}
],
"progress": [
{
"user": "3",
"num": "12"
},
{
"user": "5",
"num": "12"
}
]
}
}
}}