Skip to content

Commit 1f14c38

Browse files
committed
Updated docs
1 parent 98c5105 commit 1f14c38

7 files changed

Lines changed: 157 additions & 2 deletions

File tree

docs/remotetm.ditamap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@
5757
<topicref href="rest/uploadFile.dita"/>
5858
<topicref href="rest/importFile.dita"/>
5959
</topicref>
60+
<topicref href="rest/exportTMX.dita">
61+
<topicref href="rest/downloadFile.dita"/>
62+
</topicref>
6063
</topicref>
6164
<topicref href="rest/permissions.dita">
6265
<topicref href="rest/getPermissions.dita"/>

docs/rest/downloadFile.dita

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
3+
<topic id="downloadFile">
4+
<title>Download File</title>
5+
<body>
6+
<p>End point: <tt>[RemoteTM URL]/download</tt><tt> </tt></p>
7+
<p>Send a <tt>GET</tt> request with these parameters:</p>
8+
<simpletable>
9+
<sthead>
10+
<stentry>Parameter</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>file</tt></stentry>
20+
<stentry><tt>URL-encoded name of the file to download</tt></stentry>
21+
</strow>
22+
</simpletable>
23+
<p>Example:</p>
24+
<codeblock>https://myserver.com/RemoteTM/download?session=9321f-1070ae8&amp;file=exportedFile.tmx</codeblock>
25+
<p>On success, RemoteTM responds with the requested file as attachment.</p>
26+
</body>
27+
</topic>

docs/rest/exportTMX.dita

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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>

docs/rest/memoriesManagement.dita

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
<li><xref href="importFile.dita">Import File</xref></li>
1616
</ul>
1717
</li>
18+
<li><xref href="../rest/exportTMX.dita">Export TMX</xref>
19+
<ul>
20+
<li><xref href="downloadFile.dita">Download File</xref></li>
21+
</ul>
22+
</li>
1823
</ul>
1924
</conbody>
2025
</concept>

docs/rest/removeMemory.dita

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,53 @@
33
<topic id="removeMemory">
44
<title>Remove Memory</title>
55
<body>
6-
<p></p>
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>removeMemory</tt></stentry>
32+
</strow>
33+
<strow>
34+
<stentry><tt>memory</tt> </stentry>
35+
<stentry>ID of the memory to remove</stentry>
36+
</strow>
37+
</simpletable>
38+
<p>Example:</p>
39+
<codeblock translate="no">{
40+
"command": "removeMemory",
41+
"memory": "1617053861912"
42+
}</codeblock>
43+
<p>RemoteTM responds with a JSON object.</p>
44+
<p>On success, field 'status' is set to 'OK'. Example:</p>
45+
<codeblock translate="no">{
46+
"status": "OK"
47+
}</codeblock>
48+
<p>On error, field 'status' is set to 'Error' and field 'reason' contains the error cause.
49+
Example:</p>
50+
<codeblock translate="no">{
51+
"status": "Error",
52+
"reason": "Access denied"
53+
}</codeblock>
754
</body>
855
</topic>

docs/rest/restApi.dita

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
<li><xref href="importFile.dita">Import File</xref></li>
2424
</ul>
2525
</li>
26+
<li><xref href="exportTMX.dita">Export TMX</xref>
27+
<ul>
28+
<li><xref href="downloadFile.dita">Download File</xref></li>
29+
</ul>
30+
</li>
2631
</ul>
2732
</li>
2833
<li><xref href="permissions.dita">Memory Permissions</xref>

ts/dashboard.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,6 @@ export class Dashboard implements View {
426426
this.setStatus('');
427427
console.error('Error:', reason);
428428
});
429-
430429
}
431430

432431
requestExport(): void {

0 commit comments

Comments
 (0)