|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd"> |
| 3 | +<topic id="exportTMX"> |
| 4 | + <title>Export TMX</title> |
| 5 | + <body> |
| 6 | + <p>End point: <tt>[RemoteTM URL]/memories</tt><tt> </tt></p> |
| 7 | + <p>Send a <tt>POST</tt> request with these headers:</p> |
| 8 | + <simpletable> |
| 9 | + <sthead> |
| 10 | + <stentry>Header</stentry> |
| 11 | + <stentry>Value</stentry> |
| 12 | + </sthead> |
| 13 | + <strow> |
| 14 | + <stentry><tt>Session</tt> </stentry> |
| 15 | + <stentry>The ticket received from <xref href="authorizationRequest.dita" |
| 16 | + >Authorization Request</xref></stentry> |
| 17 | + </strow> |
| 18 | + <strow> |
| 19 | + <stentry><tt>Content-Type</tt></stentry> |
| 20 | + <stentry><tt>application/json</tt></stentry> |
| 21 | + </strow> |
| 22 | + </simpletable> |
| 23 | + <p>Include these parameters in a JSON body:</p> |
| 24 | + <simpletable> |
| 25 | + <sthead> |
| 26 | + <stentry>Field</stentry> |
| 27 | + <stentry>Value</stentry> |
| 28 | + </sthead> |
| 29 | + <strow> |
| 30 | + <stentry><tt>command</tt> </stentry> |
| 31 | + <stentry><tt>exportMemory</tt></stentry> |
| 32 | + </strow> |
| 33 | + <strow> |
| 34 | + <stentry><tt>memory</tt> </stentry> |
| 35 | + <stentry>ID of the memory to export</stentry> |
| 36 | + </strow> |
| 37 | + <strow> |
| 38 | + <stentry><tt>srcLang</tt>></stentry> |
| 39 | + <stentry>The code of the language to set as source or '*all*' if any languages is to |
| 40 | + be considered as source language</stentry> |
| 41 | + </strow> |
| 42 | + <strow> |
| 43 | + <stentry><tt>close</tt></stentry> |
| 44 | + <stentry>Boolean value indicating wether the memory should be closed after exporting.</stentry> |
| 45 | + </strow> |
| 46 | + </simpletable> |
| 47 | + <p>Example:</p> |
| 48 | + <codeblock translate="no">{ |
| 49 | + "command": "exportMemory", |
| 50 | + "memory": "1617053861912", |
| 51 | + "srcLang": "*all*", |
| 52 | + "close": false |
| 53 | +}</codeblock> |
| 54 | + <p>RemoteTM responds with a JSON object.</p> |
| 55 | + <p>On success, field 'status' is set to 'OK' and the location of the exported file is returned on |
| 56 | + the 'file' field. Example:</p> |
| 57 | + <codeblock translate="no">{ |
| 58 | + "status": "OK", |
| 59 | + "file": "exportedFile.tmx" |
| 60 | +}</codeblock> |
| 61 | + <p>On error, field 'status' is set to 'Error' and field 'reason' contains the error cause. |
| 62 | + Example:</p> |
| 63 | + <codeblock translate="no">{ |
| 64 | + "status": "Error", |
| 65 | + "reason": "Access denied" |
| 66 | +}</codeblock> |
| 67 | + <p>After the memory has been exported to the server filesystem, send a <xref href="downloadFile.dita">file download</xref> request to RemoteTM.</p> |
| 68 | + </body> |
| 69 | +</topic> |
0 commit comments