Create a New Translation Memory
action: api/v2/transMemory/create
token string
name string
sourceLang locale
targetLang list(locale)
response: JSON
{
"id": 1954 // id of the new translation memory
}
Get Translation Memory
action: api/v2/transMemory/get
token string
transMemory domain(TransMemory)
response: JSON
{
"id":1,
"targetLangs":[
"de",
"en"
],
"sourceLang":"cs"
}
Delete Translation Memory
action: api/v2/transMemory/delete
token string
transMemory domain(TransMemory)
response: empty
List Translation Memories
action: api/v2/transMemory/list
token string
response: JSON
[
{
"id":1,
"targetLangs":[
"de"
],
"sourceLang":"en",
"name":"transMem"
}
]
Import Data
action: api/v2/transMemory/import
token string
transMemory domain(TransMemory)
file file // TMX or MXLIFF file
strictLangMatching boolean O(false)
stripNativeCodes boolean O(true)
response: JSON
{
"acceptedSegmentsCount": "21809"
}
Search
action: api/v2/transMemory/search
token string
transMemory domain(TransMemory)
query string
sourceLang locale
response: JSON
// same as in Search By Task
Search By Task
action: api/v2/transMemory/searchByTask
token string
task task
query string
workflowLevel integer O(0)
scoreThreshold double O(0.0) any value from interval [0.0;1.01]
previousSegment string O
nextSegment string O
response: JSON
[
{
"grossScore":1,
"score":1,
"segmentId":"5023cd08e4b015e0656c4a8f",
"source":{
"id": "80ffcd08e4b015e0656c4a4c",
"createdAt":1344523528505,
"lang":"en",
"modifiedAt":1344523528505,
"nextSegment":"World",
"previousSegment":null,
"rtl":false,
"text":"Hello"
},
"subSegment":false,
"transMemory":{
"id":"5023cb2ee4b015e0656c4a8e",
"name":"test api"
},
"translations":[
{
"id": "7affcd08e4b015e0656c4aee"
"client":null,
"createdAt":1344523528505,
"createdBy":{
"firstName":"administrator",
"id":30,
"lastName":"admin",
"userName":"admin"
},
"domain":null,
"fileName":"small.properties",
"lang":"de",
"modifiedAt":1344600081648,
"modifiedBy":{
"firstName":"administrator",
"id":30,
"lastName":"admin",
"userName":"admin"
},
"project":{
"id":427,
"name":"test tm api"
},
"rtl":false,
"text":"HalloXX"
}
]
}
]
error codes
TransMemoryNotSelected no translation memory is selected for the task
Update Source
action: api/v2/transMemory/updateSource
token string
transMemory domain(TransMemory)
segmentId string
text string
response: empty
Update Translation
action: api/v2/transMemory/updateTranslation
token string
transMemory domain(TransMemory)
segmentId string
lang locale
text string
response: empty
Delete Source and Translation
action: api/v2/transMemory/deleteSourceAndTranslation
token string
transMemory domain(TransMemory)
segmentId string
response: empty
Delete Translation
action: api/v2/transMemory/deleteTranslation
token string
transMemory domain(TransMemory)
segmentId string
lang locale
response: empty
Comments
Article is closed for comments.