-
Notifications
You must be signed in to change notification settings - Fork 30
/
openapi_gitbook.yaml
1571 lines (1555 loc) · 54.5 KB
/
openapi_gitbook.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.3
info:
title: DeepL API Documentation
description: |-
The DeepL API provides programmatic access to DeepL’s machine translation technology.
Note: this OpenAPI spec is embedded into our API documentation and has shortened descriptions.
termsOfService: https://www.deepl.com/pro-license/
contact:
name: DeepL - Contact us
url: https://www.deepl.com/contact-us
version: 2.16.0
externalDocs:
description: DeepL Pro - Plans and pricing
url: https://www.deepl.com/pro#developer?cta=header-prices/
servers:
- url: https://api.deepl.com/v2
description: DeepL API Pro
- url: https://api-free.deepl.com/v2
description: DeepL API Free
tags:
- name: TranslateText
description: |-
The text-translation API currently consists of a single endpoint, `translate`, which is described below.
- name: TranslateDocuments
description: |-
The document translation API allows you to translate whole documents and supports the following file types and extensions:
* `docx` - Microsoft Word Document
* `pptx` - Microsoft PowerPoint Document
* `xlsx` - Microsoft Excel Document
* `pdf` - Portable Document Format
* `htm / html` - HTML Document
* `txt` - Plain Text Document
* `xlf / xliff` - XLIFF Document, version 2.1
* `srt` - SRT Document
- name: ManageGlossaries
description: |-
The *glossary* functions allow you to create, inspect, and delete glossaries.
Glossaries created with the glossary function can be used in translate requests by specifying the
`glossary_id` parameter.
If you encounter issues, please let us know at [email protected].
The DeepL API supports glossaries in any combination of two languages from the following list, enabling a total of
120 possible glossary language pairs:
- DA (Danish)
- DE (German)
- EN (English)
- ES (Spanish)
- FR (French)
- IT (Italian)
- JA (Japanese)
- KO (Korean)
- NB (Norwegian (bokmål))
- NL (Dutch)
- PL (Polish)
- PT (Portuguese)
- RO (Romanian)
- RU (Russian)
- SV (Swedish)
- ZH (Chinese)
- name: MetaInformation
description: Information about API usage and value ranges
x-hideTryItPanel: true
x-codeSamples: false
paths:
/translate:
post:
tags:
- TranslateText
summary: Request Translation
operationId: translateText
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- text
- target_lang
properties:
text:
description: |-
Text to be translated. Only UTF-8-encoded plain text is supported. The parameter may be specified
up to 50 times in a single request. Translations are returned in the same order as they are requested.
type: array
maxItems: 50
items:
type: string
example: Hello, World!
source_lang:
$ref: '#/components/schemas/SourceLanguage'
target_lang:
$ref: '#/components/schemas/TargetLanguageText'
context:
$ref: '#/components/schemas/Context'
show_billed_characters:
$ref: '#/components/schemas/ShowBilledCharacters'
split_sentences:
$ref: '#/components/schemas/SplitSentencesOption'
preserve_formatting:
$ref: '#/components/schemas/PreserveFormattingOption'
formality:
$ref: '#/components/schemas/Formality'
glossary_id:
description: |-
Specify the glossary to use for the translation. **Important:** This requires the `source_lang`
parameter to be set. The language pair of the glossary has to match the language pair of the
request.
type: string
example: def3a26b-3e84-45b3-84ae-0c0aaf3525f7
tag_handling:
$ref: '#/components/schemas/TagHandlingOption'
outline_detection:
$ref: '#/components/schemas/OutlineDetectionOption'
non_splitting_tags:
description: Comma-separated list of XML tags which never split sentences.
type: array
items:
type: string
example: non_splitting_tag
splitting_tags:
description: Comma-separated list of XML tags which always cause splits.
type: array
items:
type: string
example: splitting_tag
ignore_tags:
description: Comma-separated list of XML tags that indicate text not to be translated.
type: array
items:
type: string
example: ignore_tag
application/x-www-form-urlencoded:
schema:
type: object
required:
- text
- target_lang
properties:
text:
description: Text to be translated. Only UTF-8-encoded plain text is supported. The parameter may be specified
up to 50 times in a single request. Translations are returned in the same order as they are requested.
type: array
items:
type: string
example: Hello, World!
source_lang:
$ref: '#/components/schemas/SourceLanguage'
target_lang:
$ref: '#/components/schemas/TargetLanguageText'
context:
$ref: '#/components/schemas/Context'
show_billed_characters:
$ref: '#/components/schemas/ShowBilledCharacters'
split_sentences:
$ref: '#/components/schemas/SplitSentencesOption'
preserve_formatting:
$ref: '#/components/schemas/PreserveFormattingOptionStr'
formality:
$ref: '#/components/schemas/Formality'
glossary_id:
description: |-
Specify the glossary to use for the translation. **Important:** This requires the `source_lang`
parameter to be set. The language pair of the glossary has to match the language pair of the
request.
type: string
example: def3a26b-3e84-45b3-84ae-0c0aaf3525f7
tag_handling:
$ref: '#/components/schemas/TagHandlingOption'
outline_detection:
$ref: '#/components/schemas/OutlineDetectionOptionStr'
non_splitting_tags:
description: Comma-separated list of XML tags which never split sentences.
type: array
items:
type: string
example: non_splitting_tag
splitting_tags:
description: Comma-separated list of XML tags which always cause splits.
type: array
items:
type: string
example: splitting_tag
ignore_tags:
description: Comma-separated list of XML tags that indicate text not to be translated.
type: array
items:
type: string
example: ignore_tag
encoding:
text:
style: form
explode: true
responses:
200:
description: The translate function returns a JSON representation of the
translations in the order the text parameters have been specified.
content:
application/json:
schema:
type: object
properties:
translations:
type: array
minItems: 1
items:
type: object
properties:
detected_source_language:
description: The language detected in the source text. It
reflects the value of the `source_lang` parameter, when
specified.
type: string
example: EN
text:
description: The translated text.
type: string
example: Hallo, Welt!
billed_characters:
description: Number of characters counted by DeepL for billing purposes.
Only present if the show_billed_characters parameter is set to true.
type: integer
example: 42
400:
$ref: '#/components/responses/BadRequest'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
413:
$ref: '#/components/responses/PayloadTooLarge'
414:
$ref: '#/components/responses/URITooLong'
429:
$ref: '#/components/responses/TooManyRequests'
456:
$ref: '#/components/responses/QuotaExceeded'
500:
$ref: '#/components/responses/InternalServerError'
504:
$ref: '#/components/responses/ServiceUnavailable'
529:
$ref: '#/components/responses/TooManyRequests'
security:
- auth_header: []
/document:
post:
tags:
- TranslateDocuments
summary: Upload and Translate a Document
operationId: translateDocument
requestBody:
required: true
content:
multipart/form-data:
examples:
Basic:
summary: Basic Document Translation
value:
target_lang: DE
file: '@document.docx'
Glossary:
summary: Using a Glossary
value:
source_lang: EN
target_lang: DE
file: '@document.docx'
glossary_id: '[yourGlossaryId]'
schema:
type: object
required:
- target_lang
- file
properties:
source_lang:
$ref: '#/components/schemas/SourceLanguage'
target_lang:
$ref: '#/components/schemas/TargetLanguage'
file:
type: string
format: binary
description: |-
The document file to be translated. The file name should be included in this part's content disposition. As an alternative, the filename parameter can be used. The following file types and extensions are supported:
* `docx` - Microsoft Word Document
* `pptx` - Microsoft PowerPoint Document
* `xlsx` - Microsoft Excel Document
* `pdf` - Portable Document Format
* `htm / html` - HTML Document
* `txt` - Plain Text Document
* `xlf / xliff` - XLIFF Document, version 2.1
* `srt` - SRT Document
filename:
type: string
description: The name of the uploaded file. Can be used as an alternative
to including the file name in the file part's content disposition.
output_format:
type: string
description: |
File extension of desired format of translated file, for example: `docx`. If unspecified, by default the translated file will be in the same format as the input file.
formality:
$ref: '#/components/schemas/Formality'
glossary_id:
$ref: '#/components/schemas/GlossaryId'
responses:
200:
description: The document function returns a JSON object containing the
ID and encryption key assigned to the uploaded document. Once received
by the server, uploaded documents are immediately encrypted using a uniquely
generated encryption key. This key is not persistently stored on the server.
Therefore, it must be stored by the client and sent back to the server
with every subsequent request that refers to this particular document.
content:
application/json:
schema:
type: object
properties:
document_id:
description: A unique ID assigned to the uploaded document and
the translation process. Must be used when referring to this
particular document in subsequent API requests.
type: string
example: 04DE5AD98A02647D83285A36021911C6
document_key:
description: A unique key that is used to encrypt the uploaded
document as well as the resulting translation on the server
side. Must be provided with every subsequent API request regarding
this particular document.
type: string
example: 0CB0054F1C132C1625B392EADDA41CB754A742822F6877173029A6C487E7F60A
example:
document_id: 04DE5AD98A02647D83285A36021911C6
document_key: 0CB0054F1C132C1625B392EADDA41CB754A742822F6877173029A6C487E7F60A
400:
$ref: '#/components/responses/BadRequest'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
413:
$ref: '#/components/responses/PayloadTooLarge'
429:
$ref: '#/components/responses/TooManyRequests'
456:
$ref: '#/components/responses/QuotaExceeded'
500:
$ref: '#/components/responses/InternalServerError'
504:
$ref: '#/components/responses/ServiceUnavailable'
529:
$ref: '#/components/responses/TooManyRequests'
security:
- auth_header: []
/document/{document_id}:
post:
tags:
- TranslateDocuments
summary: Check Document Status
operationId: getDocumentStatus
parameters:
- $ref: '#/components/parameters/DocumentID'
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/DocumentKey'
examples:
basic:
summary: Basic
value:
document_key: 0CB0054F1C132C1625B392EADDA41CB754A742822F6877173029A6C487E7F60A
application/json:
schema:
$ref: '#/components/schemas/DocumentKey'
responses:
200:
description: The document status request returns a JSON object containing
the document ID that was used in the request as well as string indicating
the current status of the translation process. While the translation is
running, the estimated number of seconds remaining until the process is
done is also included in the response.
content:
application/json:
schema:
type: object
required:
- document_id
- status
properties:
document_id:
description: A unique ID assigned to the uploaded document and
the requested translation process. The same ID that was used
when requesting the translation status.
type: string
example: 04DE5AD98A02647D83285A36021911C6
status:
description: |-
A short description of the state the document translation process is currently in. Possible values are:
* `queued` - the translation job is waiting in line to be processed
* `translating` - the translation is currently ongoing
* `done` - the translation is done and the translated document is ready for download
* `error` - an irrecoverable error occurred while translating the document
type: string
example: done
enum:
- queued
- translating
- done
- error
seconds_remaining:
description: |-
Estimated number of seconds until the translation is done.
This parameter is only included while `status` is `"translating"`.
type: integer
billed_characters:
description: The number of characters billed to your account.
The characters will only be billed after a successful download
request.
type: integer
example: 1337
error_message:
description: |-
A short description of the error, if available.
Note that the content is subject to change.
This parameter may be included if an error occurred during translation.
type: string
example: Only available if document status is error
examples:
translating:
summary: Translating
value:
document_id: 04DE5AD98A02647D83285A36021911C6
status: translating
seconds_remaining: 20
done:
summary: Done
value:
document_id: 04DE5AD98A02647D83285A36021911C6
status: done
billed_characters: 1337
queued:
summary: Queued
value:
document_id: 04DE5AD98A02647D83285A36021911C6
status: queued
error:
summary: Error
value:
document_id: 04DE5AD98A02647D83285A36021911C6
status: error
message: Source and target language are equal.
400:
$ref: '#/components/responses/BadRequest'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
413:
$ref: '#/components/responses/PayloadTooLarge'
429:
$ref: '#/components/responses/TooManyRequests'
456:
$ref: '#/components/responses/QuotaExceeded'
500:
$ref: '#/components/responses/InternalServerError'
504:
$ref: '#/components/responses/ServiceUnavailable'
529:
$ref: '#/components/responses/TooManyRequests'
security:
- auth_header: []
/document/{document_id}/result:
post:
tags:
- TranslateDocuments
summary: Download Translated Document
operationId: downloadDocument
parameters:
- $ref: '#/components/parameters/DocumentID'
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/DocumentKey'
examples:
basic:
summary: Basic
value:
document_key: 0CB0054F1C132C1625B392EADDA41CB754A742822F6877173029A6C487E7F60A
application/json:
schema:
$ref: '#/components/schemas/DocumentKey'
responses:
200:
description: The document is provided as a download. There is no other data
included in the response besides the document data. The content type used
in the response corresponds to the document type.
content:
application/octet-stream:
schema:
type: string
format: binary
examples:
OK:
summary: OK
description: binary document data
400:
$ref: '#/components/responses/BadRequest'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound404DocTransDownload'
413:
$ref: '#/components/responses/PayloadTooLarge'
429:
$ref: '#/components/responses/TooManyRequests'
456:
$ref: '#/components/responses/QuotaExceeded'
500:
$ref: '#/components/responses/InternalServerError'
503:
$ref: '#/components/responses/ServiceUnavailable503DocTransDownload'
504:
$ref: '#/components/responses/ServiceUnavailable'
529:
$ref: '#/components/responses/TooManyRequests'
security:
- auth_header: []
/glossary-language-pairs:
get:
tags:
- ManageGlossaries
summary: List Language Pairs Supported by Glossaries
description: Retrieve the list of language pairs supported by the glossary feature.
operationId: listGlossaryLanguages
responses:
200:
description: A JSON object containing the language pairs in its `supported_languages`
property.
content:
application/json:
schema:
type: object
properties:
supported_languages:
type: array
description: The list of supported languages
items:
type: object
required:
- source_lang
- target_lang
properties:
source_lang:
description: The language in which the source texts in the
glossary are specified.
type: string
example: en
target_lang:
description: The language in which the target texts in the
glossary are specified.
type: string
example: de
example:
supported_languages:
- source_lang: de
target_lang: en
- source_lang: en
target_lang: de
400:
$ref: '#/components/responses/BadRequestGlossaries'
401:
$ref: '#/components/responses/Unauthorized'
403:
$ref: '#/components/responses/ForbiddenGlossaries'
404:
$ref: '#/components/responses/NotFound'
413:
$ref: '#/components/responses/PayloadTooLarge'
415:
$ref: '#/components/responses/UnsupportedMediaTypeGlossaries'
429:
$ref: '#/components/responses/TooManyRequests'
456:
$ref: '#/components/responses/QuotaExceeded'
500:
$ref: '#/components/responses/InternalServerError'
503:
$ref: '#/components/responses/ServiceUnavailable'
529:
$ref: '#/components/responses/TooManyRequests'
security:
- auth_header: []
/glossaries:
post:
tags:
- ManageGlossaries
summary: Create a Glossary
operationId: createGlossary
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateGlossaryParameters'
examples:
Basic:
value:
name: My Glossary
source_lang: en
target_lang: de
entries: "Hello\tGuten Tag"
entries_format: tsv
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/CreateGlossaryParameters'
responses:
201:
description: The function for creating a glossary returns a JSON object
containing the ID of the newly created glossary and a boolean flag that
indicates if the created glossary can already be used in translate requests.
content:
application/json:
schema:
$ref: '#/components/schemas/Glossary'
400:
$ref: '#/components/responses/BadRequestGlossaries'
401:
$ref: '#/components/responses/Unauthorized'
403:
$ref: '#/components/responses/ForbiddenGlossaries'
404:
$ref: '#/components/responses/NotFound'
413:
$ref: '#/components/responses/PayloadTooLarge'
415:
$ref: '#/components/responses/UnsupportedMediaTypeGlossaries'
429:
$ref: '#/components/responses/TooManyRequests'
456:
$ref: '#/components/responses/QuotaExceeded'
500:
$ref: '#/components/responses/InternalServerError'
503:
$ref: '#/components/responses/ServiceUnavailable'
529:
$ref: '#/components/responses/TooManyRequests'
security:
- auth_header: []
get:
tags:
- ManageGlossaries
summary: List all Glossaries
operationId: listGlossaries
description: List all glossaries and their meta-information, but not the glossary
entries.
responses:
200:
description: JSON object containing a the glossaries.
content:
application/json:
schema:
type: object
properties:
glossaries:
type: array
items:
$ref: '#/components/schemas/Glossary'
example:
glossaries:
- glossary_id: def3a26b-3e84-45b3-84ae-0c0aaf3525f7
name: My Glossary
ready: true
source_lang: EN
target_lang: DE
creation_time: '2021-08-03T14:16:18.329Z'
entry_count: 1
400:
$ref: '#/components/responses/BadRequestGlossaries'
401:
$ref: '#/components/responses/Unauthorized'
403:
$ref: '#/components/responses/ForbiddenGlossaries'
404:
$ref: '#/components/responses/NotFound'
413:
$ref: '#/components/responses/PayloadTooLarge'
415:
$ref: '#/components/responses/UnsupportedMediaTypeGlossaries'
429:
$ref: '#/components/responses/TooManyRequests'
456:
$ref: '#/components/responses/QuotaExceeded'
500:
$ref: '#/components/responses/InternalServerError'
503:
$ref: '#/components/responses/ServiceUnavailable'
529:
$ref: '#/components/responses/TooManyRequests'
security:
- auth_header: []
/glossaries/{glossary_id}:
get:
tags:
- ManageGlossaries
summary: Retrieve Glossary Details
description: Retrieve meta information for a single glossary, omitting the glossary
entries.
operationId: getGlossary
parameters:
- $ref: '#/components/parameters/GlossaryID'
responses:
200:
description: JSON object containing the glossary meta-information.
content:
application/json:
schema:
$ref: '#/components/schemas/Glossary'
example:
glossary_id: def3a26b-3e84-45b3-84ae-0c0aaf3525f7
name: My Glossary
ready: true
source_lang: EN
target_lang: DE
creation_time: '2021-08-03T14:16:18.329Z'
entry_count: 1
400:
$ref: '#/components/responses/BadRequestGlossaries'
401:
$ref: '#/components/responses/Unauthorized'
403:
$ref: '#/components/responses/ForbiddenGlossaries'
404:
$ref: '#/components/responses/NotFound'
413:
$ref: '#/components/responses/PayloadTooLarge'
415:
$ref: '#/components/responses/UnsupportedMediaTypeGlossaries'
429:
$ref: '#/components/responses/TooManyRequests'
456:
$ref: '#/components/responses/QuotaExceeded'
500:
$ref: '#/components/responses/InternalServerError'
503:
$ref: '#/components/responses/ServiceUnavailable'
529:
$ref: '#/components/responses/TooManyRequests'
security:
- auth_header: []
delete:
tags:
- ManageGlossaries
summary: Delete a Glossary
description: Deletes the specified glossary.
operationId: deleteGlossary
parameters:
- $ref: '#/components/parameters/GlossaryID'
responses:
204:
description: Returns no content upon success.
400:
$ref: '#/components/responses/BadRequestGlossaries'
401:
$ref: '#/components/responses/Unauthorized'
403:
$ref: '#/components/responses/ForbiddenGlossaries'
404:
$ref: '#/components/responses/NotFound'
413:
$ref: '#/components/responses/PayloadTooLarge'
415:
$ref: '#/components/responses/UnsupportedMediaTypeGlossaries'
429:
$ref: '#/components/responses/TooManyRequests'
456:
$ref: '#/components/responses/QuotaExceeded'
500:
$ref: '#/components/responses/InternalServerError'
503:
$ref: '#/components/responses/ServiceUnavailable'
529:
$ref: '#/components/responses/TooManyRequests'
security:
- auth_header: []
/glossaries/{glossary_id}/entries:
get:
tags:
- ManageGlossaries
summary: Retrieve Glossary Entries
operationId: getGlossaryEntries
description: List the entries of a single glossary in the format specified by
the `Accept` header.
parameters:
- $ref: '#/components/parameters/GlossaryID'
- name: Accept
in: header
schema:
type: string
enum:
- text/tab-separated-values
default: text/tab-separated-values
description: The requested format of the returned glossary entries. Currently,
supports only `text/tab-separated-values`.
examples:
tsv:
summary: Tab-separated Values
value:
in: header
Accept: text/tab-separated-values
responses:
200:
description: The entries in the requested format.
content:
text/tab-separated-values:
example: "Hello!\tGuten Tag!"
400:
$ref: '#/components/responses/BadRequestGlossaries'
401:
$ref: '#/components/responses/Unauthorized'
403:
$ref: '#/components/responses/ForbiddenGlossaries'
404:
$ref: '#/components/responses/NotFound'
413:
$ref: '#/components/responses/PayloadTooLarge'
415:
$ref: '#/components/responses/UnsupportedMediaTypeGlossaries'
429:
$ref: '#/components/responses/TooManyRequests'
456:
$ref: '#/components/responses/QuotaExceeded'
500:
$ref: '#/components/responses/InternalServerError'
503:
$ref: '#/components/responses/ServiceUnavailable'
529:
$ref: '#/components/responses/TooManyRequests'
security:
- auth_header: []
/usage:
get:
tags:
- MetaInformation
summary: Check Usage and Limits
operationId: getUsage
responses:
200:
description: The account's usage and limits.
content:
application/json:
schema:
type: object
properties:
character_count:
description: Characters translated so far in the current billing
period.
type: integer
format: int64
example: 180118
character_limit:
description: Current maximum number of characters that can be
translated per billing period. If cost control is set, the
cost control limit will be returned in this field.
type: integer
format: int64
example: 1250000
400:
$ref: '#/components/responses/BadRequest'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
413:
$ref: '#/components/responses/PayloadTooLarge'
429:
$ref: '#/components/responses/TooManyRequests'
456:
$ref: '#/components/responses/QuotaExceeded'
500:
$ref: '#/components/responses/InternalServerError'
504:
$ref: '#/components/responses/ServiceUnavailable'
529:
$ref: '#/components/responses/TooManyRequests'
security:
- auth_header: []
/languages:
get:
tags:
- MetaInformation
summary: Retrieve Supported Languages
operationId: getLanguages
parameters:
- name: type
in: query
schema:
type: string
enum:
- source
- target
default: source
description: Supported values are "source" or "target". If type parameter is not included, defaults to "source".
examples:
target:
summary: Target Languages
value:
in: query
type: target
responses:
200:
description: JSON array where each item represents a supported language.
content:
application/json:
schema:
type: array
items:
type: object
required:
- language
- name
properties:
language:
description: The language code of the given language.
type: string
example: DE
name:
description: Name of the language in English.
type: string
example: German
supports_formality:
description: Denotes formality support in case of a target language
listing.
type: boolean
example: true
example:
- language: BG
name: Bulgarian
supports_formality: false
- language: CS
name: Czech
supports_formality: false
- language: DA
name: Danish
supports_formality: false
- language: DE
name: German
supports_formality: true
- language: EL
name: Greek
supports_formality: false
- language: EN-GB
name: English (British)
supports_formality: false
- language: EN-US
name: English (American)
supports_formality: false
- language: ES
name: Spanish
supports_formality: true
- language: ET
name: Estonian
supports_formality: false
- language: FI
name: Finnish
supports_formality: false
- language: FR
name: French
supports_formality: true
- language: HU
name: Hungarian
supports_formality: false
- language: ID
name: Indonesian
supports_formality: false
- language: IT
name: Italian
supports_formality: true
- language: JA
name: Japanese
supports_formality: true
- language: KO
name: Korean
supports_formality: false
- language: LT
name: Lithuanian
supports_formality: false
- language: LV
name: Latvian
supports_formality: false
- language: NB
name: Norwegian (Bokmål)
supports_formality: false
- language: NL
name: Dutch
supports_formality: true
- language: PL