0

I'm trying to post a workitem using design automation v3. I managed to create an appbundle and an activity, but when I post a workitem I get this exception :

The server returned the non-success status code 400 (Bad Request). More error details: {"appbundles":["An appbundles binary could not be found. Make sure your apps were uploaded correctly.\nParameter name: appbundles"]}.

What can be the cause of this issue?

  • Did you upload the module file? See here for details: https://forge.autodesk.com/en/docs/design-automation/v2/reference/http/AppPackages-Operations.GetUploadUrl-GET – Bryan Huang Feb 12 '19 at 04:07

2 Answers2

1

This usually indicates that you forgot to upload your zip file. I recommend that you you use our .net sdk. It has some helpful wrappers that make this easier. See here.

Albert Szilvasy
  • 461
  • 3
  • 5
0

And here is a sample code to upload the ZIP AppBundle:

        RestClient uploadClient = new RestClient(newAppVersion.UploadParameters.EndpointURL);
        RestRequest request = new RestRequest(string.Empty, Method.POST);
        request.AlwaysMultipartFormData = true;
        foreach (KeyValuePair<string, string> x in newAppVersion.UploadParameters.FormData) request.AddParameter(x.Key, x.Value);
        request.AddFile("file", packageZipPath);
        request.AddHeader("Cache-Control", "no-cache");
        await uploadClient.ExecuteTaskAsync(request);

From Learn Forge Tutorial, see code.

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