capabilities.work

Upload and Translate a Model for the Viewer

A 5-step recipe with Autodesk. We can help you get access.

Recipe · 5 steps

Upload and Translate a Model for the Viewer

Take a design file from local disk to a Viewer-ready SVF2 derivative.

  1. Create the OSS bucket that will hold the source design. Bucket keys are global across all of APS, so a 409 here means the key is already taken.
  2. Upload the source design file into the bucket. The objectId returned here is the URN that Model Derivative translates, once Base64 encoded.
  3. Start a Model Derivative job that translates the uploaded design into SVF2 with both 2D and 3D viewables. Returns 200 when a matching derivative already exists and 201 when a new job is accepted.
  4. Poll the manifest until translation reports success. The manifest returns 200 while the job is still pending or inprogress, so the terminal state is read from the body rather than the status code. Ends the workflow if translation fails or t
  5. Read the model views produced by the translation. The GUID of a viewable is what the Viewer, the object tree, and the property queries are all addressed by.
What you'll need to have ready
  • bucketKey: Globally unique bucket key, 3-128 characters of lowercase letters, digits, hyphens, underscores.
  • policyKey: Bucket retention policy: transient (24h), temporary (30d), or persistent.
  • objectKey: The object name to store the design under (e.g. "tower.rvt").
  • fileContent: The raw bytes of the source design file.
  • contentLength: Size of the source design file in bytes.
  • contentType: MIME type of the source design file.
  • urnBase64: The URL-safe Base64 encoding of the objectId returned by the upload step. Model Derivative addresses source designs by this encoded URN.
  • region: Region the derivatives are stored in (us or emea).
For your developer

Arazzo workflow autodesk:upload-and-translate-model, 5 operations: createBucket → uploadObject → startJob → getManifest → getMetadata. Specs on APIs.io.