# 查询函数执行结果 API

此接口用来查询函数的执行结果。函数执行完后,其简化后的模型文件会被压缩为zip文件,并上传到云文档,返回文件id,从而用户可进一步下载结果。

# 请求

GET http://apigate.noijoi.cn/meshSimplify/meshSimplify/v1.1/{activationId}
1

# header 参数

参数名 必选 类型 描述
Authorization 是 String Bearer app_access_token. 注:该 access_token 是应用级别
Content-Type 是 String application/json

# path 参数

参数名 必选 类型 默认值 描述
activationId 是 String 调用函数API中返回的任务id

# body 参数

参数名 必选 类型 默认值 描述

# 响应

因为函数是异步执行,所以如果函数未执行完毕,会返回404;如果执行完毕,则返回结果。

函数未执行完毕,需要等待

字段 类型 必填 参数值 描述
error string 是 The requested resource does not exist. 函数未执行完,结果不存在。

函数执行完毕

字段 类型 必填 描述
activationId string 是 任务id
duration long 是 函数运行时长(毫秒)
logs array of string 是 系统日志
response object 是 响应结果
+result object 是 响应结果
++result string 是 函数执行结果
++fileId string 是 模型简化的输出结果,被压缩为zip文件,并上传到云存储,返回云存储的文件id。
+status string 是 faas系统调用函数的状态。success表示成功,其他表示失败
+success bool 是 faas系统调用函数是否执行成功。
HTTP 代码 说明 类型
200 ok 请求成功
404 The requested resource does not exist. 404表示函数未执行完

# HTTP 请求示例

curl --location --request GET 'http://apigate.noijoi.cn/meshSimplify/meshSimplify/v1.1/59edac23436a4584adac23436aa5843b' \
--header 'Authorization: Bearer cn-d1ff5d31-221a-49f2-9474-6a2625ff8cb6'
1
2

# 成功返回结果

{
    "activationId": "59edac23436a4584adac23436aa5843b",
    "duration": 10275,
    "end": 1591855691166,
    "logs": [
    ],
    "response": {
        "result": {
            "fileId": "obs:meshsimplify/result/cdab7d20-ee68-11ea-a6a7-fa163eaa7d4d.zip",
            "result": "1"
        },
        "size": 59,
        "status": "success",
        "success": true
    },
    "start": 1591855680891
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

# 异常返回结果

{
    "code": "IU2VPDLXivhenMJjF3E0UPhdsFSIxanp",
    "error": "The requested resource does not exist." 
}
1
2
3
4
  • 在线客服

  • 意见反馈