"description":"Microsoft Azure Cognitive Services Translator lets you to translate text and documents over 100 languages using general or custom models.",
"description":"Unauthorized. Check your credentials.",
"schema":{
"$ref":"#/definitions/ErrorResponse"
}
},
"403":{
"description":"The request isn't authorized. Check the details of the error message. This status code often indicates that all free translations provided with a trial subscription have been used up.",
"schema":{
"$ref":"#/definitions/ErrorResponse"
}
},
"408":{
"description":"The request couldn't be fulfilled because a resource is missing.",
"schema":{
"$ref":"#/definitions/ErrorResponse"
}
},
"429":{
"description":"The server rejected the request because the client has exceeded request limits.",
"schema":{
"$ref":"#/definitions/ErrorResponse"
}
},
"500":{
"description":"Internal Server Error.",
"schema":{
"$ref":"#/definitions/ErrorResponse"
}
},
"503":{
"description":"Service is currently unavailable. Try again later.",
"schema":{
"$ref":"#/definitions/ErrorResponse"
}
}
},
"summary":"Translate text",
"description":"Translate specified source language text into the target language text.",
"operationId":"Translate",
"consumes":[
"application/json"
],
"produces":[
"application/json"
],
"parameters":[
{
"name":"Content-Type",
"description":"Content type like application/json.",
"default":"application/json",
"in":"header",
"required":true,
"type":"string",
"x-ms-visibility":"internal"
},
{
"name":"api-version",
"description":"Version of the API requested by the client. Value must be 3.0.",
"default":"3.0",
"in":"query",
"required":true,
"type":"string",
"x-ms-visibility":"internal"
},
{
"name":"from",
"in":"query",
"required":true,
"description":"The source language code (example: 'en'). If the source language code isn't specified, automatic language detection is applied to determine the source language.",
"description":"A string specifying the category (domain) of the translation. This parameter is used to get translations from a customized system built with Custom Translator.",
"required":false,
"x-ms-summary":"Category",
"x-ms-visibility":"advanced",
"default":"general",
"type":"string"
},
{
"name":"allowFallback",
"in":"query",
"description":"Specifies that the service is allowed to fall back to a general system when a custom system doesn't exist.",
"required":false,
"x-ms-summary":"Allow fallback to general domain",
"description":"Unauthorized. Check your credentials.",
"schema":{
"$ref":"#/definitions/ErrorResponse"
}
},
"403":{
"description":"The request is not authorized. Check the details of the error message. This often indicates that all free translations provided with a trial subscription have been used up.",
"schema":{
"$ref":"#/definitions/ErrorResponse"
}
},
"429":{
"description":"Request rate is too high.",
"schema":{
"$ref":"#/definitions/ErrorResponse"
}
},
"500":{
"description":"Internal Server Error.",
"schema":{
"$ref":"#/definitions/ErrorResponse"
}
},
"503":{
"description":"Service is currently unavailable. Try again later.",
"schema":{
"$ref":"#/definitions/ErrorResponse"
}
}
},
"summary":"Transliterate",
"description":"Converts text in one language from one script to another script.",
"operationId":"Transliterate",
"consumes":[
"application/json"
],
"produces":[
"application/json"
],
"parameters":[
{
"name":"Content-Type",
"description":"Content type like application/json.",
"default":"application/json",
"in":"header",
"required":true,
"type":"string",
"x-ms-visibility":"internal"
},
{
"name":"api-version",
"description":"Version of the API requested by the client. Value must be 3.0.",
"default":"3.0",
"in":"query",
"required":true,
"type":"string",
"x-ms-visibility":"internal"
},
{
"name":"language",
"in":"query",
"description":"Specifies the language of the text to convert from one script to another.",
"required":true,
"x-ms-summary":"Language",
"x-ms-dynamic-values":{
"operationId":"GetTransliterationLanguages",
"value-path":"Code",
"value-title":"Name"
},
"type":"string",
"x-ms-test-value":"en"
},
{
"name":"fromScript",
"in":"query",
"description":"The name of the script of the input text.",
"required":true,
"x-ms-summary":"Source script",
"x-ms-visibility":"important",
"x-ms-dynamic-values":{
"operationId":"GetTransliterationFromScripts",
"parameters":{
"language":{
"parameter":"language"
}
},
"value-path":"Code",
"value-title":"Name"
},
"x-ms-test-value":"Latn",
"type":"string"
},
{
"name":"toScript",
"in":"query",
"description":"The name of the script of the transliterated text.",
"required":true,
"x-ms-summary":"Target script",
"x-ms-visibility":"important",
"x-ms-dynamic-values":{
"operationId":"GetTransliterationToScripts",
"parameters":{
"language":{
"parameter":"language"
},
"fromScript":{
"parameter":"fromScript"
}
},
"value-path":"Code",
"value-title":"Name"
},
"x-ms-test-value":"Latn",
"type":"string"
},
{
"name":"body",
"in":"body",
"required":true,
"schema":{
"type":"array",
"items":{
"type":"object",
"properties":{
"Text":{
"type":"string",
"title":"Text",
"description":"Text to translate.",
"x-ms-visibility":"important",
"default":"Hello"
}
},
"required":[
"Text"
]
},
"required":[
"items"
]
}
}
],
"x-ms-visibility":"important"
}
},
"/translator/text/batch/v1.1/batches/":{
"post":{
"responses":{
"202":{
"description":"Successful. The batch request is created.",
"schema":{
"type":"object",
"properties":{
"operationID":{
"description":"Operation ID.",
"type":"string"
}
}
},
"headers":{
"apim-request-id":{
"description":"Apim request id.",
"type":"string"
},
"content-length":{
"description":"Content length. ",
"type":"integer"
},
"date":{
"description":"Date and time in which the request is submitted.",
"type":"string"
},
"operation-location":{
"description":"The header Operation-Location will indicate a status url with the operation ID.HeadersOperation-Location: string",
"type":"string"
},
"request-context":{
"description":"Request context.",
"type":"string"
},
"strict-transport-security":{
"description":"Strict transport security.",
"type":"string"
},
"x-content-type-options":{
"description":"Content types for this document format.",
"type":"string"
},
"x-ms-function-status":{
"description":"Status of document translation job.",
"type":"string"
},
"x-powered-by":{
"description":"X-powered by.",
"type":"string"
},
"x-requestid":{
"description":"Document translation request ID. Value of this is same as APIM request Id",
"x-ms-summary":"Location of the source documents",
"description":"The location of the source document(s) which can be a single file or a folder. This location is a URL link from your Azure blob storage.",
"x-ms-visibility":"important"
},
"documentFilterPrefix":{
"type":"string",
"x-ms-summary":"Prefix filter",
"description":"A case-sensitive prefix string to filter documents in the source path for translation. For example, when using an Azure storage blob Uri, use the prefix to restrict sub folders for translation.",
"x-ms-visibility":"advanced"
},
"documentFilterSuffix":{
"type":"string",
"x-ms-summary":"Suffix filter",
"description":"A case-sensitive suffix string to filter documents in the source path for translation. It's most often use for file extensions.",
"x-ms-visibility":"advanced"
},
"targetCategory":{
"type":"string",
"x-ms-summary":"Category",
"description":"A string specifying the category (domain) of the translation. This parameter is used to get translations from a customized system built with Custom Translator.",
"x-ms-visibility":"advanced"
},
"targetContainerURL":{
"type":"string",
"x-ms-summary":"Location of the translated documents",
"description":"The location where the translated documents will be stored. This location is a URL link from your Azure blob storage.",
"x-ms-visibility":"important"
},
"targetLanguage":{
"type":"string",
"x-ms-summary":"Target language",
"description":"Target language code.",
"x-ms-visibility":"important",
"x-ms-dynamic-values":{
"operationId":"GetTranslateSupportedLanguages",
"value-path":"Code",
"value-title":"Name"
}
},
"glossaryUrl":{
"type":"string",
"x-ms-summary":"Glossary URL",
"description":"The location of the glossary documents. This location is a URL link from your Azure blob storage.",
"x-ms-visibility":"advanced"
},
"glossaryFormatVersion":{
"type":"string",
"x-ms-summary":"Glossary document format and version",
"description":"Glossary document format and version.",
"x-ms-visibility":"advanced",
"x-ms-dynamic-values":{
"operationId":"GetGlossaryFormatVersion",
"value-path":"FormatVersionCode",
"value-title":"FormatVersionName"
}
}
}
},
"TranslationErrorResponse":{
"type":"object",
"properties":{
"error":{
"type":"object",
"properties":{
"code":{
"type":"string",
"description":"Gets high-level error code."
},
"message":{
"type":"string",
"description":"Gets high-level error message."
},
"target":{
"type":"string",
"description":"Gets the source of the error. For example, it would be documents or document ID in case of an invalid document."
},
"innerError":{
"type":"object",
"properties":{
"code":{
"type":"string",
"description":"Gets code error string."
},
"message":{
"type":"string",
"description":"Gets high-level error message."
},
"target":{
"type":"string",
"description":"Gets the source of the error. For example, it would be documents or document id if there was an invalid document."
}
},
"description":"New inner error format that conforms to Cognitive Services API guidelines. This contains required properties like ErrorCode, message, and optional properties target, details (key value pair), inner error (this can be nested)."
}
},
"description":"Translation error response."
}
}
},
"ErrorResponse":{
"type":"object",
"properties":{
"error":{
"type":"object",
"properties":{
"code":{
"type":"string",
"description":"Gets high-level error code."
},
"message":{
"type":"string",
"description":"Gets high-level error message."
},
"innerError":{
"type":"object",
"properties":{
"code":{
"type":"string",
"description":"Gets code error string."
},
"message":{
"type":"string",
"description":"Gets high-level error message."
},
"target":{
"type":"string",
"description":"Gets the source of the error. For example, it would be documents or document id if there was an invalid document."
}
},
"description":"New inner error format that conforms to Cognitive Services API guidelines. This contains required properties like ErrorCode, message, and optional properties target, details (key value pair), inner error (this can be nested)."
}
},
"description":"Error response."
}
}
},
"FormatOKResponse":{
"type":"object",
"properties":{
"value":{
"type":"array",
"items":{
"type":"object",
"properties":{
"format":{
"type":"string",
"description":"Name of the document format."
},
"fileExtensions":{
"type":"array",
"items":{
"type":"string"
},
"description":"Supported file extension for this format."
},
"contentTypes":{
"type":"array",
"items":{
"type":"string"
},
"description":"Supported Content-Types for this format."
},
"versions":{
"type":"array",
"items":{
"type":"string"
},
"description":"Supported version."
},
"defaultVersion":{
"type":"string",
"description":"Default version if none is specified."
}
}
},
"description":"File format with details."
}
}
},
"TranslationStatusResponse":{
"type":"object",
"properties":{
"id":{
"type":"string",
"description":"ID of the operation."
},
"createdDateTimeUtc":{
"type":"string",
"description":"Operation created date time."
},
"lastActionDateTimeUtc":{
"type":"string",
"description":"Date time in which the operation's status has been updated."
},
"status":{
"type":"string",
"description":"List of possible statuses for job or document like Canceled, Cancelling, Failed, NotStarted, Running, Succeeded, ValidationFailed."
},
"summary":{
"type":"object",
"properties":{
"total":{
"type":"integer",
"format":"int32",
"description":"Count of total documents."
},
"failed":{
"type":"integer",
"format":"int32",
"description":"Count of documents failed."
},
"success":{
"type":"integer",
"format":"int32",
"description":"Count of documents successfully translated."
},
"inProgress":{
"type":"integer",
"format":"int32",
"description":"Count of documents in progress."
},
"notYetStarted":{
"type":"integer",
"format":"int32",
"description":"Count of documents not yet started processing."
},
"cancelled":{
"type":"integer",
"format":"int32",
"description":"Count of documents canceled."
},
"totalCharacterCharged":{
"type":"integer",
"format":"int32",
"description":"Total count of characters charged."
}
},
"description":"Summary containing the details."
}
}
},
"DocumentStatusResponse":{
"type":"object",
"properties":{
"path":{
"type":"string",
"description":"Location of the document or folder."
},
"sourcePath":{
"type":"string",
"description":"Location of the source document."
},
"createdDateTimeUtc":{
"type":"string",
"description":"Operation created date time."
},
"lastActionDateTimeUtc":{
"type":"string",
"description":"Date time in which the operation's status has been updated."
},
"status":{
"type":"string",
"description":"List of possible statuses for job or document like Canceled, Cancelling, Failed, NotStarted, Running, Succeeded, ValidationFailed."
},
"to":{
"type":"string",
"description":"Target language."
},
"progress":{
"type":"integer",
"format":"int32",
"description":"Progress of the translation if available."