MT-EQuAl REST API
GET admin/show
Returns the whole list of projects and users on this instance. 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/show
Header field
|
Type | Value |
---|---|---|
X-Api-Key |
string | Required. The secret key stored in the file app/config/parameters.yml. |
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": {
"projects": "list of the projects",
"users": "list of the users"
}
}
On error, the header status and description fields contain the error code and message, respectively.
Examples
curl -X GET "https://hostname/api/admin/show" -H "X-Api-Key: {admin secret token}"
{
"header": {
"date": "Monday, 2016-05-16 11:54:17 Europe/Paris",
"description": "Statistics about MT-EQuAl [by administrator access only]",
"status": "200"
},
"result": {
"projects": [
{
"id": 1,
"name": "test_tree",
"type": "tree",
"ranges": "[{\"color\": \"444444\",\"label\": \"Is source segment OK?\", \"val\": 1},{\"color\": \"444444\",\"label\": \"Is all information preserved?\", \"val\": 2},{\"color\": \"444444\",\"label\": \"Is main noun (phrase) identifying item translated correctly?\", \"val\": 3},{\"color\": \"444444\",\"label\": \"Is the translation alone easy to read and understand?\", \"val\": 4},{\"color\": \"444444\",\"label\": \"Are brand names correctly translated?\", \"val\": 5}]",
"active": true,
"modified": {
"date": "2016-05-28 12:04:41.000000",
"timezone_type": 3,
"timezone": "Europe\/Paris"
}
},
...
...
],
"users": [
{
"id": 1,
"firstname": "Mario",
"lastname": "Rossi",
"username": "mrossi",
"email": "mario_rossi@mariorossi.com",
"affiliation": "Vendor",
"roles": [
"reviewer"
],
"active": true,
"logged": {
"date": "2016-06-29 02:42:54.000000",
"timezone_type": 3,
"timezone": "Europe\/Paris"
},
"registered": {
"date": "2015-11-05 14:30:01.000000",
"timezone_type": 3,
"timezone": "Europe\/Paris"
}
},
...
...
]
}
}