Search code examples
autodesk-forgeautodeskautodesk-model-derivativeautodesk-webhooks

Receive Webhook Notification when new file version finished translating on Docs


Currently, I am able to use the APS Webhook API to receive a notification when a new version of an item has been uploaded to ACC Docs (dm.version.adeed). However, when I get this notification from a webhook, the file is still being translated/extracted on the backend and therefore I am not able to fetch the object tree from the file.

My current workaround is to just periodically query the file's object tree repeatedly until it returns the file's contents, meaning the extraction is finished, which obviously isn't an ideal way to do it.

I know the "extraction.finished" webhook exists, but it doesn't seem like this is meant for my use case, instead being for when a user uploads a file directly to be derived, not when one that is being derived after being added to Docs.

I appreciate any guidance in this area.


Solution

  • You can find the workflow explained here

    https://aps.autodesk.com/blog/webhook-now-supports-translation-progress-bim360-or-acc-files

    We have added a new feature allowing you to specify the callback endpoint when posting new item or posting new version. It works similar to working with the file in your own OSS bucket, using the callback mechanism, that has already been supported (see tutorial: Creating a Webhook of Model Derivative). The experience with file in BIM360/ACC is the same, but the schema of the payload is defined in meta. Currently, it supports two events: extraction.updated and extraction.finished.