autodesk-forgeautodesk-model-derivative

Forge Fetchallproperties takes several attempts to work


When exporting a new model and trying to fetch all properties via modelderivative API, the response is empty and then it takes several request attempts to get the results back. It looks like the generation is only triggered if several requests are made. Any idea why or how to deal with this? I’m using forceget=true


Solution

  • Assuming you are using this endpoint : GET Fetch All Properties.

    If you look at the Response - HTTP Status Code Summary, you will see that :

    200 OK - Success

    202 ACCEPTED - Request accepted but processing not complete. Call this endpoint again, until getting 200 OK.

    I think the answer is here.

    You need to check the response status code of your request and if you get the 202 code, retry the request until you get the 200 response.