API:获取转换状态
GET https://api.bimface.com/translate
应用发起转换以后,可以通过该接口查询转换状态。
请求(Request)
Header
key |
value |
示例 |
Authorization |
bearer {accessToken} |
bearer xxxx-xxxx-xxxx-xxxx |
Content-Type |
application/json |
… |
Url Parameter
字段 |
类型 |
必填 |
描述 |
示例 |
fileId |
Number |
Y |
文件id |
857482189666208 |
Request Body
无
curl -X GET
-H "Authorization: bearer <your accessToken>"
-H "Content-Type: application/json"
"https://api.bimface.com/translate?fileId=<your fileId>"
响应(Response)
HTTP STATUS
200
成功返回
{
"code": "success",
"message": null,
"data": {
"createTime": "2016-12-21 16:11:20",
"fileId": 987579504853792,
"name": "1234.rvt",
"priority": 2,
"reason": null,
"status": "success",
"thumbnail": [
"https://m.bimface.com/6d3e6f643f16489e58b187ff1240c09b/thumbnail/96.png",
"https://m.bimface.com/6d3e6f643f16489e58b187ff1240c09b/thumbnail/256.png"
]
}
}
字段 |
类型 |
描述 |
示例 |
fileId |
Number |
文件Id |
857482189666208 |
name |
String |
文件名称 |
abc.rvt |
status |
String |
转换状态 |
prepare(待转换)、processing(转换中)、success(转换成功)、failed(转换失败) |
priority |
Number |
转换任务优先级 |
2 |
thumbnail |
String[] |
缩略图地址 |
… |
reason |
String |
若转换失败,返回失败原因 |
… |
createTime |
String |
转换开始时间,格式:yyyy-MM-dd hh:mm:ss |
2016-10-14 14:29:16 |
失败返回
{
"code": "authentication.failed",
"message": "Token was not recognized."
}
错误码
code |
说明 |
system.error |
BIMFACE系统异常 |
authentication.failed |
API访问合法性校验失败 |
file.has.not.translated |
文件没有发起转换 |