返回结果
响应消息头
对应请求消息头,响应同样也有消息头,如“Content-type”。例如表1所示。
响应消息体
响应消息体通常以结构化格式返回,与响应消息头中Content-type对应,传递除响应消息头之外的内容。
为篇幅起见,这里只展示部分内容,以求解器查询任务返回结果为例。
{
"task_id": "244fxxxx-0xxx-4xxx-a248-ce26cff7xxxx",
"input_json": null,
"status": "Succeeded",
"progress": {
"Gap": "0.0000%"
},
"output_json": {
"outputs": [
{
"data": {
"bucket": "oroas-bi-data",
"object": "oroas-optvsolver/output/244fxxxx-0xxx-4xxx-a248-ce26cff7xxxx/result.sol"
},
"type": "obs"
},
{
"data": {
"bucket": "oroas-bi-data",
"object": "oroas-optvsolver/output/244fxxxx-0xxx-4xxx-a248-ce26cff7xxxx/progress.info"
},
"type": "obs"
}
],
"solve_results": {
"gap": "0.0000%",
"node": "7",
"time": "2.93",
"status": "Optimal solution found",
"best_bound": "1.881820000000e+05",
"lp_iteration": "16147",
"best_solution": "1.881820000000e+05"
}
},
"start_time": "2024-10-28T08:28:14.894Z",
"end_time": "2024-10-28T08:28:30.042Z",
"create_time": "2024-10-28T08:28:11.578Z"
}
当接口调用出错时,会返回错误码及错误信息说明,错误响应的Body体格式如下所示。
{
"error_code": "optverse.00000006",
"error_msg": "Input data validate error: xxxxxxxxxxxxxxxxxxxxxxx\n"
}
其中,error_code表示错误码,error_msg表示错误描述信息。