Skip to content

Commit 6aa43e8

Browse files
committed
Completed docs
1 parent 4ceb08d commit 6aa43e8

15 files changed

Lines changed: 815 additions & 21 deletions

WebContent/docs/remotetm.pdf

43 KB
Binary file not shown.

docs/rest/batchTranslate.dita

Lines changed: 154 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,159 @@
33
<topic id="batchTranslate">
44
<title>Batch Translation</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>Parameter</stentry>
27+
<stentry>Value</stentry>
28+
</sthead>
29+
<strow>
30+
<stentry><tt>command</tt></stentry>
31+
<stentry><tt>batchTranslate</tt></stentry>
32+
</strow>
33+
<strow>
34+
<stentry><tt>memory</tt> </stentry>
35+
<stentry>ID of the memory to query</stentry>
36+
</strow>
37+
<strow>
38+
<stentry><tt>srcLang</tt> </stentry>
39+
<stentry>Source language code</stentry>
40+
</strow>
41+
<strow>
42+
<stentry><tt>tgtLang</tt> </stentry>
43+
<stentry>Target Language</stentry>
44+
</strow>
45+
<strow>
46+
<stentry><tt>segments</tt> </stentry>
47+
<stentry>Array of JSON entries containing these fields:
48+
<ul>
49+
<li><tt>unit</tt>: ID of the XLIFF &lt;unit> being translated</li>
50+
<li><tt>file</tt>: ID of the XLIFF &lt;file> being translated</li>
51+
<li><tt>segment</tt>: ID of the XLIFF &lt;segment> being translated</li>
52+
<li><tt>pure</tt>: Pure text content of the segment being translated</li>
53+
</ul>
54+
</stentry>
55+
</strow>
56+
</simpletable>
57+
<p>Example:</p>
58+
<codeblock>{
59+
"command": "batchTranslate",
60+
"memory": "1619955225759",
61+
"srcLang": "en",
62+
"tgtLang": "es",
63+
"segments": [{
64+
"unit": "2",
65+
"file": "1",
66+
"segment": "2",
67+
"pure": "Get Auto-Translations"
68+
},{
69+
"unit": "3",
70+
"file": "1",
71+
"segment": "3",
72+
"pure": "Apply Auto-Translation to All Segments"
73+
},{
74+
"unit": "4",
75+
"file": "1",
76+
"segment": "4-1",
77+
"pure": "Yearly Subscriptions"
78+
}]
79+
}</codeblock>
80+
<p>RemoteTM responds with a JSON object.</p>
81+
<p>On success, field 'status' is set to 'OK' and translation results are included in
82+
'matches' field. Example:</p>
83+
<codeblock>{
84+
"matches": [{
85+
"unit": "2",
86+
"file": "1",
87+
"segment": "2",
88+
"pure": "Get Auto-Translations",
89+
"matches": [{
90+
"similarity": 76,
91+
"origin": "1619955225759",
92+
"source": "&lt;tuv xml:lang=\"en\">&lt;seg>Auto-Translation&lt;\/seg>&lt;\/tuv>",
93+
"properties": {
94+
"project": "swordfish.ditamap"
95+
},
96+
"target": "&lt;tuv xml:lang=\"es\">&lt;seg>Auto-Traducción&lt;\/seg>&lt;\/tuv>"
97+
},{
98+
"similarity": 76,
99+
"origin": "1619955225759",
100+
"source": "&lt;tuv xml:lang=\"en\">&lt;seg>Auto-Translation&lt;\/seg>&lt;\/tuv>",
101+
"target": "&lt;tuv xml:lang=\"es\">&lt;seg>Auto-Traducción&lt;\/seg>&lt;\/tuv>"
102+
},{
103+
"similarity": 70,
104+
"origin": "1619955225759",
105+
"source": "&lt;tuv xml:lang=\"en\">&lt;seg>Export Translations&lt;\/seg>&lt;\/tuv>",
106+
"properties": {
107+
"project": "swordfish.ditamap"
108+
},
109+
"target": "&lt;tuv xml:lang=\"es\">&lt;seg>Exportar Traducciones&lt;\/seg>&lt;\/tuv>"
110+
}
111+
]
112+
},{
113+
"unit": "3",
114+
"file": "1",
115+
"segment": "3",
116+
"pure": "Apply Auto-Translation to All Segments",
117+
"matches": [{
118+
"similarity": 100,
119+
"origin": "1619955225759",
120+
"source": "&lt;tuv xml:lang=\"en\">&lt;seg>Apply Auto-Translation to All Segments&lt;\/seg>&lt;\/tuv>",
121+
"target": "&lt;tuv xml:lang=\"es\">&lt;seg>Apply Auto-Translation to All Segments&lt;\/seg>&lt;\/tuv>"
122+
}
123+
]
124+
},{
125+
"unit": "4",
126+
"file": "1",
127+
"segment": "4-1",
128+
"pure": "Yearly Subscriptions",
129+
"matches": [{
130+
"similarity": 100,
131+
"origin": "1619955225759",
132+
"source": "&lt;tuv xml:lang=\"en\">&lt;seg>Yearly Subscriptions&lt;\/seg>&lt;\/tuv>",
133+
"target": "&lt;tuv xml:lang=\"es\">&lt;seg>Suscripciones Anuales&lt;\/seg>&lt;\/tuv>"
134+
},{
135+
"similarity": 72,
136+
"origin": "1619955225759",
137+
"source": "&lt;tuv xml:lang=\"en\">&lt;seg>Subscription Renewal&lt;\/seg>&lt;\/tuv>",
138+
"properties": {
139+
"project": "swordfish.ditamap"
140+
},
141+
"target": "&lt;tuv xml:lang=\"es\">&lt;seg>Renovación de Suscripción&lt;\/seg>&lt;\/tuv>"
142+
},{
143+
"similarity": 65,
144+
"origin": "1619955225759",
145+
"source": "&lt;tuv xml:lang=\"en\">&lt;seg>Subscriptions&lt;\/seg>&lt;\/tuv>",
146+
"properties": {
147+
"project": "swordfish.ditamap"
148+
},
149+
"target": "&lt;tuv xml:lang=\"es\">&lt;seg>Suscripciones&lt;\/seg>&lt;\/tuv>"
150+
}]
151+
}],
152+
"status": "OK"
153+
}</codeblock>
154+
<p>On error, field 'status' is set to 'Error' and field 'reason' contains the error cause.
155+
Example:</p>
156+
<codeblock translate="no">{
157+
"status": "Error",
158+
"reason": "Access denied"
159+
}</codeblock>
7160
</body>
8161
</topic>

