If the API changes in an incompatible manner this is listed explicitly in the "important release notes" section of each releases changelog. |
URL: | /editor/languageresourcetaskpivotassoc |
Available Methods: | GET |
Specialities: | List all available language resources for the given taskGuid (see get request resource layout) |
Parameters: | taskGuid ( required) . If the taskGuid of a project is given, all available resources for all projectTasks will be listed. The checked(see GET response layout) in the response shows if the language resource is assigned to the task. |
URL: | /editor/languageresourcetaskpivotassoc/[id] |
Available Methods: | DELETE |
Specialities: | Remove task pivot association |
URL: | /editor/languageresourcetaskpivotassoc |
Available Methods: | POST |
Specialities: | Create new language resource - task association for pivot pre-translation |
URL: | /editor/languageresourcetaskpivotassoc/pretranslation/batch |
Available Methods: | POST |
Specialities: | Starts or queue pivot pre-translation operation for given task/project using all association created for this task/project. To run this operation on import, call the url after the task is created (the files are submitted to the server) and before the import process is started. |
Parameters: | taskGuid (required) . If taskGuid of a project is given, for all project tasks, the pre-translation operation will be started/queued |
{ "rows": [ { "taskName": "Task 1", "taskGuid": "{a50da61f-3ec3-48b0-aac5-5ac53f429c0b}", "languageResourceId": "11", "langResUuid": "049e59a6-4261-4b5f-8fbb-45b3a9c8dba6", "name": "Resource 1", "color": "19737d", "resourceId": "editor_Services_TermCollection", "serviceType": "editor_Services_TermCollection", "serviceName": "TermCollection", "specificData": "{\"term\":1183,\"status\":\"available\",\"fileName\":\"Term1.tbx\",\"attribute\":5275,\"termEntry\":443}", "timestamp": "2021-09-29 09:51:27", "resourceType": "termcollection", "writeSource": "0", "associd": null, "sourceLang": "5", "targetLang": "4", "checked": "false", "customerId": "143" }, { "taskName": "Task 1", "taskGuid": "{a50da61f-3ec3-48b0-aac5-5ac53f429c0b}", "languageResourceId": "819", "langResUuid": "9069560a-378f-4453-89f3-4f071b341034", "name": "Resource 4", "color": "cdcdcd", "resourceId": "ZDemoMT", "serviceType": "editor_Plugins_ZDemoMT", "serviceName": "ZDemoMT", "specificData": "", "timestamp": "2022-06-23 15:41:20", "resourceType": "mt", "writeSource": "0", "associd": null, "sourceLang": "5", "targetLang": "4", "checked": "false", "customerId": "143" } ] } |
{ data:{ "languageResourceId":1, "taskGuid":"{341d3dab-8c0b-4469-a8a8-30e9ddb81a26}" } } |
The re is also an option to set language resources to be used as default for pivot pre-translation. Check the customerPivotAsDefaultIds parameter in this link LanguageResources: Instance
If a pivot language is selected and pivot language resources are assigned by default in the language resources management for the current combination of source language and pivot language for the current client:
Import with button "Import (use defaults):
All works the same way as if an import is triggered via the front-end with "Import (use defaults)" with one difference:
The pre-translation is not started automatically, but has to be started by an extra API call(see pretranslation/batch API call from above):
editor/languageresourcetaskpivotassoc/pretranslation/batch
and the taskGuid is required param
If you want to mimic the behavior of the front-end and start the pivot pre-translation automatically, you can use the following system configuration and set it to "true":
name: runtimeOptions.import.autoStartPivotTranslations
description: If set to active, for api created tasks the pivot worker will be queued automatically
quiName: Automatically queue pivot worker (API only)