Where does Model Derivative API store the translated .SVF files when using 3rd party cloud storage or local storage - autodesk-forge

I am currently trying Autodesk Forge to integrate it to my Application, and need to clarify regarding the storage location of files. I am aware that we can use a 3rd party cloud storage (DropBox, Google Drive) or local storage to store the model files (.ifc, .rvt etc.) However, I need to understand where the .svf files are stored after being translated when using such a 3rd party storage. Are they stored where the model files are originally stored (cloud or local storage) or are they stored in the storage space provided by AutoDesk with its account? As I know, if we upload the model file to the AutoDesk BIM360 Data Storage, the translated file will also be stored on the same location. So how does it work when we are using a 3rd party storage?
Thanks in Advance!

The translated emits (derivatives) are stored in the Forge OSS and you can query the manifest endpoint to enumerate them for the path to download them. For example:
"derivatives": [
{
"name": "A5.iam",
"hasThumbnail": "true",
"status": "success",
"progress": "99% complete",
"outputType": "svf",
"children": [
{
"guid": "d998268f-eeb4-da87-0db4-c5dbbc4926d0",
"type": "geometry",
"role": "3d",
"name": "Scene",
"status": "success",
"progress": "99% complete",
"hasThumbnail": "true",
"children": [
{
"guid": "4f981e94-8241-4eaf-b08b-cd337c6b8b1f",
"type": "resource",
"progress": "99% complete",
"role": "graphics",
"mime": "application/autodesk-svf"
},
{
"guid": "d718eb7e-fa8a-42f9-8b32-e323c0fbea0c",
"type": "resource",
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bW9kZWxkZXJpdmF0aXZlL0E1LnppcA/output/1/A5.svf.png01_thumb_400x400.png",
"resolution": [
400.0,
400.0
],
"mime": "image/png",
"role": "thumbnail"
},
{
"guid": "34dc340b-835f-47f7-9da5-b8219aefe741",
"type": "resource",
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bW9kZWxkZXJpdmF0aXZlL0E1LnppcA/output/1/A5.svf.png01_thumb_200x200.png",
"resolution": [
200.0,
200.0
],
"mime": "image/png",
"role": "thumbnail"
},
{
"guid": "299c6ba6-650e-423e-bbd6-3aaff44ee104",
"type": "resource",
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bW9kZWxkZXJpdmF0aXZlL0E1LnppcA/output/1/A5.svf.png01_thumb_100x100.png",
"resolution": [
100.0,
100.0
],
"mime": "image/png",
"role": "thumbnail"
}
]
}
]
}
]
Can refer to sample code here to retrieve the derivatives and you can go from there to persist them to your own storage.

Related

Get different 3d views within item selected in Autodesk forge

