获取文件元信息
GET https://file.bimface.com/metadata
根据文件id获取文件元信息
请求(Request)
Header
key |
value |
示例 |
Authorization |
bearer {accessToken} |
bearer xxxx-xxxx-xxxx-xxxx |
Content-Type |
application/json |
… |
Url Parameter
字段 |
类型 |
必填 |
描述 |
示例 |
fileId |
Number |
Y |
文件id |
946486385904448 |
Request Body
无
curl -X GET
-H "Authorization: bearer <your accessToken>"
-H "Content-Type: application/json"
"https://file.bimface.com/metadata?fileId=<your fileId>"
响应(Response)
HTTP STATUS
200
成功返回
{
"code": "success",
"message": null,
"data": {
"createTime": "2016-12-23 15:24:21",
"etag": "BA01EF719227C7C6B4F634C1EB52F5CE",
"fileId": 988971984749344,
"length": 23440,
"name": "test.rvt",
"status": "success",
"suffix": "rvt"
}
}
字段 |
类型 |
描述 |
示例 |
createTime |
String |
创建时间 |
2016-10-24 14:47:10 |
etag |
String |
文件etag |
… |
fileId |
Number |
文件id |
… |
length |
Number |
文件长度 |
1024 |
name |
String |
文件名 |
结构.rvt |
status |
String |
上传状态 |
uploading(上传中)、failed(上传失败)、success(上传完毕) |
suffix |
String |
文件名后缀 |
rvt |
失败返回
{
"code": "authentication.failed",
"message": "Token was not recognized."
}
错误码
code |
说明 |
system.error |
BIMFACE系统异常 |
authentication.failed |
API访问合法性校验失败 |
file.not.found |
文件未找到 |