API: Downloading Assemblies of Parts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
There was some discussion here, which I think is related to my question: https://forums.autodesk.com/t5/upchain-forum/upchain-restful-api-acquiring-the-fileversionid/m-p/120...
But that seems to be looking at downloading a single part. I'm would like to clarify how one would go about downloading a full assembly of parts (specifically .SLDASM and .SLDPRT files) through the API. I think I see a couple of potential strategies:
- Get a cBOM for a parent assembly and recursively download all of the parts in the cBOM:
- '/api/bom/v1/part_version/{partVersionId}/cbom' appears to be the endpoint for getting the cBOM of an item. There's also '.../cbom_tree' - not sure if that's related.
- Recursively go through the cBOM and do what Sven had suggested in the post linked above.
- There appears to be a 'download' endpoint that will generate a download URL:
- '/api/bom/v1/cbom/download' is supposed to return a url pointing to a zip to be downloaded.
- Could download and extract zip instead of downloading files one-by-one?
- Looks like the request body requires an array to say which files need to be zipped, not just a "zip all files under this parent" kind of thing? So you'd have to flatten the cBOM into a set of unique files I guess.
Are either of these the most correct way to do this? Are there any nuances I'm missing?
Thanks