We get hubs, folders list, items within folders using Data Management apis we have in Autodesk Forge.
Ref.: https://forge.autodesk.com/en/docs/data/v2/reference/http/
How to get data if we want to show all the 3d views(names and thumbnails) present within the selected item(say, file1.rvt)?
For this you need to pull the manifest & metadata for the Version of the File Item you want to display Views/Thumbnails for. In your Item payload, you will find all versions available. Take the latest one and find its 'id' which looks like this:
"id": "urn:adsk.wipprod:fs.file:vf.7aKButAtTo-VRvSJqZl0jg?version=13",
Encode it to safe Base64 encoding. It is important the safe encode the ID, otherwise you may end-up with '=' '-' '/' characters which aren't valid on the GET URL path later.
dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLjdhS0J1dEF0VG8tVlJ2U0pxWmwwamc_dmVyc2lvbj0xMw
To get views, you are usually pulling the metadata and get something like this:
{
"data": {
"type": "metadata",
"metadata": [
{
"name": "3D View: View 01",
"role": "3d",
"guid": "a6128518-dcf0-967b-31a1-3439a375daeb"
},
{
"name": "3D View: View 02",
"role": "3d",
"guid": "488e0550-6e79-38b3-9f56-ae8fd21416bb"
},
{
"name": "Sheet: A00 - SITE PLAN",
"role": "2d",
"guid": "beaab4e2-9abc-8ca2-4e65-23df60e4b6a7"
}
]
}
}
There is 2 sorts of Thumbnails - the File Thumbnails which is usually the View which was active when the file was last saved. You can get that Thumbnail via the GET /thumbnail API. But if you want to get all Views' Thumbnail, you need to pull the manifest and parse the JSON response. You will get a response like this (for making the reading more easy on this post, I simplified the response below).
You will search for children nodes with "role" === "thumbnail". Its parent will tell you to which View it is attached. What is interesting to note here, is that you do not really need to call the /metadata endpoint, because the manifest has all the information for you already as long you know where to read it. For example, let's say I want to get the Thumbnail resolution 200x200 for the Sheet View.
I'll search for the node with "type" === "geometry" && "role" === "2d", then search in its children a node with "role" === "thumbnail" && "resolutions" === [200, 200]. From that node, I get the derivative URN (i.e. "urn": "urn:adsk.viewing:fs.file:dXJuOm...uZHdmeA/output/e28378ef-7b4a-878f-cb72-26fbb1a28b2e_f2d/thumbnail_200.png",) and now I can use the GET :urn/manifest/:derivativeurn endpoint to get the thumbnail file. That's it.
Note, the parent node has the View name, and one of its children with "role" === "graphics" && "mime": "application/autodesk-f2d", and a property "guid" which match the entry in the metadata response. So you can extract the name and guid view from either the manifest of the metadata endpoints. (for 3D views, you will need to search for "mime": "application/autodesk-svf" or "mime": "application/autodesk-svf2" depending of the format you translated your model to).
{
"urn": "dXJuOm...uZHdmeA",
"derivatives": [
{
"hasThumbnail": "true",
"children": [
{
"role": "3d",
"hasThumbnail": "true",
"children": [
{
"role": "graphics",
"mime": "application/autodesk-svf2",
"guid": "a6128518-dcf0-967b-31a1-3439a375daeb",
"type": "resource"
},
{
"urn": "urn:adsk.viewing:fs.file:dXJuOm...uZHdmeA/output/f0224dd3-8767-45c1-ff99-5c9c881b9fee/0.svf.png01_thumb_400x400.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "630d764b-6e55-4d17-8446-6858454d8158",
"type": "resource",
"resolution": [400, 400]
},
{
"urn": "urn:adsk.viewing:fs.file:dXJuOm...uZHdmeA/output/f0224dd3-8767-45c1-ff99-5c9c881b9fee/0.svf.png01_thumb_200x200.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "7294c4f7-55ec-41d7-94e5-98c7294d1ae1",
"type": "resource",
"resolution": [200, 200]
},
{
"urn": "urn:adsk.viewing:fs.file:dXJuOm...uZHdmeA/output/f0224dd3-8767-45c1-ff99-5c9c881b9fee/0.svf.png01_thumb_100x100.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "d1f2f54d-1ce7-49e0-8360-24f212a0cb33",
"type": "resource",
"resolution": [100, 100]
},
...
],
"name": "3D View: View 01",
"guid": "f0224dd3-8767-45c1-ff99-5c9c881b9fee",
"progress": "complete",
"type": "geometry",
"properties": {...},
"status": "success",
"viewableID": "f0224dd3-8767-45c1-ff99-5c9c881b9fee"
},
{
"role": "3d",
"hasThumbnail": "true",
"children": [
{
"role": "graphics",
"mime": "application/autodesk-svf2",
"guid": "488e0550-6e79-38b3-9f56-ae8fd21416bb",
"type": "resource"
},
{
"urn": "urn:adsk.viewing:fs.file:dXJuOm...uZHdmeA/output/5f6ae103-9de8-048e-f858-c7b0b0b9f46c/1.svf.png01_thumb_400x400.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "e4ff0fb3-20a0-43c2-b01a-e35f08205ea9",
"type": "resource",
"resolution": [ 400, 400 ]
},
{
"urn": "urn:adsk.viewing:fs.file:dXJuOm...uZHdmeA/output/5f6ae103-9de8-048e-f858-c7b0b0b9f46c/1.svf.png01_thumb_200x200.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "0fe4e17a-8eb9-49c3-bfca-7f8e747ae779",
"type": "resource",
"resolution": [ 200, 200 ]
},
{
"urn": "urn:adsk.viewing:fs.file:dXJuOm...uZHdmeA/output/5f6ae103-9de8-048e-f858-c7b0b0b9f46c/1.svf.png01_thumb_100x100.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "b0353527-cade-48bb-bbfc-7b544ea2d0ae",
"type": "resource",
"resolution": [ 100, 100 ]
},
...
],
"name": "3D View: View 02",
"guid": "5f6ae103-9de8-048e-f858-c7b0b0b9f46c",
"progress": "complete",
"type": "geometry",
"properties": {...},
"status": "success",
"viewableID": "5f6ae103-9de8-048e-f858-c7b0b0b9f46c"
},
{
"guid": "e28378ef-7b4a-878f-cb72-26fbb1a28b2e",
"type": "geometry",
"role": "2d",
"name": "Sheet: A00 - SITE PLAN",
"status": "success",
"hasThumbnail": "true",
"progress": "complete",
"viewableID": "com.autodesk.dwf.ePlot_281AFDC7-8CE7-4D19-BE69-A47E6364BF53",
"children": [
{
"urn": "urn:adsk.viewing:fs.file:dXJuOm...uZHdmeA/output/e28378ef-7b4a-878f-cb72-26fbb1a28b2e_f2d/primaryGraphics.f2d",
"role": "graphics",
"mime": "application/autodesk-f2d",
"guid": "beaab4e2-9abc-8ca2-4e65-23df60e4b6a7",
"type": "resource",
"status": "success"
},
{
"guid": "382e91af-fb2f-4782-a058-6bff5a477c89",
"type": "view",
"role": "2d",
"name": "Sheet: A00 - SITE PLAN",
"viewbox": [...]
},
{
"urn": "urn:adsk.viewing:fs.file:dXJuOm...uZHdmeA/output/e28378ef-7b4a-878f-cb72-26fbb1a28b2e_f2d/thumbnail_400.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "74d8c07b-0703-2505-8c78-c4d7c95fd620",
"type": "resource",
"resolution": [400, 400],
"status": "success"
},
{
"urn": "urn:adsk.viewing:fs.file:dXJuOm...uZHdmeA/output/e28378ef-7b4a-878f-cb72-26fbb1a28b2e_f2d/thumbnail_200.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "0aec7773-5a02-c9ed-37b2-0e92020dc63a",
"type": "resource",
"resolution": [200, 200],
"status": "success"
},
{
"urn": "urn:adsk.viewing:fs.file:dXJuOm...uZHdmeA/output/e28378ef-7b4a-878f-cb72-26fbb1a28b2e_f2d/thumbnail_100.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "91011625-63a4-1165-4e6f-700dedff94a7",
"type": "resource",
"resolution": [ 100, 100 ],
"status": "success"
},
...
]
}
],
"name": "Myfile.rvt",
"progress": "complete",
"outputType": "svf2",
"status": "success"
}
],
"hasThumbnail": "true",
"progress": "complete",
"type": "manifest",
"region": "US",
"version": "1.0",
"status": "success"
}

