0

i'm trying to make the Workitem tutorial. it works but now i'm trying to do a custom bundle but i can't run it.

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

Here's my request (the last one of the tutorial Create a WorkItem for the “SampleActivity” Activity

enter image description here

But the return is :

     % 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"]}
Saif Ejjilali
  • 107
  • 2
  • 3
  • 12

3 Answers3

0

Do you see the activity (iGfPjyJuGKaTa75Jo9oHKA1L89rIIsRP.GuillaumeSize+prod) in the activities list: https://forge.autodesk.com/en/docs/design-automation/v3/reference/http/activities-GET/ ?

Sometimes if could happen if activity alias is not created. (see Create an Alias to the “SampleActivity” Activity Version section)

erymski
  • 53
  • 5
  • the response is an HTML but i don't see the activity in – Saif Ejjilali Feb 18 '19 at 09:23
  • This is strange - the response should be JSON: https://forge.autodesk.com/en/docs/design-automation/v3/reference/http/activities-GET/#example Could you add `-H 'Content-Type: application/json'` to the curl call? Maybe it's a reason – erymski Feb 18 '19 at 11:29
0

You probably did not define the activity, and check if is there. In case you're looking for code-based tutorial, try Learn Forge (Modify Models)

Augusto Goncalves
  • 8,493
  • 2
  • 17
  • 44
0

You can get the acvities by curl call:

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

And the reponse should be like

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

If you can't find the activity iGfPjyJuGKaTa75Jo9oHKA1L89rIIsRP.GuillaumeSize+prod you created, please make sure the activity GuillaumeSize is created and alias name prod is also set for activity GuillaumeSize.

Hope this will help you solve the issue.