0

Following the Model Derivative "Prepare a File for the Viewer" after I have successfully uploaded and converted file I call the manifest url

how do I then download the converted files in the manifest. If I only know the refrence urn? (i.e.) How would I get the coverted svf "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bW9kZWxkZXJpdmF0aXZlL0E1LnppcA/output/1/A5.svf"

or the thumbnail "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bW9kZWxkZXJpdmF0aXZlL0E1LnppcA/output/1/A5.svf.png01_thumb_200x200.png"

Is there a api call that can be used to return the actual location?

Edit: The end result is I want to create something like the [extractor] (http://extract.autodesk.io/) does. With all the files I need to run the viewer locally

Edit2:The Manifest I get back from call after fileUploda

Result{
  "type": "manifest",
  "hasThumbnail": "true",
  "status": "success",
  "progress": "complete",
  "region": "US",
  "urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6Z3JlZ2JpbWJ1Y2tldC9yYWNfYmFzaWNfc2FtcGxlX3Byb2plY3RfdGVzdC5ydnQ",
  "derivatives": [
    {
      "name": "rac_basic_sample_project_test.rvt",
      "hasThumbnail": "true",
      "status": "success",
      "progress": "complete",
      "outputType": "svf",
      "children": [
        {
          "name": "{3D}",
          "hasThumbnail": "true",
          "role": "3d",
          "status": "success",
          "type": "geometry",
          "progress": "complete",
          "children": [
            {
              "name": "{3D}",
              "role": "3d",
              "camera": [
             ...
              ],
              "status": "success",
              "type": "view",
              "progress": "complete"
            },
            {
              "type": "resource",
              "urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6Z3JlZ2JpbWJ1Y2tldC9yYWNfYmFzaWNfc2FtcGxlX3Byb2plY3RfdGVzdC5ydnQ/output/Resource/3D_View/_3D_/_3D_.svf",
              "role": "graphics",
              "mime": "application/autodesk-svf"
            },
            {
              "type": "resource",
              "role": "thumbnail",
              "urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6Z3JlZ2JpbWJ1Y2tldC9yYWNfYmFzaWNfc2FtcGxlX3Byb2plY3RfdGVzdC5ydnQ/output/Resource/3D_View/_3D_/_3D_1.png",
              "resolution": [
                100,
                100
              ],
              "mime": "image/png",
              "status": "success"
            },

The Request I try to send but get a 404

https://developer.api.autodesk.com/modelderivative/v2/designdata/dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6Z3JlZ2JpbWJ1Y2tldC9yYWNfYmFzaWNfc2FtcGxlX3Byb2plY3RfdGVzdC5ydnQ/manifest/urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6Z3JlZ2JpbWJ1Y2tldC9yYWNfYmFzaWNfc2FtcGxlX3Byb2plY3RfdGVzdC5ydnQ/output/Resource/3D_View/_3D_/_3D_1.png

Is there anything wrong with that call to modelderivative?

Greg Bluntzer
  • 323
  • 1
  • 4
  • 21
  • are you using the endpoint to download derivatives? https://developer.autodesk.com/en/docs/model-derivative/v2/reference/http/urn-manifest-derivativeurn-GET/ – Augusto Goncalves Jul 18 '16 at 17:14

3 Answers3

0

Cyrille Fauvel implemented this, so it is in his GitHub repo:

https://github.com/cyrillef/extract.autodesk.io

https://github.com/cyrillef/extract-php-view.and.data.api

Jeremy Tammik
  • 7,333
  • 2
  • 12
  • 17
0

You can also take a look at the implementation of the NPM View & Data Package for the time being. It is still using the v1 API endpoints but we are currently working on providing wrappers for multiple programming languages on the v2 endpoints

Felipe
  • 4,325
  • 1
  • 14
  • 19
0

Using the derivativeurn GET worked

I also had to make sure the derivativeUrn was encoded

(JAVA) derivativeUrn = URLEncoder.encode(derivativeUrn, "UTF-8");

Greg Bluntzer
  • 323
  • 1
  • 4
  • 21