MAX to SVF causes aesthetic problems

what's causing the textured material to lose its quality/resolution when translated from MAX to SVF?
example / illustration in the image below:
EDIT/UPDATE Model Translation Status:
{
"type": "manifest",
"hasThumbnail": "true",
"status": "success",
"progress": "complete",
"region": "US",
"urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6am1kaDRvMDR3a24ydmpjOGF2andhMjVrbXJ5Z2dpdmQyMDE5MDIyNnQxNDU1NTU2Nzh6L01vZGVsbFRleHQuemlw",
"version": "1.0",
"derivatives": [
{
"name": "Final-Bake.max",
"hasThumbnail": "true",
"status": "success",
"progress": "complete",
"outputType": "svf",
"children": [
{
"guid": "15e32675-3874-4586-b00e-f6b1ec268dbf",
"type": "geometry",
"role": "3d",
"name": "3d Scene",
"status": "success",
"progress": "complete",
"hasThumbnail": "true",
"children": [
{
"guid": "d43b2b8f-9245-431f-9745-6cfa67d03283",
"type": "resource",
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6am1kaDRvMDR3a24ydmpjOGF2andhMjVrbXJ5Z2dpdmQyMDE5MDIyNnQxNDU1NTU2Nzh6L01vZGVsbFRleHQuemlw/output/Final-Bake.svf",
"role": "graphics",
"mime": "application/autodesk-svf"
},
{
"guid": "79537c8e-0cd4-4eae-97e9-8457e313248c",
"type": "resource",
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6am1kaDRvMDR3a24ydmpjOGF2andhMjVrbXJ5Z2dpdmQyMDE5MDIyNnQxNDU1NTU2Nzh6L01vZGVsbFRleHQuemlw/output/Final-Bake.svf.png01_thumb_400x400.png",
"resolution": [
400,
400
],
"mime": "image/png",
"role": "thumbnail"
},
{
"guid": "225043e7-c880-4dbe-9d32-f3dbc3071615",
"type": "resource",
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6am1kaDRvMDR3a24ydmpjOGF2andhMjVrbXJ5Z2dpdmQyMDE5MDIyNnQxNDU1NTU2Nzh6L01vZGVsbFRleHQuemlw/output/Final-Bake.svf.png01_thumb_200x200.png",
"resolution": [
200,
200
],
"mime": "image/png",
"role": "thumbnail"
},
{
"guid": "5a7fc6b8-f8b9-4228-8750-992e3462fbc2",
"type": "resource",
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6am1kaDRvMDR3a24ydmpjOGF2andhMjVrbXJ5Z2dpdmQyMDE5MDIyNnQxNDU1NTU2Nzh6L01vZGVsbFRleHQuemlw/output/Final-Bake.svf.png01_thumb_100x100.png",
"resolution": [
100,
100
],
"mime": "image/png",
"role": "thumbnail"
}
]
},
{
"guid": "10ca8b71-543a-429e-a36c-66a43278cf5d",
"type": "resource",
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6am1kaDRvMDR3a24ydmpjOGF2andhMjVrbXJ5Z2dpdmQyMDE5MDIyNnQxNDU1NTU2Nzh6L01vZGVsbFRleHQuemlw/output/properties.db",
"role": "Autodesk.CloudPlatform.PropertyDatabase",
"mime": "application/autodesk-db",
"status": "success"
}
]
}
]
}
Depending on how you do your conversion from MAX to SVF, your texture might get resized to make them smaller and faster to load.
If you export your 3ds Max file to SVF using the shared view feature, the "Optimize scene data" option may cause your large textures to be resized.
By default the exporter inside of max will not resize the texture. However, when you are using the "shared view" feature, 3ds Max will save your last used settings inside an ini file "SvfExporter.ini". To turn off texture resizing you can go inside this ini file and change the "OptimizeMaps" value to 0.
By default this ini file will be located inside your user appData folder and will only be present if you used the "shared view" feature.
Ex:C:\Users\myUserName\AppData\Local\Autodesk\3dsMax\2020 - 64bit\ENU\en-US\plugcfg\SvfExporter.ini
If you simply uploaded your file to Autodesk cloud storage and a preview have been generated automatically for you or if you used the Autodesk Forge Model derivative API, then your texture should not get resized.
Update (2021-01-22): New development have been done since my original answer to better support PBR and Physical material conversion to SVF in the later versions of 3ds Max. The texture should not be resized anymore (unless the "Optimize scene data" is selected in the shared view feature) and you should get significantly better looking result when using physical and/or PBR materials.

