Use this method to export segments to a CSV file (as a ZIP archive). You can export projects, jobs, resources and even multiple resources and apply a wide range of filters.

URL

(POST) /api/resources/segments/io/csv

PARAMETERS

The message body contains a JSON object.


Generic export properties:


CSV specific options


htmlEncode

Optional, default is false. If true then content is HTML encoded.

When to use true and when to use false?

Any markup will be output like in this example

  • "Hello <b>world</b>".

This is all fine unless the text contains < or > characters as well. Look at this example:

  • "Hello I <b>think</b> that 2 < 3"

By setting "htmlEncode" to true you will get instead:

  • "Hello I <b>think</b> that 2 &lt; 3"

Using "true" simply means that you can clearly distinguish between markup and the use of < > & as part of the actual text.


Optional, bool

RESULTS

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}


EXAMPLES

Export a translation memory with ID 112334 and with all default parameters:

(POST) /api/resources/segments/io/csv


BODY:
{
	"scope": { "type": "DocumentSet", "dsid": 112334 },
	"locales": [ "en", "fr" ]
}