4 Sep 2018

faster GET Hierarchy API and how to solve Error 413

Are you seeing an error like this, when you use the Model Derivative GET Properties / Hierarchy API's ... ?

413 Request Entity Too Large
{Diagnostic": "Please use the 'forceget' parameter to force querying the data."}

Then you probably have large Revit or Navisworks files that produce meta-data that is bigger than 2097152 bytes compressed !

To avoid the 413 ERROR, simple add '?forceget=true' to the end of your GET request and things will work as expected, like this...

GET /modelderivative/v2/designdata/dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6YmVhbGVtXzIwMTgtMDgtMDEvcmFjLnJ2dA==/metadata/2893fb14-7e56-b0a7-00e2-b6f1b49a4da8?forceget=true

Reference documentation API: Here and Here

If you are using Postman, with the imported Forge Collection (thanks Adam and adsklab!), then click on 'Params' and add the key 'forceget' and value 'true', like this...


And that's it for the 'forgeget' method.

You should also notice that this endpoint is a lot faster than before.  It still has a 2 hour time-out, but the conversion engine for these APIs is typically 4x faster than before.

In addition to this speedup in overall conversion performance, we've added objectID filtering.  If you know the objectID you are looking for, you can reduce the returned JSON result even further, by adding an objectID query parameter, like this...


You can find the full API documentation for objectID filter here.


If you are having troubles, please reach out to us at StackOverflow or via email



Related Article