Why can't I see all .pf (graphics) files when using Model Derivatives API

This is how I post a new job:
{
"url": "/modelderivative/v2/designdata/job",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"x-ads-force": "true"
},
"data": {
"input": {
"urn": "BASE64_URL_ENCODED_OBJ_URN"
},
"output": {
"formats": [
{
"type": "svf",
"views": [
"3d",
"2d"
]
}
]
}
}
}
And this is the manifest I see when the conversion is over:
{
"type": "manifest",
"hasThumbnail": "true",
"status": "success",
"progress": "complete",
"region": "US",
"urn": "XXX",
"version": "1.0",
"derivatives": [
{
"name": "XXX.nwd",
"hasThumbnail": "true",
"status": "success",
"progress": "complete",
"outputType": "svf",
"children": [
{
"guid": "3c9bb37d-0385-4857-ab04-2e6e3ef6a7c4",
"type": "geometry",
"role": "3d",
"name": "XXX.nwc",
"status": "success",
"hasThumbnail": "true",
"progress": "complete",
"viewableID": "cache",
"useAsDefault": true,
"children": [
{
"guid": "XXX",
"type": "view",
"role": "3d",
"name": "Default",
"status": "success",
"camera": [
308.925903,
507.011261,
625.618591,
38.749268,
-60.60965,
89.572029,
-0.27886,
-0.585863,
0.760922,
1.38983,
0.785398,
1,
0
],
"useAsDefault": true,
"hasThumbnail": "true",
"children": [
{
"guid": "XXX",
"type": "resource",
"urn": "urn:adsk.viewing:fs.file:XXX/output/0/0_100.png",
"role": "thumbnail",
"mime": "image/png",
"resolution": [
100,
100
]
},
{
"guid": "XXX",
"type": "resource",
"urn": "urn:adsk.viewing:fs.file:XXX/output/0/0_200.png",
"role": "thumbnail",
"mime": "image/png",
"resolution": [
200,
200
]
},
{
"guid": "XXX",
"type": "resource",
"urn": "urn:adsk.viewing:fs.file:XXX/output/0/0_400.png",
"role": "thumbnail",
"mime": "image/png",
"resolution": [
400,
400
]
}
]
},
{
"guid": "XXX",
"type": "resource",
"urn": "urn:adsk.viewing:fs.file:XXX/output/0/0.svf",
"role": "graphics",
"mime": "application/autodesk-svf"
}
]
},
{
"guid": "XXX",
"type": "resource",
"urn": "urn:adsk.viewing:fs.file:XXX/output/0/properties.db",
"role": "Autodesk.CloudPlatform.PropertyDatabase",
"mime": "application/autodesk-db",
"status": "success"
}
]
}
]
}
Of course, the Authorization header is added with a generated token
For some reason, all I can see is that only the svf file has been generated.
However, when I use the extractor, I get the full model with all the graphics files.
After downloading all the files in the manifest above, and rendering the viewer, I get an error, saying there are files missing (which makes sense, since I have only one file - 0.svf)
I tried to follow the documentation as closely as possible, but it still doesn't work.
This happens with every Navisworks model that I upload not just a specific one, so I'm clearly doing something wrong.
What am I missing?
Background: the Model Derivative API converts a design file (e.g. NWD) into a web-friendly format (SVF). This format is actually a collection of files, images and databases, including the .pf. The URN is just an identifier of this collection of files on Forge server.
The manifest response indicates how the translation process went and the major outputs, like thumbnail, viewables or others, like OBJ or IFC (where applicable).
Now the extractor iterate through the manifest response and list all files that are part of the URN, including .pf, it uses this Nodejs code (also in .NET and PHP).
EDIT
Assuming you have downloaded all files properly, you need to point to the SVF file on your folder structure. The following file (from here) shows a super basic example.
var myViewerDiv = document.getElementById('MyViewerDiv');
var viewer = new Autodesk.Viewing.Private.GuiViewer3D(myViewerDiv);
var options = {
'env' : 'Local',
'document' : './shaver/0.svf'
};
Autodesk.Viewing.Initializer(options, function() {
viewer.start(options.document, options);
});
I’m sorry to hear that you’re having problems.
(edit) It looks like Augusto and I posted simultaneously. His EDIT to the original post is very likely more accurate than my guess here.
I’ll need to step through the process myself to understand what’s happening, since I don’t do a lot of coding in Forge. (It looks like Augusto is watching the discussion and will likely be testing this at his end, along with the other staff on the forge.help alias.)
It looks like you have retrieved the manifest correctly, and you just need to iterate over the URNs of the children to explicitly retrieve the remaining dependencies. If you look at the github code from the extractor example, you will see some methods such as getManifest, listAllDerivativeFiles, and downloadAllDerivativeFiles that might demonstrate what you’re missing: https://github.com/cyrillef/extract.autodesk.io
(edit) It's also worth noting that the .SVF file is actually a zip-archive where the viewer will find many of the other dependencies on its own.

