1

I have a strange problem with the Autodesk Forge Model Derivative API. When getting properties for an object, using the :urn/metadata/:guid/properties endpoint, I sometimes get a 404 response with this text:

{"diagnostic":"Model should be translated to SVF first"}

The model is uploaded as an IFC, and it's definitely translated to SVF.

Here's an example request that failed:

curl -H "Authorization: Bearer <token>" https://developer.api.autodesk.com/modelderivative/v2/designdata/dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6OTliYzRhNTUtNzM5My00ZTc0LTg5YjEtMTE4ODNhYWNjYjFhLnByb2plY3RzLmFwcC5pbWVyc28uY29tLzIwMjEtMDEtMjFUMTE6MjY6MDMlMkZESUhfUklCLmlmYw/metadata/29a39a8b-7ff3-42c3-9dfe-471e3ae0677d/properties?objectid=889

I have discovered that if I send the same request but without specifying the objectid, something seems to get fixed. After that, new requests like the one above succeed. However, I don't know how long a "fix" like that lasts, and I'd rather not go through this routine every time to be able to get properties for a single object.

Who can help?

g-birk
  • 53
  • 4

1 Answers1

3

I was not able to reproduce the issue, but here are few information related to this endpoint.

As the properties database can be very large this endpoint usually returns a 202 HTTP code, to tell you that the server is loading the sqlLite3 database in memory. When you get the 202 response, it means you need to come back later and ask again.

Body example with Response 202

{
    "result": "success"
}

Once the database is loaded, it stays in memory for a certain time depending on the number of calls you are making on these endpoints, and then the server discard the database from memory (it will stay there at least few minutes).

You may need to use the forceget parameter if the resource is very large. Checkout the documentation on that parameter for more details.

The sqlLite database is built last in the SVF production process, and posted last on the server. The Design File' properties are extracted in 2 formats: aka json (json.gz) and sqlLite (sdb/db). The Autodesk Viewer only uses the json format, but other systems may prefer using sqlLite. The json approach makes it easier when your code executes in client browsers. I am not sure what happens for you, but I believe the sqlLite database isn't yet fully posted on S3, and therefore not available. I'd be interested to follow-up on that issue to understand the exact scenario where you get the problem - please contact me at cyrille at autodesk.com

Side notes: I got an old example posted here to help reading properties, and recently decided to rewrite it here, but it isn't fully finished while the json.gz propertyServer component is almost complete.


Update from March 4th

After talking to g-birk, I was able to reproduce the issue. This happens with models posted on the EMEA storage server. g-birk workaround to request the tree is the way to go while Autodesk engineering get this fixed.

cyrille
  • 2,616
  • 1
  • 10
  • 18