API Access
External programs, legacy systems, programmers using console or API clients can access the full solution functionalities using the generic APIs.
The updated description of APIs can be found at the following repositories:
- https://corporateapi2.docs.apiary.io/# (text processing),
- https://pgfile.docs.apiary.io/# (document processing) and
- http://prodb.pangeamt.com:8000/docs (anonymization)
- Pecat API (no online repo)
Pangeanic’s API is a simple RESTFul implementation where typically the requests are sent as POSTs with a json encoded body.
When handling files the content is sent or received in base-64 encoded form.
As an example, the API definition for the translation of a single sentence would be:
POST to endpoint: https://production_access_server_url:8080/NexRelay/v1/translate
Headers: Content-Type : application/json
Request Body: { "src":"en",
"tgt":"es",
"apikey":"your_api_key",
"engineid":"your_engine_id",
"text":[
"This is an example." ] }
Answer Body: [ [ { "src": "This is an example.", "tgt": "Esto es un ejemplo." } ]
Both https and http endpoints are configurable in the Access Server.
Text Processing API
HOST: http://prod.pangeamt.com:8080/NexRelay/v1/
List Engines [/corp/engines]
- List All available engines [POST]
This edpoint is required to list the list of IDs of the available engines fo your APIKey
Request (application/json)
{
Response 200 (application/json)
{
"engines": [
{
"id": 1,
"processid": 1,
"serviceid": 1,
"inserviceid": 0,
"src": "en",
"tgt": "es",
"descr": "ENES_B_plain",
"domain": "",
"flavor": "",
"status": 0
},
{
"id": 2,
"processid": 1,
"serviceid": 2,
"inserviceid": 0,
"src": "es",
"tgt": "en",
"descr": "ESEN_generic",
"domain": "",
"flavor": "",
"status": 0
}
]
}
Process text [/translate]
- Process a text segment [POST]
A text segment is a number of words, processing works best if the segment is a sentence with whole semantic content.
- src and tgt are 2-letter language codes
- engine is the id (string) of the engine to be used
- glossary_id, optional, is the id (integer) of the glossary to be used
Request (application/json)
{
"src": "es",
"tgt": "en",
"apikey": "your-api-key-here",
"engine": "2",
"glossary_id": 1,
"text": [
"¿Cómo estás?",
"Mi perro es negro"
]
}
Response 200 (application/json)
[
[
{
"src": "¿Cómo estás?",
"tgt": "How are you?"
}
],
[
{
"src": "Mi perro es negro",
"tgt": "My dog is black"
}
]
]
Document Processing API
HOST: http://prod.pangeamt.com:8080/PGFile/v1
File Uploading [/sendfile]
- Send a File [POST]
Main request. Send a file to the service for translation.
The process parameters have to be included
The success response is a json with file guid.
Request
=multipart/form-data;boundary=----WebKitFormBoundary8M3sSU13ul5lXSJm)
--WebKitFormBoundary8M3sSU13ul5lXSJm
Content-Disposition: form-data; name="json"
{
"title": "filename.docx",
"processname": "translation",
"engine": "123",
"src": "es",
"tgt": "en",
"apikey": "your-apikey-here",
"username": "testuser",
"notiflink": "testlink",
"processoption": "1"
}
--WebKitFormBoundary8M3sSU13ul5lXSJm
Content-Disposition: form-data; name="file"; filename="filename.docx"
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
[data of the DOCX file goes here]
--WebKitFormBoundary8M3sSU13ul5lXSJm--
Response 200 (application/json)
{
"fileId": "8d4e1c5be60d4e04850f55ec135f2554"
}
Response 500 (application/json)
{ "error": true, "error_message" : "the-error-message" }
Checking file status [/checkfile?apikey&fileid] Use /checkfile to get the processing status of a file, this is a json post where body can have three forms:
- just the apikey, the response will return info about all files being processed for the apikey.
- guid, to get info about a single file
The returned answer is a json list containing one json object for every file.
The important field returned for every file is the status, an integer with possible values
- 10, file is queued for process at the server - 6 or 7, file is being analyzed - 20, 30 or 40, file is being processed - 100, file processed successsfully, waiting download - 110 or 120, file downloaded - -10 or -20 (negative values), processing error
- Check the processing status of a file [GET]
Response 200 (application/json)
[
{
"fileId": "1dc77dc5ba6d44828b860537dae07187",
"translatedPath": null,
"engineId": 58,
"glossaryId": 0,
"src": "es",
"tgt": "en",
"isZip": false,
"ztot": 0,
"zfinished": 0,
"translatedName": null,
"processName": "translate",
"processOptionId": 1,
"link": "",
"status": 10,
"id": 16567,
"fileName": "test.txt"
}
]
## Checking and downloading file [/retrievefile]
This is a POST request that can be used to get info about a file that is being processed and download the processed file is process has finished.
- WARNING this endpoint is NOT safe for very big files: the file is returned in base64
encoding and requires a lot of memory at server and client side.
When file is finished a 200 response is returned with the file. If file is in processs a 200 response is returned with the status data.
Errors will generate a 401 response.
- Check and get File [POST]
Request (application/json)
{ "apikey": "your-api-key-here", "guid": "1dc77dc5ba6d44828b860537dae07187" }
Response 200 (application/json)
- response when file is not finished
{ "success": True, "error": {}, "status": "10", "data": {} }
# response when file is finished
{ "success": True, "error": {}, "status": "110", "data": { "guid": "d74b06fd52434ad2bfbe82ebbff96464", "fileType": "txt", "filename": "test.txt", "file": "U2VlIHRoaW5ncyB0byBkbywgcmVzdGF1cmFudHMsIGFuZCBob3RlbHMNCg==" } }
Response 401 (application/json)
{ "success": False, "error": { "statusCode": 401, "code": 6, "message": "Invalid GUID" }, "data": {} }
Downloading file [/download?apikey&fileid]
Simple get request to retrieve a file. The get parameters are:
- apikey - fileid, the file GUID
The file is returned as a stream (similar to a call to wget)
- Send a File [GET]
Response 200 (application/json)
Anonymization API
Anonymize a file [/anonymize/xliff]
Anonymize a file [POST]
Main request. Send an XLIFF file to the service for anonimization.
Anonymize an XLIFF(XML Localization Interchange File Format) file. The request body must be Content-Type multipart/form-data
- noqa Args:
- anon_dict: TAGs, entities pairs that should be anonymized.
- clear_list: entities that should not be anonymized
- model: pre-trained model to use, default ner-fast
- lang: language of the XLIFF file, default en_US.UTF-8 Please refer to default.json file for more info # noqa Returns: A dictionary with the
following keys:
- status: true or false,
- message: the NN response of the anonimization process.
- anon_sentence: If status is true, contains the anonymized sentence with
the entities recognized between brackets. # noqa
Example body payload: { "model_lang": "en", "anon_dict": [ { "entity": "string", "name": "string", "path": "string" } ], "clear_list": [ "string" ], "anon_list_tagset": [], "sensibility": 0, "mask": "TAG:idx", "profile_id": 1, "sentence": "string" }
Responses Code: 200, returns anonymized sentence Code 500, validation error, returns:
{ "detail": [ { "loc": [ "string" ], "msg": "string", "type": "string" } ] }
Pecat API
Constants used when using the API
Projects
working
Jobs
job types
translation types
Preparation status values
JOB_PREPSTATUS_CREATED = 0 // job defined, TUs loading in tables
JOB_PREPSTATUS_LOADED = 1 //TUs loaded, job can be prepared, bundling possible
JOB_PREPSTATUS_PREPAREREQUESTED = 2 //PM has requested preparation
JOB_PREPSTATUS_PREPARING = 3 // job being prepared
JOB_PREPSTATUS_PREPARED = 4 // job fully prepared
Status values , for every job two status are always kept for worse & best status of the included TUs/Bundles
JOB_STATUS_ERROR = -1 // Job failed loading or preparing
JOB_STATUS_CREATED = 0 // Job successfully created
JOB_STATUS_LOADED = 1 // Job TUs loaded
JOB_STATUS_PREPARING = 2 // Job being prepared
JOB_STATUS_UNBUNDLED = 3 // Job requiring bundling, some TUs not bundled
JOB_STATUS_BUNDLED = 4 // TUs bundled
JOB_STATUS_ASSIGNED = 5 // bundles assigned
JOB_STATUS_TRANSLATING = 6 // bundles translating
JOB_STATUS_EVALUATING = 7 //TUs being evaluated
JOB_STATUS_TRANSLATED = 8 // All TUs translated
JOB_STATUS_DELIVERING = 9 // Deliveries done
JOB_STATUS_DONE = 10 // Job finished
Bundles
Activity bundle status,
TUs constants
Translation code, reasons for a source not to be translated
Translation status , applied to main and alternative transations
Qastatus , how QA is for a TU
Qestatus, how QE is for a TU. When bundling some TUs are randomly selected for QE
TU Status
TU_STATUS_CREATED = 0 //no translation has been done TU_STATUS_PREPARED = 1 //TU prepared TU_STATUS_TRANSLATED = 2 //translation finished TU_STATUS_QAED = 3 //QA finished TU_STATUS_QED = 4 //QA evaluated TU_STATUS_DONE = 5 // No more work required TU_STATUS_REWORK = 6 // like CREATED, after some work has been done TU_STATUS_FREED = 7 // like CREATED, after translator has been unassigned
TU_REVSTATUS_SKIPPED = 6; //the revision will not be done
Eval SubTypes
0: Under-translation
1: Untranslated text
Eval Criticity
0: Preferential
1: Minor
2: Major
3: Critical
Bundle-TU relation
Status
0: Normal
1: Old // TU belonged to this bundle but was unassigned
Deliveries
0: standard (all QAed TUs of bundles whose QEScore > 90)
1: fine (Only TUs which idinbundle< smallest badQE)
2: unconditional (all QAEd TUs)
5: Emergency (All TUs, use pretrans if not translated)
Status Values
-1: error
0: requested
1: preparing
2: Done
[ { "id": 1,
"name": "Project1",
"descr": "P1 description",
"customerid": 2,
"pmid": 1,
"status": 1,
"statusmsg": “Loaded”,
"kpis": {
"tus": 101576,
"preparedtus": 0,
"bundledtus": 0,
"assignedtus": 0,
"translatedtus": 0,
"untranslatedtus": 0,
"unalttranslatedtus": 0,
"QAedTus": 0,
"QAposTus": 0,
"QAnegTus": 0,
"QAFPTus": 0,
"QEplannedTus": 0,
"QEposTus": 0,
"QEnegTus": 0,
"QEScore": 0, "progress": 0, "jobs": 11 } }, { "id": 2,
"name": "Project4",
"descr": "P4 description",
"customerid": 4,
"pmid": 5,
"status": 0,
"statusmsg": “Created”,
"kpis": {
"tus": 101576,
"preparedtus": 0,
"bundledtus": 0,
"assignedtus": 0,
"translatedtus": 0,
"untranslatedtus": 0,
"unalttranslatedtus": 0,
"QAedTus": 0,
"QAposTus": 0,
"QAnegTus": 0,
"QAFPTus": 0,
"QEplannedTus": 0,
"QEposTus": 0,
"QEnegTus": 0,
"QEScore": 0,
"progress": 0,
"jobs": 11
]
/
addproject Create a new project. Name and customerid are mandatory, PMid is optional, can be set later. The response contains the id of new project, and 0 if the process failed. POST
Body;
{ "name":"PxProject",
"descr":"Description of the project",
"customerid":1,
"pmid":2 //optional
}
Response: { "projectid": 3 }
/archiveproject
Moves all project assets to archive (project, jobs, bundle, tus and relations). Archived projects can only be deleted or un-archived.
POST
Body: { "id": 4, } Response:
{ "rc": 0 //0 if no error! }
/delproject
Deletes a project, its jobs, tus and bundles. This process cannot be undone, all references to the project, jobs, bundles and tus are deleted in the database and cannot be recovered. POST Body:
{ "id": 4,
}
{
"rc": 0 //0 if no error!
}
/editproject Change existing project values. The body can contain any combination of new values and only the id to identify the project is required. Change of status might interfere with the internal dynamic of status propagation POST Body: { "id": 4,
"name":"PxProject4", //opt
"descr":"PPDesc", //opt
"pmid": 4, //opt
"cutomerid": 4, //opt
"status": 1 //opt }
Response: { "projectid": 4 }
/projectlog Get the log contents for the project. An array is returned containing the relevant events affecting the project. POST
Body:
{
"id": 4 //the project id
}
Response:
[
{
"id": 32,
"ts": 1596898208000,
"date": "2020-08-08 14:50:08.0",
"actorid": 0,
"actionid": 2,
"objectid": 12,
"rc": 0,
"descr": "Project created"
},
{
"id": 47,
"ts": 1596898335000,
"date": "2020-08-08 14:52:15.0",
"actorid": 0,
"actionid": 2,
"objectid": 12,
"rc": 0,
"descr": "Project status changed to 1"
}
prepareproject
Request preparation of existing project, triggers preparation of all jobs. The response is received immediately, and preparation is executed asynchronously generating events for the project and its jobs. POST Body:
{
"id": 4,
} Response:
{
"rc": 0 //0 if no error!
}
/
jobs
Get the list of all jobs with data required to show lists. The projectid in the request as a get query parameter) is optional and its purpose is to filter only jobs belonging to the project. The response is a json array, each item containing the full data for a job, counters and current kpis.
GET Parameters: (optional)
jobid, to get data of a single job
Response:
[ {
"id": 1,
"projectid": 1,
"name": "report_tgt_equal_tgt2.txt",
"src": "it-IT",
"tgt": "uk",
"jobtype": 0,
"transtype": 0,
"QEbundling": 0,
"QEbundlesize": 100,
"wstatus": 0,
"wstatusmsg": “Created”,
"bstatus": 0,
"bstatusmsg": “Created”,
"startts": "1970-01-15 00:00:00.0",
"duets": "1970-01-15 00:00:00.0",
"kpis": {
"tus": 40000,
"preparedtus": 0,
"translatedtus": 4,
"untranslatedtus": 0,
"unalttranslatedtus": 0,
"QAedTus": 0,
"QAposTus": 0,
"QAnegTus": 0,
"QAFPTus": 0, "progress": 0.004999999888241291 } }, { "id": 2,
"projectid": 1,
"name": "report_tgt_equal_tgt2.txt",
"src": "es",
"tgt": "en",
"jobtype": 0,
"transtype": 0,
"QEbundling": 0,
"QEbundlesize": 100,
"wstatus": 0,
"bstatus": 0,
"startts": "1970-01-15 00:00:00.0",
"duets": "1970-01-15 00:00:00.0",
"kpis": {
"tus": 10000,
"preparedtus": 0,
"bundledtus": 10000,
"assignedtus": 0,
"translatedtus": 1,
"untranslatedtus": 0,
"unalttranslatedtus": 0,
"QAedTus": 0,
"QAposTus": 0,
"QAnegTus": 0,
"QAFPTus": 0,
"QEplannedTus": 0,
"QEposTus": 0,
"QEnegTus": 0,
"QEScore": 0,
"progress": 0,
"bundles": 2 } } ]
/addjob Create a new job for a project, uploading the TSV file and defining job-level parameters. The response is a json object with informations about the creation and the counters of the file.
Note: Adding a job synchronously uploads and counts lines, words and characters but the creation of TUs in the database is triggered and will run asynchronously. POST form-data Body, key values:
Response:
{ "message": "Job file uploaded to : /home/ubuntu/jobs/chunk143_agriculture machinery_tourism_hotel.txt",
"jobid": 7,
"lines": 5394,
"words": 61114,
"chars": 445714 }
/joblog
Get the log contents for the job. An array is returned containing the relevant events affecting the project.
POST
Body:
{
"id": 4 //the job id
}
Response:
[
{ "id": 32,
"ts": 1596898208000,
"date": "2020-08-08 14:50:08.0",
"actorid": 0,
"actionid": 2,
"objectid": 12,
"rc": 0,
"descr": "Job best status changed to 6"
},
{
"id": 47,
"ts": 1596898335000,
"date": "2020-08-08 14:52:15.0",
"actorid": 0,
"actionid": 2,
"objectid": 12,
"rc": 0,
"descr": "Job best status changed to 6" }
/editjob
Change existing job parameters. The id is required and the only interesting values to change are the start and duedate (in long millisecs values). Changing status is usually pointless because their values will be internally recalculated.
POST Body:
{ "id": 4,
"src":"it-IT", //opt
"tgt":"en-US", //opt
"wstatus": 3, //opt
"bstatus": 4 //opt
"startts": 1234567890 //opt
"duets": 1234567890 //opt } Response:
{
"jobid": 4 }
/deliverjob
Generates a TSV, with all translated TUs. Three modes are possible: - 0, normal, the delivery TSV contains the translated TUs of bundles whoseQEScore are > than a threshold entered by the PM (90 as default)
- 1, unconditional, all translated TUs are delivered
- 2, emergency, all TUs are delivered, untranslated TUs are delivered with the pre-translation.
The response informs of how many TUs were in the delivery, what was the final QEScore and two links, one for the delivery TSV and another one with the QA report.
POST
Body:
{
"id": 4,
"mode": 0,
"qescoremin": 85 //only used for mode 0 } Response:
{ "rc": 0 //0 if no error!
"tsvlink": "http://pgwf.pangeamt.com/deliveries/jdshakhdwewqlkdsamn.tsv" , "qareportlink": "http://pgwf.pangeamt.com/deliveries/jdshakhdwewqln.tsv"
"tus": 1234,
"qescore": 90, }
/getjobdeliveries
Get the list of all deliveries done for a job.
GET
Body: (optional)
{
"jobid": 1
}
Response:
[ { "id": 1,
"deliverydate": "1970-01-15 00:00:00.0",
"tsvfilename": "xxxxx.tsv",
"qareportfilenamename": "zzzzzz.txt",
"tus": 12345,
"mode": 0,
"kpis": {
"tupct": 80,
"qescore": 90,
"qaissues": 12,
"untranslatedtus": 5,
"unalttranslatedtus": 7
},
{ "id": 2,
"deliverydate": "1970-01-15 00:00:00.0",
"tsvfilename": "xxxxx.tsv",
"qareportfilenamename": "zzzzzz.txt",
"tus": 12345,
"mode": 0,
"kpis": {
"tupct": 80,
"qescore": 90,
"qaissues": 12,
"untranslatedtus": 5,
"unalttranslatedtus": 7
}
} /
/deljob
Deletes job, its tus and bundles. This action cannot be undone and all the job data is deleted from the database. POST Body:
{
"id": 4, }
Response:
{
"rc": 0 //0 if no error!
}
/preparejob
Request preparation of existing job. Same functionality and process than /prepareproject but at joblevel.
POST Body; {
"id": 4,
}
Response:
{
"rc": 0 //0 if no error!
}
/bundles
Get the list of all bundles with data required to show lists.
GET Query parameters (optional and exclusive):
- jobid, to restrict the answer to the bundles of a job - actorid, to restrict the answer to the bundles assigned to an actor as translator - bundleid, to restrict the answer to a single bundle Response: [{
"id": 141,
"jobid": 64,
"start": 0,
"end": 0,
"bundletype": 0,
"qamode": 0,
"qemode": 3,
"status": 5,
"statusmsg": "translating",
"actorid": 3,
"reviewerid": 4,
"evaluatorid": 0,
"actstatus": 0,
"actstatusmsg": "Normal",
"startts": "2020-09-17 00:00:00.0",
"duets": "2020-09-17 00:00:00.0",
"jobtype": 0,
"translationtype": 0,
"src": "en",
"tgt": "de",
"allowhistrev": 0,
"kpis": {
"tus": 100,
"words": 747,
"chars": 3843,
"preparedtus": 100,
"bundledtus": 100,
"assignedtus": 100,
"translatedtus": 55,
"untranslatedtus": 9,
"unalttranslatedtus": 0,
"QAedTus": 53,
"QAposTus": 26,
"QAnegTus": 0,
"QAFPTus": 27,
"reviewedtus": 100,
"reviewedOKtus": 11,
"reviewedKOtus": 1,
"reviewedchangedtus": 0,
"QEplannedTus": 0,
"QEposTus": 0,
"QEnegTus": 0,
"QEScore": 0,
"QAScore": 0,
"revScore": 1,
"GdAvg": 55,
"progress": "55.0",
"preparationprogress": "100.0",
"translationprogress": "55.0",
"revisionprogress": "100.0",
"evaluationprogress": "0.0" }
},
{ "id": 2,
"jobid": 4,
"start": 101,
"end": 200,
"bundletype": 0,
"qamode": 0,
"qemode": 0,
"status": 0,
"statusmsg": “Created”,
"autorId": 0,
"evaluatorId": 0,
"startts": "1970-01-15 00:00:00.0",
"duets": "1970-01-15 00:00:00.0",
"jobtype": 0,
"translationtype": 0,
"src": “en”,
“tgt”:”es”,
"translationtype": 0,
"kpis": {
"tus": 0,
"words": 0,
"chars": 0,
"preparedtus": 0,
"bundledtus": 0,
"assignedtus": 0,
"translatedtus": 0,
"untranslatedtus": 0,
"unalttranslatedtus": 0,
"QAedTus": 0,
"QAposTus": 0,
"QAnegTus": 0,
"QAFPTus": 0,
"QEplannedTus": 0,
"QEposTus": 0,
"QEnegTus": 0,
"QEScore": 0,
"progress": 0 }
},
{ "id": 3,
"jobid": 4,
"start": 201,
"end": 300,
"bundletype": 0,
"qamode": 0,
"qemode": 0,
"status": 0,
"statusmsg": “Created”,
"autorId": 0,
"evaluatorId": 0,
"startts": "1970-01-15 00:00:00.0",
"duets": "1970-01-15 00:00:00.0",
"kpis": {
"tus": 3,
"preparedtus": 0,
"bundledtus": 3,
"assignedtus": 0,
"translatedtus": 1,
"untranslatedtus": 0,
"unalttranslatedtus": 0,
"QAedTus": 0,
"QAposTus": 0,
"QAnegTus": 0,
"QAFPTus": 0,
"QEplannedTus": 0,
"QEposTus": 0,
"QEnegTus": 0,
"QEScore": 0,
"progress": 16.66666603088379 } } ]
/addbundle
Create a new bundle for a job. Note: If parameter tus is specified the bundle will include that number of free tus. Alternatively start and end (inclusive both) can be used.
POST Body:
{
"jobid":4,
"tus":100,
"type":1, //optional, 0 (translation, by default)
"qamode":1, //optional, (0 default)
"qemode":1, //optional, (0 default)
"startts": 12334566665, //optional, long int
"duets": 12334566665, //optional, long int
}
Response: { "bundleid": 2,
"status": 0,
"reason": "Bundle created successfully",
"TUs": 1000
}
/addbundles Create a new bundle for a job.
Note: This is the recommended way to define bundles for a project. When less than the required nbundles*tus are available nbundles is internally recalculated to create all bundles with the same number of TUs. In this case the last bundle can contain less bundles.
The response is an array of one-bundle responses.
POST
Body:
{
}
Response:
[ { "bundleid": 2,
"status": 0,
"reason": "Bundle created successfully",
"TUs": 1000
},
{ "bundleid": 2,
"status": 0,
"reason": "Bundle created successfully",
"TUs": 1000 },
{
"bundleid": 3,
"status": 0,
"reason": "Bundle created successfully",
"TUs": 1000
},
{
"bundleid": 4,
"status": 0,
"reason": "Bundle created successfully",
"TUs": 1000 } ]
/pausebundle
Set ACTstatus=1 for the bundle, the bundle is paused and no translator/evaluator actions are allowed POST
Body:
{
"id": 4 //the bundle id }
Response: { "rc": 0 }
/resumebundle
Set ACTstatus=0 for the bundle, the bundle is resumed, in normal state and translations and evaluations can be processed. POST
Body:
{
"id": 4 //the bundle id
}
Response:
{
"rc": 0
}
/bundlelog Get the log contents for the bundle. An array with the relevant events for the bundle is returned. POST
Body:
{
"id": 4 //the bundle id
}
Response:
[
{
]
/editbundle
Change existing bundle parameters. Status change is pointless as it will be recalculated internally POST Body:
{
} Response:
{
}
/delbundle Deletes bundle (not the TUs!), the bundle data is deleted from the database and TUs are freed for later bundling and assignation. POST Body:
{
}
Response:
{
}
/assignbundle Assign the bundle to translator/posteditor, reviewer or evaluator. This action does NOT notify the actor.
POST
Body:
{
}
Response:
{
}
/changeallowhistrev
Change the flag allowing actors to access TUs history. The flag has either value 0 (no permission) or 1 (permission granted. Calling this API will swap values. Only one parameter is passed: the id of the bundle.
POST
Body:
{
}
Response:
{
}
/bookmarkbundle
Change the bookmark flag for a bundle
POST Body:
{
}
Response:
{
}
/freebundle Free the TUs from a bundle for re-bundling. The affected TUs are reset for rework no matter the status they were in
POST
Body:
{
"id": 4,
"mode": 0 //opt, 0 by default: full release. 1 free pending, 2 free some
"tus": 10 //used when mode=2, number of pending tus to release
}
Response:
{
"bundleid": 4
}
/addtustobundle Add free TUs to an existing bundle. The new added TUs (always to be reworked) will generate planned evaluations with an even distribution at 0-5-10% rate according to the bundle definition. The number of TUs to add is a maximum, actual added TUs might be less if there are not enough free TUs.
POST
Body:
{
"id": 4, //id of the bundle to add the tus
"tus": 100, //number of tus to add (if enough tus are available!) }
Response: {
}
/translatetu
A tu or alt-tu is translated by a translator, notice the bundleid is mandatory. This request is sent by CAT tools when a translator confirms a translation. This action will trigger immediately QA request on the received translation.
POST Body: {
}
Response:
{
}
{
{
}, {
}, {
} ] }] } }
/reviewtu A tu or alt-tu is reviewed by a reviewer, notice the bundleid is mandatory. The revstatus indicates which input data is mandatory. For status 0,1,2,4,5, that is when the translation is NOT changed the mandatory fields are id, bundleid, actorid and revstatus. For status 3 (translation changed) the fields translation, alt-translation and transcode have to be sent also.
POST
Body:
{
}
Response:
{
"rc": 0
}
/reviewallpending
Used to update review status to 2 (STATUS_OK) for all TUs of a bundle which review is not done (0,1 and 5) and have finished trans (with no QA Pending)
POST Body:
{
}
Response:
{
}
/confirmtu
A tu or alt-tu with required QA confirmation is confirmed by a translator as a ‘false-positive’, notice the bundleid is mandatory. Request sent by the CAT tool to confirm the translator has payed attention to the potential issue and has marked it as false positive. The response includes the TU QAStatus after the action. POST Body:
{
}
Response:
{
}
/evaluatetu
A tu or alt-tu is evaluated by an evaluator, notice the bundleid is mandatory. The id has to correspond to a TU defined as candidate for QE. This request is sent from a QETool when an evaluator finishes the evaluation of a translation.
POST
Body:
{
}
Response:
{
}
/savetu
A tu or alt-tu is saved by a translator, notice the bundleid is mandatory. The id has to correspond to a TU.
POST
Body:
{
}
Response:
{
}
/marktu
A tu is marked by an actor, notice the bundleid is mandatory. The id has to correspond to a TU. POST Body:
{
}
Response:
{
}
/logtu
Get the log contents for the tu
POST
Body:
{
}
/preparetus
Used by 3rd-party to fill preTranslation and gTranslation of an array of TUs of a job POST
Body:
{
"tus": [
}
Response:
{
}
/gettus
Retrieve the actual TUs for a bundle or a job. The full TU info is returned
POST
Body:
{
}
Response:
[
},
}]
/getpendingqetus Retrieve the TUs for a bundle which have pending QE (qestatus=1) The full TU info is returned (a.id, b.idinbundle, a.srctext, a.pretrans, a.trans,a.transcode, a.alttrans, a.altcode, a.gtrans, a.status, a.transstatus, a.alttransstatus,a.qastatus, a.altqastatus, a.qestatus, a.altqestatus, a.qainfo, a.qeinfo, a.actorId,a.evaluatorId)
POST Body:
Response:
/getpendingpreptus
Used by 3rd party tools to prepare a Job. Retrieve the TUs for a Job which need preparation, a limit parameter is used to ask for a maximum number of TUs The answer is a list TUs that is prioritized according to their status. POST
Response:
/autoqa
Dummy endpoint to be served usually by a 3rd system. It receives the full texts of a tu to return an array of QA issues.
POST
Reponse:
/deliveries
Get the list of all deliveries with data required to show lists. The jobid as query parameter is an optional filter. GET
Response:
{
/adddelivery Create a new delivery for a job.
POST
Response:
/deliverylog
Get the log contents for the delivery. An array with the relevant events for the bundle is returned.
Response:
/editdelivery
Response:
/deldelivery
Deletes delivery, the data is deleted from the database. POST Body:
Response:
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article