diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json index 754fc38b80a1..2f49d9301271 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json @@ -108,7 +108,7 @@ "Document Translation" ], "summary": "Returns a list of batch requests submitted and the status for each request", - "description": "Returns a list of batch requests submitted and the status for each request.\r\nThis list only contains batch requests submitted by the user (based on the subscription). The status for each request is sorted by id.\r\n \r\nIf the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a partial result and include a continuation token in the response.\r\nThe absence of a continuation token means that no additional pages are available.\r\n \r\n$top and $skip query parameters can be used to specify a number of results to return and an offset for the collection.\r\n \r\nThe server honors the values specified by the client. However, clients must be prepared to handle responses that contain a different page size or contain a continuation token.\r\n \r\nWhen both $top and $skip are included, the server should first apply $skip and then $top on the collection.\r\nNote: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\r\nThis reduces the risk of the client making assumptions about the data returned.", + "description": "Returns a list of batch requests submitted and the status for each request.\r\nThis list only contains batch requests submitted by the user (based on the resource).\r\n \r\nIf the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a partial result and include a continuation token in the response.\r\nThe absence of a continuation token means that no additional pages are available.\r\n \r\n$top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\r\n \r\n$top indicates the total number of records the user wants to be returned across all pages.\r\n$skip indicates the number of records to skip from the list of batches based on the sorting method specified. By default, we sort by descending start time.\r\n$maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink will contain the link to the next page.\r\n \r\n$orderBy query parameter can be used to sort the returned list (ex \"$orderBy=createdDateTimeUtc asc\" or \"$orderBy=createdDateTimeUtc desc\").\r\nThe default sorting is descending by createdDateTimeUtc.\r\nSome query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled operations.\r\ncreatedDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\r\nThe supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\r\n \r\nThe server honors the values specified by the client. However, clients must be prepared to handle responses that contain a different page size or contain a continuation token.\r\n \r\nWhen both $top and $skip are included, the server should first apply $skip and then $top on the collection.\r\nNote: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\r\nThis reduces the risk of the client making assumptions about the data returned.", "operationId": "DocumentTranslation_GetOperations", "produces": [ "application/json" @@ -117,22 +117,76 @@ { "in": "query", "name": "$top", - "description": "Take the $top entries in the collection\r\nWhen both $top and $skip are supplied, $skip is applied first", + "description": "$top indicates the total number of records the user wants to be returned across all pages.\r\n \r\nClients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the collection.\r\nWhen both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the collection.\r\n \r\nNote: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about it instead of just ignoring the query options.", "type": "integer", "format": "int32", - "default": 50, - "maximum": 100, - "minimum": 1 + "maximum": 2147483647, + "minimum": 0 }, { "in": "query", "name": "$skip", - "description": "Skip the $skip entries in the collection\r\nWhen both $top and $skip are supplied, $skip is applied first", + "description": "$skip indicates the number of records to skip from the list of records held by the server based on the sorting method specified. By default, we sort by descending start time.\r\n \r\nClients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the collection.\r\nWhen both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the collection.\r\n \r\nNote: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about it instead of just ignoring the query options.", "type": "integer", "format": "int32", "default": 0, "maximum": 2147483647, "minimum": 0 + }, + { + "in": "query", + "name": "$maxpagesize", + "description": "$maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink will contain the link to the next page.\r\n \r\nClients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The server SHOULD honor this preference if the specified page size is smaller than the server's default page size.", + "type": "integer", + "format": "int32", + "default": 50, + "maximum": 100, + "minimum": 1 + }, + { + "in": "query", + "name": "ids", + "description": "Ids to use in filtering", + "type": "array", + "items": { + "format": "uuid", + "type": "string" + }, + "maxLength": 25 + }, + { + "in": "query", + "name": "statuses", + "description": "Statuses to use in filtering", + "type": "array", + "items": { + "type": "string" + }, + "maxLength": 5 + }, + { + "in": "query", + "name": "createdDateTimeUtcStart", + "description": "the start datetime to get items after", + "type": "string", + "format": "date-time" + }, + { + "in": "query", + "name": "createdDateTimeUtcEnd", + "description": "the end datetime to get items before", + "type": "string", + "format": "date-time" + }, + { + "in": "query", + "name": "$orderBy", + "description": "the sorting query for the collection (ex: 'CreatedDateTimeUtc asc', 'CreatedDateTimeUtc desc')", + "type": "array", + "items": { + "type": "string" + }, + "maxLength": 1 } ], "responses": { @@ -509,7 +563,7 @@ "Document Translation" ], "summary": "Returns the status for all documents in a batch document translation request", - "description": "Returns the status for all documents in a batch document translation request.\r\n \r\nThe documents included in the response are sorted by document Id in descending order. If the number of documents in the response exceeds our paging limit, server-side paging is used.\r\nPaginated responses indicate a partial result and include a continuation token in the response. The absence of a continuation token means that no additional pages are available.\r\n \r\n$top and $skip query parameters can be used to specify a number of results to return and an offset for the collection.\r\nThe server honors the values specified by the client. However, clients must be prepared to handle responses that contain a different page size or contain a continuation token.\r\n \r\nWhen both $top and $skip are included, the server should first apply $skip and then $top on the collection.\r\nNote: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\r\nThis reduces the risk of the client making assumptions about the data returned.", + "description": "Returns the status for all documents in a batch document translation request.\r\n \r\nIf the number of documents in the response exceeds our paging limit, server-side paging is used.\r\nPaginated responses indicate a partial result and include a continuation token in the response. The absence of a continuation token means that no additional pages are available.\r\n \r\n$top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\r\n \r\n$top indicates the total number of records the user wants to be returned across all pages.\r\n$skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time.\r\n$maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink will contain the link to the next page.\r\n \r\n$orderBy query parameter can be used to sort the returned list (ex \"$orderBy=createdDateTimeUtc asc\" or \"$orderBy=createdDateTimeUtc desc\").\r\nThe default sorting is descending by createdDateTimeUtc.\r\nSome query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled documents.\r\ncreatedDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\r\nThe supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\r\n \r\nWhen both $top and $skip are included, the server should first apply $skip and then $top on the collection.\r\nNote: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\r\nThis reduces the risk of the client making assumptions about the data returned.", "operationId": "DocumentTranslation_GetOperationDocumentsStatus", "produces": [ "application/json" @@ -526,22 +580,76 @@ { "in": "query", "name": "$top", - "description": "Take the $top entries in the collection\r\nWhen both $top and $skip are supplied, $skip is applied first", + "description": "$top indicates the total number of records the user wants to be returned across all pages.\r\n \r\nClients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the collection.\r\nWhen both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the collection.\r\n \r\nNote: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about it instead of just ignoring the query options.", "type": "integer", "format": "int32", - "default": 50, - "maximum": 100, - "minimum": 1 + "maximum": 2147483647, + "minimum": 0 }, { "in": "query", "name": "$skip", - "description": "Skip the $skip entries in the collection\r\nWhen both $top and $skip are supplied, $skip is applied first", + "description": "$skip indicates the number of records to skip from the list of records held by the server based on the sorting method specified. By default, we sort by descending start time.\r\n \r\nClients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the collection.\r\nWhen both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the collection.\r\n \r\nNote: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about it instead of just ignoring the query options.", "type": "integer", "format": "int32", "default": 0, "maximum": 2147483647, "minimum": 0 + }, + { + "in": "query", + "name": "$maxpagesize", + "description": "$maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink will contain the link to the next page.\r\n \r\nClients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The server SHOULD honor this preference if the specified page size is smaller than the server's default page size.", + "type": "integer", + "format": "int32", + "default": 50, + "maximum": 100, + "minimum": 1 + }, + { + "in": "query", + "name": "ids", + "description": "Ids to use in filtering", + "type": "array", + "items": { + "format": "uuid", + "type": "string" + }, + "maxLength": 25 + }, + { + "in": "query", + "name": "statuses", + "description": "Statuses to use in filtering", + "type": "array", + "items": { + "type": "string" + }, + "maxLength": 5 + }, + { + "in": "query", + "name": "createdDateTimeUtcStart", + "description": "the start datetime to get items after", + "type": "string", + "format": "date-time" + }, + { + "in": "query", + "name": "createdDateTimeUtcEnd", + "description": "the end datetime to get items before", + "type": "string", + "format": "date-time" + }, + { + "in": "query", + "name": "$orderBy", + "description": "the sorting query for the collection (ex: 'CreatedDateTimeUtc asc', 'CreatedDateTimeUtc desc')", + "type": "array", + "items": { + "type": "string" + }, + "maxLength": 1 } ], "responses": { @@ -650,6 +758,13 @@ "description": "Returns the list of supported document file formats", "schema": { "$ref": "#/definitions/FileFormatListResult" + }, + "headers": { + "Retry-After": { + "description": "Indicates how long to wait before making a new request.", + "type": "integer", + "format": "int32" + } } }, "429": { @@ -706,6 +821,13 @@ "description": "Returns the list of supported glossary file formats", "schema": { "$ref": "#/definitions/FileFormatListResult" + }, + "headers": { + "Retry-After": { + "description": "Indicates how long to wait before making a new request.", + "type": "integer", + "format": "int32" + } } }, "429": { @@ -762,6 +884,13 @@ "description": "Successful request and returns the list of storage sources", "schema": { "$ref": "#/definitions/StorageSourceListResult" + }, + "headers": { + "Retry-After": { + "description": "Indicates how long to wait before making a new request.", + "type": "integer", + "format": "int32" + } } }, "429": { @@ -863,6 +992,7 @@ "Glossary": { "description": "Glossary / translation memory for the request", "required": [ + "format", "glossaryUrl" ], "type": "object", @@ -878,7 +1008,7 @@ "example": "XLIFF" }, "version": { - "description": "Version", + "description": "Optional Version. If not specified, default is used.", "type": "string", "example": "2.0" }, @@ -1090,6 +1220,7 @@ "ErrorV2": { "description": "This contains an outer error with error code, message, details, target and an inner error with more descriptive details.", "required": [ + "code", "message" ], "type": "object", @@ -1232,8 +1363,8 @@ "createdDateTimeUtc", "id", "lastActionDateTimeUtc", - "path", "progress", + "sourcePath", "status", "to" ], @@ -1244,6 +1375,11 @@ "type": "string", "example": "https://myblob.blob.core.windows.net/mycontainer/fr/mydoc.txt" }, + "sourcePath": { + "description": "Location of the source document", + "type": "string", + "example": "https://myblob.blob.core.windows.net/mycontainer/fr/mydoc.txt" + }, "createdDateTimeUtc": { "format": "date-time", "description": "Operation created date time", @@ -1309,6 +1445,11 @@ } }, "FileFormat": { + "required": [ + "contentTypes", + "fileExtensions", + "format" + ], "type": "object", "properties": { "format": { @@ -1330,6 +1471,10 @@ "type": "string" } }, + "defaultVersion": { + "description": "Default version if none is specified", + "type": "string" + }, "versions": { "description": "Supported Version", "type": "array", diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/document.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/document.json index f5f45731270f..76c2ce7ddd20 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/document.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/document.json @@ -86,6 +86,7 @@ }, "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", diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json index c92c6b7ecd02..c46aac3ed75a 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json @@ -6,8 +6,19 @@ "endpoint": "{endpoint}", "Ocp-Apim-Subscription-Key": "{API key}", "id": "727BF148-F327-47A0-9481-ABAE6362F11E", - "$top": 5, - "$skip": 10 + "$top": 2, + "$skip": 0, + "$maxpagesize": 1, + "$orderBy": "CreatedDateTimeUtc asc", + "createdDateTimeUtcStart": "2021-03-23T07:03:38.0136316Z", + "createdDateTimeUtcEnd": "2021-03-25T07:03:38.0136316Z", + "statuses": [ + "Succeeded" + ], + "ids": [ + "273622bd-835c-4946-9798-fd8f19f6bbf2", + "511b6a66-a6f8-4640-83e1-48c325e9fa29" + ] }, "responses": { "401": { @@ -89,8 +100,9 @@ "value": [ { "path": "https://myblob.blob.core.windows.net/destinationContainer/fr/mydoc.txt", - "createdDateTimeUtc": "2020-03-26T00:00:00Z", - "lastActionDateTimeUtc": "2020-03-26T01:00:00Z", + "sourcePath": "https://myblob.blob.core.windows.net/sourceContainer/fr/mydoc.txt", + "createdDateTimeUtc": "2021-03-23T07:03:39.013631Z", + "lastActionDateTimeUtc": "2021-03-23T07:03:41.012452Z", "status": "Running", "to": "fr", "progress": 0.1, @@ -98,7 +110,7 @@ "characterCharged": 0 } ], - "@nextLink": "https://westus.cognitiveservices.azure.com/translator/text/batch/v1.0.preview.1/operation/0FA2822F-4C2A-4317-9C20-658C801E0E55/documents?$top=5&$skip=15" + "@nextLink": "https://westus.cognitiveservices.azure.com/translator/text/batch/v1.0.preview.1/operation/0FA2822F-4C2A-4317-9C20-658C801E0E55/documents?$top=1&$skip=1&$maxpagesize=1&$orderBy=CreatedDateTimeUtc%20asc&createdDateTimeUtcStart=2021-03-23T00:03:38.0136316Z&createdDateTimeUtcEnd=2021-03-25T00:03:38.0136316&statuses=Succeeded&ids=273622BD-835C-4946-9798-FD8F19F6BBF2,511B6A66-A6F8-4640-83E1-48C325E9FA29" } }, "400": { diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/format.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/format.json index fe48785fe1ae..75b787a30523 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/format.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/format.json @@ -48,6 +48,7 @@ }, "200": { "headers": { + "retry-after": "30", "ETag": "686897696a7c876b7e" }, "body": { @@ -59,8 +60,7 @@ ], "contentTypes": [ "text/plain" - ], - "versions": [] + ] }, { "format": "PortableDocumentFormat", @@ -69,8 +69,16 @@ ], "contentTypes": [ "application/pdf" + ] + }, + { + "format": "OpenXmlWord", + "fileExtensions": [ + ".docx" ], - "versions": [] + "contentTypes": [ + "application/vnd.openxmlformats-officedocument.wordprocessingml.document" + ] }, { "format": "OpenXmlPresentation", @@ -79,8 +87,7 @@ ], "contentTypes": [ "application/vnd.openxmlformats-officedocument.presentationml.presentation" - ], - "versions": [] + ] }, { "format": "OpenXmlSpreadsheet", @@ -89,38 +96,17 @@ ], "contentTypes": [ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" - ], - "versions": [] - }, - { - "format": "OutlookMailMessage", - "fileExtensions": [ - ".msg" - ], - "contentTypes": [ - "application/vnd.ms-outlook" - ], - "versions": [] + ] }, { "format": "HtmlFile", "fileExtensions": [ - ".html" + ".html", + ".htm" ], "contentTypes": [ "text/html" - ], - "versions": [] - }, - { - "format": "OpenXmlWord", - "fileExtensions": [ - ".docx" - ], - "contentTypes": [ - "application/vnd.openxmlformats-officedocument.wordprocessingml.document" - ], - "versions": [] + ] } ] } diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/glossary.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/glossary.json index ec73e440dbb8..0b638db5c8ac 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/glossary.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/glossary.json @@ -48,6 +48,7 @@ }, "200": { "headers": { + "retry-after": "30", "ETag": "686897696a7c876b7e" }, "body": { @@ -60,6 +61,7 @@ "contentTypes": [ "application/xliff+xml" ], + "defaultVersion": "1.2", "versions": [ "1.0", "1.1", diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json index be97db209ed7..0a03ff0e78f4 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json @@ -4,7 +4,19 @@ "subscriptionId": "EA19050C-51FC-4B55-84E5-9EA7283601DA", "resourceGroupName": "TestResourceGroup", "endpoint": "{endpoint}", - "Ocp-Apim-Subscription-Key": "{API key}" + "Ocp-Apim-Subscription-Key": "{API key}", + "$top": 1, + "$skip": 0, + "$maxpagesize": 10, + "$orderBy": "CreatedDateTime asc", + "createdDateTimeUtcStart": "2021-03-23T07:03:38.0136316Z", + "createdDateTimeUtcEnd": "2021-03-25T07:03:38.0136316Z", + "statuses": [ + "Succeeded" + ], + "ids": [ + "273622bd-835c-4946-9798-fd8f19f6bbf2" + ] }, "responses": { "401": { @@ -71,9 +83,9 @@ "body": { "value": [ { - "id": "727bf148-f327-47a0-9481-abae6362f11e", - "createdDateTimeUtc": "2020-03-26T00:00:00Z", - "lastActionDateTimeUtc": "2020-03-26T01:00:00Z", + "id": "273622bd-835c-4946-9798-fd8f19f6bbf2", + "createdDateTimeUtc": "2021-03-23T07:03:30.013631Z", + "lastActionDateTimeUtc": "2021-03-26T01:00:00Z", "status": "Succeeded", "summary": { "total": 10, @@ -82,7 +94,7 @@ "inProgress": 0, "notYetStarted": 0, "cancelled": 0, - "totalCharacterCharged": 0 + "totalCharacterCharged": 1000 } } ] diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/storage.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/storage.json index 3a3064ae73c1..1180d718fd99 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/storage.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/storage.json @@ -48,6 +48,7 @@ }, "200": { "headers": { + "retry-after": "30", "ETag": "686897696a7c876b7e" }, "body": {