docs/rest/commit.dita

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,55 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
33
<topic id="commit">
4-
<title>Commit</title>
4+
<title>Commit Changes</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>Parameter</stentry>
27+
<stentry>Value</stentry>
28+
</sthead>
29+
<strow>
30+
<stentry><tt>command</tt></stentry>
31+
<stentry><tt>commit</tt></stentry>
32+
</strow>
33+
<strow>
34+
<stentry><tt>memory</tt> </stentry>
35+
<stentry>ID of the memory to update</stentry>
36+
</strow>
37+
</simpletable>
38+
<p>Example:</p>
39+
<codeblock>{
40+
"command": "commit",
41+
"memory": "1617963861912"
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/concordanceSearch.dita

Lines changed: 87 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,92 @@
33
<topic id="concordanceSearch">
44
<title>Concordance Search</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>Parameter</stentry>
27+
<stentry>Value</stentry>
28+
</sthead>
29+
<strow>
30+
<stentry><tt>command</tt></stentry>
31+
<stentry><tt>concordanceSearch</tt></stentry>
32+
</strow>
33+
<strow>
34+
<stentry><tt>memory</tt> </stentry>
35+
<stentry>ID of the memory to query</stentry>
36+
</strow>
37+
<strow>
38+
<stentry><tt>searchStr</tt> </stentry>
39+
<stentry>Text to search</stentry>
40+
</strow>
41+
<strow>
42+
<stentry><tt>srcLang</tt> </stentry>
43+
<stentry>Source language code</stentry>
44+
</strow>
45+
<strow>
46+
<stentry><tt>limit</tt> </stentry>
47+
<stentry>Maximum number of matches to retrieve</stentry>
48+
</strow>
49+
<strow>
50+
<stentry><tt>isRegexp</tt> </stentry>
51+
<stentry>Boolean value indicating whether the search string is a regular
52+
expression</stentry>
53+
</strow>
54+
<strow>
55+
<stentry><tt>caseSensitive</tt> </stentry>
56+
<stentry>Boolean value indicating whether the search should be case
57+
sensitive</stentry>
58+
</strow>
59+
</simpletable>
60+
<p>Example:</p>
61+
<codeblock>{
62+
"command": "concordanceSearch",
63+
"memory": "1619955225759",
64+
"searchStr": "source code",
65+
"isRegexp": false,
66+
"caseSensitive": false,
67+
"limit": 20,
68+
"srcLang": "en"
69+
}</codeblock>
70+
<p>RemoteTM responds with a JSON object.</p>
71+
<p>On success, field 'status' is set to 'OK' and search results are included in 'tus' field,
72+
escaped for JSON notation. Example:</p>
73+
<codeblock>{"tus":[
74+
"&lt;tu creationtool=\"Swordfish\" tuid=\"1668707130-10-12-12\">
75+
&lt;prop type=\"project\">swordfish.ditamap&lt;\/prop>
76+
&lt;tuv xml:lang=\"en\">&lt;seg>Source Code&lt;\/seg>&lt;\/tuv>
77+
&lt;tuv xml:lang=\"es\">&lt;seg>Código Fuente&lt;\/seg>&lt;\/tuv>
78+
&lt;\/tu>",
79+
"&lt;tu creationtool=\"Swordfish\" tuid=\"467840381-10-12-12\">
80+
&lt;prop type=\"customer\">Maxprograms&lt;\/prop>
81+
&lt;prop type=\"project\">swordfish.ditamap&lt;\/prop>
82+
&lt;tuv xml:lang=\"en\">&lt;seg>Source Code&lt;\/seg>&lt;\/tuv>
83+
&lt;tuv xml:lang=\"pt\">&lt;seg>Código fonte&lt;\/seg>&lt;\/tuv>
84+
&lt;\/tu>"],
85+
"status":"OK"
86+
}</codeblock>
87+
<p>On error, field 'status' is set to 'Error' and field 'reason' contains the error cause.
88+
Example:</p>
89+
<codeblock translate="no">{
90+
"status": "Error",
91+
"reason": "Access denied"
92+
}</codeblock>
793
</body>
894
</topic>

docs/rest/getClients.dita

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,49 @@
33
<topic id="getClients">
44
<title>Get Clients</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 this parameters in a JSON body:</p>
24+
<simpletable>
25+
<sthead>
26+
<stentry>Parameter</stentry>
27+
<stentry>Value</stentry>
28+
</sthead>
29+
<strow>
30+
<stentry><tt>command</tt></stentry>
31+
<stentry><tt>getClients</tt></stentry>
32+
</strow>
33+
</simpletable>
34+
<p>Example:</p>
35+
<codeblock>{
36+
"command": "getClients"
37+
}</codeblock>
38+
<p>RemoteTM responds with a JSON object.</p>
39+
<p>On success, field 'status' is set to 'OK'. Example:</p>
40+
<codeblock translate="no">{
41+
"clients":["Maxprograms","MVDSoftware"],
42+
"status":"OK"
43+
}</codeblock>
44+
<p>On error, field 'status' is set to 'Error' and field 'reason' contains the error cause.
45+
Example:</p>
46+
<codeblock translate="no">{
47+
"status": "Error",
48+
"reason": "Access denied"
49+
}</codeblock>
750
</body>
851
</topic>

0 commit comments

Comments
 (0)