找不到捆绑活动

时间:2019-02-18 08:54:53

标签: curl autodesk-forge autodesk-designautomation autodesk-inventor

我正在尝试制作Workitem教程。它可以工作,但现在我正尝试做一个自定义捆绑包,但我无法运行它。

https://forge.autodesk.com/en/docs/design-automation/v3/tutorials/inventor/run-workitem/

这是我的要求(教程的最后一个为“ SampleActivity”活动创建工作项

enter image description here

但是返回是:

     % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   896  100   130  100   766    230   1360 --:--:-- --:--:-- --:--:--  1591HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
Date: Sun, 17 Feb 2019 20:35:17 GMT
Via: 1.1 479d3d8cfdf8d35634b50f89a5beaa9e.cloudfront.net (CloudFront)
x-amz-apigw-id: VQvM2E5foAMFgkQ=
X-Amz-Cf-Id: 55pWO4Z1qR0N9I_S1iLNCkWlNGvLcTE123amLv48C7nHfiJJWqr_ng==
x-amzn-RequestId: 895f32ca-32f3-11e9-a766-6bd16157b1ae
X-Amzn-Trace-Id: Root=1-5c69c585-e08bab5c1d43628c9309849c
X-Cache: Error from cloudfront
Content-Length: 130
Connection: keep-alive

{"activityId":["The activity iGfPjyJuGKaTa75Jo9oHKA1L89rIIsRP.GuillaumeSize+prod could not be found\nParameter name: activityId"]}

3 个答案:

答案 0 :(得分:0)

您是否在活动列表https://forge.autodesk.com/en/docs/design-automation/v3/reference/http/activities-GET/中看到活动(iGfPjyJuGKaTa75Jo9oHKA1L89rIIsRP.GuillaumeSize+prod)?

如果未创建活动别名,有时可能会发生。 (请参见Create an Alias to the “SampleActivity” Activity Version部分)

答案 1 :(得分:0)

您可能没有define the activitycheck if is there。如果您正在寻找基于代码的教程,请尝试Learn Forge(修改模型)

答案 2 :(得分:0)

您可以通过curl调用获取活动信息

curl -v 'https://developer.api.autodesk.com/da/us-east/v3/activities' \ -H 'Authorization: <fill in your JWT>'

响应应该像

{
  "paginationToken": "",
  "data": [
    "Autodesk.Nop+Latest",
    "AutoCAD.AcSvfPublish+prod",
  ]
}

如果找不到创建的活动iGfPjyJuGKaTa75Jo9oHKA1L89rIIsRP.GuillaumeSize+prod,请确保已创建活动GuillaumeSize,并且也为活动prod设置了别名GuillaumeSize

希望这将帮助您解决问题。