devbmc
devbmc

Reputation: 45

How can I increase work item payload limit for Forge Design Automation for Inventor?

I have updated the code I'm using to queue work items in Design Automation to use the Direct to S3 approach that is required starting next month. Due to this change, the URLs that are being sent in for outputs (where Design Automation will upload the outputs) are MUCH larger. As a result, I am getting a response with a 413 status code and an error message saying that the payload length exceeds the limit of 16384 bytes when I attempt to submit work items.

Is there a way around this?

Upvotes: 1

Views: 235

Answers (1)

Jaime Rosales
Jaime Rosales

Reputation: 1288

Using the Signed URL endpoint with the query parameter of useCdn=true guarantees the payload goes through Direct to S3. Those urls are a lot shorter. What I'm doing is the following.

Upload to OSS (New approach)

  1. POST presigned URL to S3 (you can control in how long will it expire up to 60 mins, default is 2 mins)
  2. Upload to presigned URL (no authorization is required since it is a presinged url)
  3. Complete the upload calling POST complete

Then we need 1 url for Download (input to Design Automation) and 1 for Upload (output from Design Automation)

This is where we can use the Signed URL endpoint

For the input will look something like this:

POST https://developer.api.autodesk.com/oss/v2/buckets/:bucketKey/objects/:objectKey/signed?access=read&useCdn=true

For output will look like this:

POST https://developer.api.autodesk.com/oss/v2/buckets/:bucketKey/objects/:objectKey/signed?access=write&useCdn=true

Both urls have an expiration time of 60 mins. I'm working on the update of the tutorials in Design Automation and also I have a collection that I will be blogging about it soon.

Upvotes: 1

Related Questions