Use this method to export segments to a TBX file (as a ZIP archive). You can export projects, jobs, resources and even multiple resources and apply a wide range of filters.
The zip archive contains the .tbx file as well as the .xcs schema file:
(POST) /api/resources/segments/io/tbx3
(POST) /api/resources/segments/io/tbx
Choice of tbx and tbx3:
Suffix | Version details |
---|---|
tbx | TBX version 1 (2008). https://www.gala-global.org/sites/default/files/uploads/pdfs/tbx_oscar_0.pdf |
tbx3 | TBX version 3 (2014 to 2019) http://www.terminorgs.net/downloads/TBX_Basic_Version_3.1.pdf |
The message body contains a JSON object.
Generic export properties:
|
TBX specific options
extractWordbeeProperties | Optional, default is false. If true then the system includes Wordbee specific properties in the TMX file. These properties are saved as <descripGrp> nodes:
Text level properties in "tuv" node:
| Optional, bool | |
extractComments | Optional, default is false. Set to true if you want to include comments attached to the texts. These are saved as notes inside <tig>:
| Optional, bool |
TBX version 3 specific options
extractCreationData | Optional, default is 0. Available options:
If not "0" then the system includes "creation" data from "Wordbee fields" if set to "1", or from "Originally imported data" if set to "2". These properties are saved as <transacGrp> nodes:
| Optional, int | |
extractModificationData | Optional, default is 0. Available options:
If not "0" then the system includes "creation" data from "Wordbee fields" if set to "1", or from "Originally imported data" if set to "2". These properties are saved as <transacGrp> nodes:
| Optional, int |
This API method is an "asynchronous" operation. It either immediately returns the result or instead an operation ID which you need to periodically poll until the operation has finished.
Upon the first call you typically get an "operationid". Use this to further poll the operation status. See full explanation here: Asynchronous operation
When the operation is finished you get the reference to the file:
{ "trm": { "status": "Finished" ... }, "custom": { "fileref": "52e77705f6904233b0c33b2e5d7c4a80", "filename": "export.zip", "segments": 10 } } |
Once the operation is finished, download the file with fileref and this API method:
(GET) /api/media/get/{fileref} |
Submit request to export term base 112334:
(POST) /api/resources/segments/io/tbx BODY: { "scope": { "type": "DocumentSet", "dsid": 112334 }, "locales": [ "en", "fr" ] } |
The resulting TBX file:
<?xml version="1.0" encoding="utf-8"?> <martif type="TBX" xml:lang="en-GB"> <martifHeader> <fileDesc> <titleStmt> <title>My term base</title> </titleStmt> <sourceDesc> <title>Project memory</title> </sourceDesc> </fileDesc> </martifHeader> <text> <body> <termEntry id="6386440"> <descripGrp> <descrip type="Context">p</descrip> </descripGrp> <langSet xml:lang="en-GB"> <tig> <term id="6386440-en-GB">Hello world</term> <descripGrp> <descrip type="Status">0</descrip> </descripGrp> <descripGrp> <descrip type="Bookmark">0</descrip> </descripGrp> <descripGrp> <descrip type="Locked">No</descrip> </descripGrp> <descripGrp> <descrip type="Editor">0</descrip> </descripGrp> </tig> </langSet> <langSet xml:lang="de-DE"> <tig> <term id="6386440-de-DE">Hallo Welt</term> <descripGrp> <descrip type="Status">1</descrip> </descripGrp> <descripGrp> <descrip type="Bookmark">0</descrip> </descripGrp> <descripGrp> <descrip type="Locked">No</descrip> </descripGrp> <descripGrp> <descrip type="Editor">1</descrip> </descripGrp> </tig> </langSet> </termEntry> ... |
The resulting schema file:
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TBXXCS SYSTEM "tbxxcsdtd.dtd"> <TBXXCS name="master" version="0.4" lang="en" xml:lang="en"> <header> <title>TBX XCS file</title> </header> <languages> <langInfo> <langCode>en-GB</langCode> <langName>English (United Kingdom) (en-GB)</langName> </langInfo> <langInfo> <langCode>de-DE</langCode> <langName>German (Germany) (de-DE)</langName> </langInfo> </languages> <datCatSet> <descripSpec name="Context" datcatId="x-wb-context"> <contents datatype="plainText" /> <levels>plainText</levels> </descripSpec> <descripSpec name="Status" datcatId="x-wb-cfs-5"> <contents datatype="plainText" /> <levels>plainText</levels> </descripSpec> <descripSpec name="Category" datcatId="x-wb-cfs-11"> <contents datatype="plainText" /> <levels>plainText</levels> </descripSpec> <descripSpec name="NSR unit" datcatId="x-wb-cfs-12"> <contents datatype="plainText" /> <levels>plainText</levels> </descripSpec> ... |
TBX specifications: https://www.gala-global.org/sites/default/files/uploads/pdfs/tbx_oscar_0.pdf