forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add TranslatorBatch API v1.1 (Azure#16705)
* add API v1.1 * Match v1.0 swagger * Remove unneeded changes * Address PR failures * Update readme * Update @failedDocumentStatusLink name * Fix swagger examples * Fixing swagger examples * Fix swagger * Address board review comments * move options to target level * remove the @ from failedDocumentStatusLink * switch the pdf output options to enum * Remove failedDocmentsStatusLink field from response * Update TranslatorText Readme file * Add collectionFormat Co-authored-by: Fady Essam <faanis@micrososft.com>
- Loading branch information
Showing
11 changed files
with
2,444 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,556 changes: 1,556 additions & 0 deletions
1,556
specification/cognitiveservices/data-plane/TranslatorText/stable/v1.1/TranslatorBatch.json
Large diffs are not rendered by default.
Oops, something went wrong.
59 changes: 59 additions & 0 deletions
59
specification/cognitiveservices/data-plane/TranslatorText/stable/v1.1/examples/batch.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "v1.1", | ||
"subscriptionId": "EA19050C-51FC-4B55-84E5-9EA7283601DA", | ||
"resourceGroupName": "TestResourceGroup", | ||
"endpoint": "{endpoint}", | ||
"Ocp-Apim-Subscription-Key": "{API key}", | ||
"body": { | ||
"inputs": [ | ||
{ | ||
"source": { | ||
"sourceUrl": "https://myblob.blob.core.windows.net/sourceContainer", | ||
"filter": { | ||
"prefix": "pre", | ||
"suffix": ".txt" | ||
}, | ||
"language": "en", | ||
"storageSource": "AzureBlob" | ||
}, | ||
"targets": [ | ||
{ | ||
"targetUrl": "https://myblob.blob.core.windows.net/destinationContainer1", | ||
"category": "general", | ||
"language": "fr", | ||
"glossaries": [ | ||
{ | ||
"glossaryUrl": "https://myblob.blob.core.windows.net/myglossary/en_fr_glossary.xlf", | ||
"format": "XLIFF", | ||
"storageSource": "AzureBlob" | ||
} | ||
], | ||
"options": { | ||
"pdfOutputAdditionalFormat": "None" | ||
}, | ||
"storageSource": "AzureBlob" | ||
}, | ||
{ | ||
"targetUrl": "https://myblob.blob.core.windows.net/destinationContainer2", | ||
"category": "general", | ||
"language": "es", | ||
"options": { | ||
"pdfOutputAdditionalFormat": "None" | ||
}, | ||
"storageSource": "AzureBlob" | ||
} | ||
], | ||
"storageType": "Folder" | ||
} | ||
] | ||
} | ||
}, | ||
"responses": { | ||
"202": { | ||
"headers": { | ||
"Operation-Location": "https://westus.cognitiveservices.azure.com/translator/text/batch/v1.1/operation/0FA2822F-4C2A-4317-9C20-658C801E0E55" | ||
} | ||
} | ||
} | ||
} |
100 changes: 100 additions & 0 deletions
100
specification/cognitiveservices/data-plane/TranslatorText/stable/v1.1/examples/cancel.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "v1.1", | ||
"subscriptionId": "EA19050C-51FC-4B55-84E5-9EA7283601DA", | ||
"resourceGroupName": "TestResourceGroup", | ||
"endpoint": "{endpoint}", | ||
"Ocp-Apim-Subscription-Key": "{API key}", | ||
"id": "727BF148-F327-47A0-9481-ABAE6362F11E" | ||
}, | ||
"responses": { | ||
"401": { | ||
"headers": {}, | ||
"body": { | ||
"error": { | ||
"code": "Unauthorized", | ||
"message": "User is not authorized", | ||
"target": "Operation", | ||
"innerError": { | ||
"code": "Unauthorized", | ||
"message": "Operation is not authorized" | ||
} | ||
} | ||
} | ||
}, | ||
"429": { | ||
"headers": {}, | ||
"body": { | ||
"error": { | ||
"code": "RequestRateTooHigh", | ||
"message": "User's request rate is too high", | ||
"target": "Operation", | ||
"innerError": { | ||
"code": "RateTooHigh", | ||
"message": "Request rate is too high" | ||
} | ||
} | ||
} | ||
}, | ||
"500": { | ||
"headers": {}, | ||
"body": { | ||
"error": { | ||
"code": "InternalServerError", | ||
"message": "Internal Server Error", | ||
"target": "Operation", | ||
"innerError": { | ||
"code": "InternalServerError", | ||
"message": "Unexpected internal server error has occurred" | ||
} | ||
} | ||
} | ||
}, | ||
"503": { | ||
"headers": {}, | ||
"body": { | ||
"error": { | ||
"code": "ServiceUnavailable", | ||
"message": "Service is temporary unavailable", | ||
"target": "Operation", | ||
"innerError": { | ||
"code": "ServiceTemporaryUnavailable", | ||
"message": "Service is currently unavailable. Please try again later" | ||
} | ||
} | ||
} | ||
}, | ||
"404": { | ||
"headers": {}, | ||
"body": { | ||
"error": { | ||
"code": "ResourceNotFound", | ||
"message": "id not found", | ||
"target": "Operation", | ||
"innerError": { | ||
"code": "ResourceNotFound", | ||
"message": "Resource requested is not found" | ||
} | ||
} | ||
} | ||
}, | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"id": "727bf148-f327-47a0-9481-abae6362f11e", | ||
"createdDateTimeUtc": "2020-03-26T00:00:00Z", | ||
"lastActionDateTimeUtc": "2020-03-26T01:00:00Z", | ||
"status": "Succeeded", | ||
"summary": { | ||
"total": 10, | ||
"failed": 1, | ||
"success": 9, | ||
"inProgress": 0, | ||
"notYetStarted": 0, | ||
"cancelled": 0, | ||
"totalCharacterCharged": 0 | ||
} | ||
} | ||
} | ||
} | ||
} |
100 changes: 100 additions & 0 deletions
100
specification/cognitiveservices/data-plane/TranslatorText/stable/v1.1/examples/document.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "v1.1", | ||
"subscriptionId": "EA19050C-51FC-4B55-84E5-9EA7283601DA", | ||
"resourceGroupName": "TestResourceGroup", | ||
"endpoint": "{endpoint}", | ||
"Ocp-Apim-Subscription-Key": "{API key}", | ||
"id": "727BF148-F327-47A0-9481-ABAE6362F11E", | ||
"documentId": "273622BD-835C-4946-9798-FD8F19F6BBF2" | ||
}, | ||
"responses": { | ||
"401": { | ||
"headers": {}, | ||
"body": { | ||
"error": { | ||
"code": "Unauthorized", | ||
"message": "User is not authorized", | ||
"target": "Document", | ||
"innerError": { | ||
"code": "Unauthorized", | ||
"message": "Operation is not authorized" | ||
} | ||
} | ||
} | ||
}, | ||
"429": { | ||
"headers": {}, | ||
"body": { | ||
"error": { | ||
"code": "RequestRateTooHigh", | ||
"message": "User's request rate is too high", | ||
"target": "Document", | ||
"innerError": { | ||
"code": "RateTooHigh", | ||
"message": "Request rate is too high" | ||
} | ||
} | ||
} | ||
}, | ||
"500": { | ||
"headers": {}, | ||
"body": { | ||
"error": { | ||
"code": "InternalServerError", | ||
"message": "Internal Server Error", | ||
"target": "Document", | ||
"innerError": { | ||
"code": "InternalServerError", | ||
"message": "Unexpected internal server error has occurred" | ||
} | ||
} | ||
} | ||
}, | ||
"503": { | ||
"headers": {}, | ||
"body": { | ||
"error": { | ||
"code": "ServiceUnavailable", | ||
"message": "Service is temporary unavailable", | ||
"target": "Document", | ||
"innerError": { | ||
"code": "ServiceTemporaryUnavailable", | ||
"message": "Service is currently unavailable. Please try again later" | ||
} | ||
} | ||
} | ||
}, | ||
"404": { | ||
"headers": {}, | ||
"body": { | ||
"error": { | ||
"code": "ResourceNotFound", | ||
"message": "id not found", | ||
"target": "Document", | ||
"innerError": { | ||
"code": "ResourceNotFound", | ||
"message": "Resource requested is not found" | ||
} | ||
} | ||
} | ||
}, | ||
"200": { | ||
"headers": { | ||
"retry-after": "30", | ||
"ETag": "686897696a7c876b7e" | ||
}, | ||
"body": { | ||
"path": "https://myblob.blob.core.windows.net/destinationContainer/fr/mydoc.txt", | ||
"sourcePath": "https://myblob.blob.core.windows.net/sourceContainer/fr/mydoc.txt", | ||
"createdDateTimeUtc": "2020-03-26T00:00:00Z", | ||
"lastActionDateTimeUtc": "2020-03-26T01:00:00Z", | ||
"status": "Running", | ||
"to": "fr", | ||
"progress": 0.1, | ||
"id": "273622bd-835c-4946-9798-fd8f19f6bbf2", | ||
"characterCharged": 0 | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.