autodesk-forge translating and vieweing recap rcp Files

Is it possible to translate and view recap RCP files in forge?
I see that RCP files are on the list of supported translations however it is my understanding that RCP files are just the recap project files and not the actual point files.
I tried running translations on both the RCP file and a zip file of the RCP and the support folder with the RCS file however it fails on both with a "Extractor error code -1"
{
"type": "manifest",
"hasThumbnail": "false",
"status": "failed",
"progress": "complete",
"region": "US",
"urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6emlwdGVzdGJ1Y2tldC9hc2RmLnppcA",
"version": "1.0",
"derivatives": [
{
"name": "asdf.rcp",
"hasThumbnail": "false",
"status": "failed",
"progress": "complete",
"messages": [
{
"type": "error",
"message": "Extractor error code -1",
"code": "TranslationWorker-InternalFailure"
}
],
"outputType": "svf",
"children": [
{
"guid": "63322a82-93e7-4d04-9c9c-844c23037ba6",
"type": "geometry",
"role": "3d",
"name": "scene"
}
]
}
]
}
I may be just misunderstanding the Recap format but does anyone know if this is possible?
Thanks.
As per Xiaodong's comment it seems point clouds from laser scans aren't supported yet, only ReCap Photo.
I was trying a laser scan project which is why it did not work.

Autodesk Forge File Conversion how to download files in manifest?

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?
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
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
Using the derivativeurn GET worked
I also had to make sure the derivativeUrn was encoded
(JAVA) derivativeUrn = URLEncoder.encode(derivativeUrn, "UTF-8");