document_statuses
Creates, updates, deletes, gets or lists a document_statuses resource.
Overview
| Name | document_statuses |
| Type | Resource |
| Id | azure.ai_translation_document.document_statuses |
Fields
The following fields are returned by SELECT queries:
- list_document_statuses
| Name | Datatype | Description |
|---|---|---|
id | string | Document Id. Required. |
characterCharged | integer | Character charged by the API. |
createdDateTimeUtc | string (date-time) | Operation created date time. Required. |
error | object | This contains an outer error with error code, message, details, target and an inner error with more descriptive details. |
lastActionDateTimeUtc | string (date-time) | Date time in which the operation's status has been updated. Required. |
path | string | Location of the document or folder. |
progress | number | Progress of the translation if available. Required. |
sourcePath | string | Location of the source document. Required. |
status | string | List of possible statuses for job or document. Required. Known values are: "NotStarted", "Running", "Succeeded", "Failed", "Cancelled", "Cancelling", and "ValidationFailed". (NotStarted, Running, Succeeded, Failed, Cancelled, Cancelling, ValidationFailed) |
to | string | To language. Required. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_document_statuses | select | id, endpoint | top, skip, maxpagesize, ids, statuses, createdDateTimeUtcStart, createdDateTimeUtcEnd, orderby | Returns the status for all documents in a batch document translation request. Returns the status for all documents in a batch document translation request. If the number of documents in the response exceeds our paging limit, server-side paging is used. Paginated 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. top, skip and maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection. top indicates the total number of records the user wants to be returned across all pages. 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. 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. orderby query parameter can be used to sort the returned list (ex "orderby=createdDateTimeUtc asc" or "orderby=createdDateTimeUtc desc"). The default sorting is descending by createdDateTimeUtc. Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return succeeded and cancelled documents. createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by. The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd). When both top and skip are included, the server should first apply skip and then top on the collection. Note: 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. This reduces the risk of the client making assumptions about the data returned. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
endpoint | string | The service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: ) |
id | string | Format - uuid. The operation id. Required. |
createdDateTimeUtcEnd | string (date-time) | the end datetime to get items before. Default value is None. |
createdDateTimeUtcStart | string (date-time) | the start datetime to get items after. Default value is None. |
ids | array | Ids to use in filtering. Default value is None. |
maxpagesize | integer | |
orderby | array | the sorting query for the collection (ex: 'CreatedDateTimeUtc asc','CreatedDateTimeUtc desc'). Default value is None. |
skip | integer | 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. Clients MAY use top and skip query parameters to specify a number of results to return and an offset into the collection. When both top and skip are given by a client, the server SHOULD first apply skip and then top on the collection. Note: 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. Default value is None. |
statuses | array | Statuses to use in filtering. Default value is None. |
top | integer | top indicates the total number of records the user wants to be returned across all pages. Clients MAY use top and skip query parameters to specify a number of results to return and an offset into the collection. When both top and skip are given by a client, the server SHOULD first apply skip and then top on the collection. Note: 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. Default value is None. |
SELECT examples
- list_document_statuses
Returns the status for all documents in a batch document translation request. Returns the status for all documents in a batch document translation request. If the number of documents in the response exceeds our paging limit, server-side paging is used. Paginated 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. top, skip and maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection. top indicates the total number of records the user wants to be returned across all pages. 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. 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. orderby query parameter can be used to sort the returned list (ex "orderby=createdDateTimeUtc asc" or "orderby=createdDateTimeUtc desc"). The default sorting is descending by createdDateTimeUtc. Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return succeeded and cancelled documents. createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by. The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd). When both top and skip are included, the server should first apply skip and then top on the collection. Note: 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. This reduces the risk of the client making assumptions about the data returned.
SELECT
id,
characterCharged,
createdDateTimeUtc,
error,
lastActionDateTimeUtc,
path,
progress,
sourcePath,
status,
to
FROM azure.ai_translation_document.document_statuses
WHERE id = '{{ id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND top = '{{ top }}'
AND skip = '{{ skip }}'
AND maxpagesize = '{{ maxpagesize }}'
AND ids = '{{ ids }}'
AND statuses = '{{ statuses }}'
AND createdDateTimeUtcStart = '{{ createdDateTimeUtcStart }}'
AND createdDateTimeUtcEnd = '{{ createdDateTimeUtcEnd }}'
AND orderby = '{{ orderby }}'
;