Question:
After a translating job completes by POST job and Get Manifest, the manifest is ready. Now when I tried to GET Metadata (:urn/metadata/:guid), it will take time until is is prepared. That is why the help talks about 202 status code: Request accepted but processing not complete. Call this endpoint iteratively until a 200 is returned.
My confusion is: I think since translating job has translated the source model to a format (say svf), those dataset of metadata should have been ready, why it still needs to start a separate process?
Answer:
The metadata request is separate from the SVF/LMV translation. This metadata is hidden/inside the svf and property db files but not yet generated in SVF/LMV translation. Generally speaking, the metadata is a hierarchy of svf/model. So unpack and parse the svf is needed.
probably you have know the sample https://extract.autodesk.io. It is to extract all dataset of an SVF from *svf file and download them one by one for local deployment. It shows the workflow of unpacking *svf and get the manifest, then the project downloads the relevant file one by one. Those lines are at line 218-220 in current version That more or less might also explain how the formal endpoint (...metadata) is working.
var pack =new zip (success, { base64: false, checkCRC32: true }) ;
success =pack.files ['manifest.json'].asNodeBuffer () ;
manifest =JSON.parse (success.toString ('utf8')) ;
In short, the separate process is current design. your code will need to set a valid checking on if the metadata is prepared or not.
Comments
You can follow this conversation by subscribing to the comment feed for this post.