0

I am trying to use the api service as in the below link, and trying to get metadata by using derivative urn.

https://forge.autodesk.com/en/docs/model-derivative/v2/reference/http/urn-manifest-derivativeurn-GET/

However, the data returning from the service is broken as in below. What can be the problem?

enter image description here

  • If you are talking about the content looking strange, then it might be that you would have to set encoding to null (if you are e.g. using nodejs request to retrieve the content) https://stackoverflow.com/a/22027928/4654233 – Adam Nagy Feb 09 '22 at 11:02

2 Answers2

0

If you look at the documentation example, it returns chunked partial content body. For metadata, please use these 2 APIs:

https://forge.autodesk.com/en/docs/model-derivative/v2/reference/http/urn-metadata-GET/

https://forge.autodesk.com/en/docs/model-derivative/v2/reference/http/urn-metadata-guid-GET/

varunpatil
  • 428
  • 1
  • 3
  • 6
  • Thanks for the reply. I actually looking for a way to get the properties of model and I used the service as in the link (https://forge.autodesk.com/en/docs/model-derivative/v2/reference/http/urn-metadata-guid-properties-GET/). However, I had "Property Database is too large under this URN", despite I have tried to use forceget. What can be you suggestion for large models ? – sercanduyar Feb 09 '22 at 15:34
  • If the properties are huge, download and keep them in a format easy for your use. Getting properties every time from Forge API can be time-consuming. – varunpatil Feb 11 '22 at 04:00
0

As described in this post, there is multiple ways to get metadata : Accessing Design Metadata Without Viewer

The easiest way is to request the metadata endpoint as @varunpatil already answered. But if you want to get a Sqlite file, you can download this file using the method described in Petr's post. If you get a 200 status code in your response, you should have the entire file, 206 means you only get chunked partial content.

AlexAR
  • 1,052
  • 1
  • 9
  • 15