GetModelAsyncPredict

更新时间:
复制 MD 格式

Retrieves the status and results of an asynchronous information extraction task.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

AsyncPredictId

integer

Yes

The unique identifier for an asynchronous prediction. Use this ID to query the results of the asynchronous task.

1

Response elements

Element

Type

Description

Example

object

The response object.

RequestId

string

The ID of the request.

3EAC98E6-8DD6-511F-8764-DEE8B6EB6BB4

Code

integer

The status code of the request. A value of 200 indicates that the request was successful.

200

Message

string

The response message.

success

Data

string

A JSON string that contains details about the asynchronous task, including the task status and the result URL.

{ "RequestId": "A9796F06-F1C4-1E89-8AFD-596583FF4B16", "Message": "", "Data": { "result": "https://doc-automl-public.oss-cn-hangzhou.aliyuncs.com/3/stage/data/XXXX/asyncPredict/713908/oss-933bbdf4-fa10-4c56-b6ab-9c85f32bbd0e.json?Expires=1991115127&OSSAccessKeyId=XXXX&Signature=5zYLY9yR%2B9Ok1WuRgHYdqtXHK10%3D", "asyncPredictId": 713908, "errorCode": 200, "errorMsg": "", "status": 2 }, "Code": 200 }

The status field in the Data object indicates the task status. Valid values are: 0 (not started), 1 (running), 2 (completed), and 3 (failed).

When the value of status is 2, the result field contains a URL to the model prediction results.

Examples

Success response

JSON format

{
  "RequestId": "3EAC98E6-8DD6-511F-8764-DEE8B6EB6BB4",
  "Code": 200,
  "Message": "success",
  "Data": "{\n  \"RequestId\": \"A9796F06-F1C4-1E89-8AFD-596583FF4B16\",\n  \"Message\": \"\",\n  \"Data\": {\n    \"result\": \"https://doc-automl-public.oss-cn-hangzhou.aliyuncs.com/3/stage/data/XXXX/asyncPredict/713908/oss-933bbdf4-fa10-4c56-b6ab-9c85f32bbd0e.json?Expires=1991115127&OSSAccessKeyId=XXXX&Signature=5zYLY9yR%2B9Ok1WuRgHYdqtXHK10%3D\",\n    \"asyncPredictId\": 713908,\n    \"errorCode\": 200,\n    \"errorMsg\": \"\",\n    \"status\": 2\n  },\n  \"Code\": 200\n}"
}

Error codes

HTTP status code

Error code

Error message

Description

200 21002 模板预测超时
200 21003 模板预测失败
200 10001 参数出错
200 10005 服务不存在
200 16001 未找到可预测的模型
200 13018 未找到模型信息
200 16004 指定的模型不存在
200 23002 获取资源HTTP异常
200 11002 账号没有开通服务
200 19999 未知异常

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.