Incomplete model translation status information for .rvt translations - autodesk-forge

I've been testing out model translations with .rvt files of various sizes. Recently my model translation jobs never get to a 'completed' status as described in the documentation, even though the underlying webhook information and shows that the translation is completed.
In my local testing, I have a node script that uploads the .rvt file to forge storage and starts an SVF2 translation. I have tried this with both SVF and SVF2 and have the same issue. In order to get Room and Space information, I have the generateMasterViews flag set to true. I also have x-ads-force set to true so that the translation always re-runs. After starting the translation, my script checks the translation status every 5 seconds until the status property of the translation is 'success'. Lately, my script has not been finishing because the translation status never comes back with 'success' and instead hangs at '90% complete'. See response below.
Additionally, I have a forge webhook with the extraction.updated and extraction.finished events registered. The extraction.finished event never fires, however the final extraction.updated event contains all the information that would indicate a completed translation. See response below.
This only appears to be an issue for URNs that have had translations run at least once before, however it has not always been an issue. It started occurring a week or two ago. If I upload a file to a new storage path (e.g. by prefixing the uploaded filename with a timestamp) the job status completes as expected.
Translation status response
{
"urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bGF5ZXJfbW9kZWxzLzE2MTI4MDgzNjA1MjNmb3JnZV90ZXN0X3NtYWxsLnJ2dA",
"derivatives": [
{
"hasThumbnail": "true",
"children": [
{
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bGF5ZXJfbW9kZWxzLzE2MTI4MDgzNjA1MjNmb3JnZV90ZXN0X3NtYWxsLnJ2dA/output/Resource/model.sdb",
"role": "Autodesk.CloudPlatform.PropertyDatabase",
"mime": "application/autodesk-db",
"guid": "6fac95cb-af5d-3e4f-b943-8a7f55847ff1",
"type": "resource",
"status": "success"
},
{
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bGF5ZXJfbW9kZWxzLzE2MTI4MDgzNjA1MjNmb3JnZV90ZXN0X3NtYWxsLnJ2dA/output/Resource/AECModelData.json",
"role": "Autodesk.AEC.ModelData",
"mime": "application/json",
"guid": "a4aac952-a3f4-031c-4113-b2d9ac2d0de6",
"type": "resource",
"status": "success"
},
{
"phaseNames": "New Construction",
"role": "3d",
"hasThumbnail": "true",
"children": [
{
"guid": "92b5dec7-790a-45b0-a5e8-cd9f76058c3a-00056e47",
"type": "view",
"role": "3d",
"name": "3D",
"status": "success",
"progress": "complete",
"camera": [
135.5139617919922,
-135.10296630859375,
149.049560546875,
-4.035602569580078,
4.446601867675781,
9.5,
-0.40824830532073975,
0.40824830532073975,
0.8164966106414795,
1.5180892944335938,
0,
1,
1
]
},
{
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bGF5ZXJfbW9kZWxzLzE2MTI4MDgzNjA1MjNmb3JnZV90ZXN0X3NtYWxsLnJ2dA/output/Resource/3D View/3D/3D1.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "c70aa596-d404-714f-6795-9276087c3800",
"type": "resource",
"resolution": [100, 100],
"status": "success"
},
{
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bGF5ZXJfbW9kZWxzLzE2MTI4MDgzNjA1MjNmb3JnZV90ZXN0X3NtYWxsLnJ2dA/output/Resource/3D View/3D/3D2.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "6ef65d1a-4a59-111d-f1ec-4e543bd2712b",
"type": "resource",
"resolution": [200, 200],
"status": "success"
},
{
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bGF5ZXJfbW9kZWxzLzE2MTI4MDgzNjA1MjNmb3JnZV90ZXN0X3NtYWxsLnJ2dA/output/Resource/3D View/3D/3D4.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "2c06739e-5164-4f6d-450e-c8833fd2a2ba",
"type": "resource",
"resolution": [400, 400],
"status": "success"
}
],
"success": "90%",
"name": "3D",
"guid": "f2cf4f10-55b9-4f4b-7c03-9f1cf7d2e689",
"progress": "90%",
"type": "geometry",
"viewableID": "92b5dec7-790a-45b0-a5e8-cd9f76058c3a-00056e47",
"status": "inprogress"
},
{
"phaseNames": "New Construction",
"role": "3d",
"hasThumbnail": "true",
"children": [
{
"guid": "c884ae1b-61e7-4f9d-0001-719e20b22d0b-00056e5e",
"type": "view",
"role": "3d",
"name": "New Construction",
"status": "success",
"progress": "complete",
"camera": [
39.99827575683594,
-36.743263244628906,
52.14657211303711,
-2.148294448852539,
5.40330696105957,
10,
-0.40824830532073975,
0.40824830532073975,
0.8164966106414795,
1.0748299360275269,
0,
1,
1
]
},
{
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bGF5ZXJfbW9kZWxzLzE2MTI4MDgzNjA1MjNmb3JnZV90ZXN0X3NtYWxsLnJ2dA/output/Resource/3D View/08f99ae5-b8be-4f8d-881b-128675723c10/New Construction/New Construction1.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "a3c19573-8948-7ae0-fb5c-75cab1d0e87a",
"type": "resource",
"resolution": [100, 100],
"status": "success"
},
{
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bGF5ZXJfbW9kZWxzLzE2MTI4MDgzNjA1MjNmb3JnZV90ZXN0X3NtYWxsLnJ2dA/output/Resource/3D View/08f99ae5-b8be-4f8d-881b-128675723c10/New Construction/New Construction2.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "86d53dd2-82c8-1948-5997-00ebf6078ed7",
"type": "resource",
"resolution": [200, 200],
"status": "success"
},
{
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bGF5ZXJfbW9kZWxzLzE2MTI4MDgzNjA1MjNmb3JnZV90ZXN0X3NtYWxsLnJ2dA/output/Resource/3D View/08f99ae5-b8be-4f8d-881b-128675723c10/New Construction/New Construction4.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "7e36c074-8997-d941-4dc3-6a72fcdf3b9b",
"type": "resource",
"resolution": [400, 400],
"status": "success"
}
],
"success": "90%",
"name": "New Construction",
"guid": "37992551-4555-5430-58a0-9158b794a411",
"progress": "90%",
"type": "geometry",
"viewableID": "c884ae1b-61e7-4f9d-0001-719e20b22d0b-00056e5e",
"status": "inprogress"
}
],
"name": "1612808360523forge_test_small.rvt",
"progress": "90% complete",
"outputType": "svf2",
"status": "inprogress"
}
],
"hasThumbnail": "true",
"progress": "90% complete",
"type": "manifest",
"region": "US",
"version": "1.0",
"status": "inprogress"
}
Webhook extraction.updated payload:
{
"URN": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bGF5ZXJfbW9kZWxzL2ZvcmdlX3Rlc3Rfc21hbGwucnZ0",
"Payload": {
"status": "success",
"scope": "12f35ced-3397-40c9-a7dc-bd80bddbbca6",
"bubble": {
"progress": "complete",
"owner": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bGF5ZXJfbW9kZWxzL2ZvcmdlX3Rlc3Rfc21hbGwucnZ0",
"region": "US",
"type": "design",
"children": [],
"guid": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bGF5ZXJfbW9kZWxzL2ZvcmdlX3Rlc3Rfc21hbGwucnZ0",
"startedAt": "Mon Feb 08 18:04:15 UTC 2021",
"hasThumbnail": "true",
"status": "success",
"success": "100%",
"urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bGF5ZXJfbW9kZWxzL2ZvcmdlX3Rlc3Rfc21hbGwucnZ0"
},
"registerKey": []
}
}

I asked our engineering team to look into the logs and this is what they replied. "The manifest status is 'now' 100% complete. It was a SVF2 job, it took about 3 minutes for SVF2 generation. I guess that’s we were seeing “job was suck”.
"hasThumbnail": "true",
"progress": "complete",
"type": "manifest",
"region": "US",
"version": "1.0",
"status": "success"
"
I also tried your scenarios and was not able to reproduce the problem, so I am not really sure what to tell you. If you see more problems like this in future, please reach out to me directly at cyrille at autodesk .com

Related

Forge API -missing IFC derivatives when checking translation result

I'm trying to translate a revit file directly from BIM360.
I posted a job like so:
List<JobPayloadItem> outputs = new List<JobPayloadItem> {
new (JobPayloadItem.TypeEnum.Ifc)
};
string workFlowId = Guid.NewGuid().ToString();
JobPayloadMisc misc = new JobPayloadMisc(workFlowId);
JobPayloadDestination.RegionEnum destinationRegion = JobPayloadDestination.RegionEnum.US;
JobPayloadDestination destination = new JobPayloadDestination(destinationRegion);
JobPayload payload = new JobPayload(new JobPayloadInput(base64Urn), new JobPayloadOutput(outputs, destination), misc);
m_api.Configuration.AccessToken = accessToken;
DynamicJsonResponse response = await m_api.TranslateAsync(payload, true);
And when I try to check it's result with the safe urn I get in this response like this:
DynamicJsonResponse result = await m_api.GetManifestAsync(base64Urn);
There is no IFC derivative job in the response (I put ***** instead of some private information).
Here is the response:
{
"urn": "*****",
"derivatives": {
"0": {
"hasThumbnail": "true",
"overrideOutputType": "svf2",
"children": {
"0": {
"urn": "urn:adsk.viewing:fs.file:*****/output/Resource/model.sdb",
"role": "Autodesk.CloudPlatform.PropertyDatabase",
"mime": "application/autodesk-db",
"guid": "6fac95cb-af5d-3e4f-b943-8a7f55847ff1",
"type": "resource",
"status": "success"
},
"1": {
"urn": "urn:adsk.viewing:fs.file:*****/output/Resource/AECModelData.json",
"role": "Autodesk.AEC.ModelData",
"mime": "application/json",
"guid": "a4aac952-a3f4-031c-4113-b2d9ac2d0de6",
"type": "resource",
"status": "success"
},
"2": {
"guid": "86dcdfb0-d97d-e3d7-3404-b53abf1678b1",
"phaseNames": "New Construction",
"hasThumbnail": "true",
"role": "3d",
"name": "3D",
"progress": "complete",
"type": "geometry",
"viewableID": "92b5dec7-790a-45b0-a5e8-cd9f76058c3a-009a4098",
"status": "success",
"children": {
"0": {
"guid": "92b5dec7-790a-45b0-a5e8-cd9f76058c3a-009a4098",
"role": "3d",
"name": "3D",
"progress": "complete",
"camera": {
"0": 625.0464477539063,
"1": -563.9346313476563,
"2": 833.3741455078125,
"3": 96.7083740234375,
"4": -35.5965690612793,
"5": 305.0361022949219,
"6": -0.40824830532073977,
"7": 0.40824830532073977,
"8": 0.8164966106414795,
"9": 0.6307491064071655,
"10": 0,
"11": 1,
"12": 1
},
"type": "view",
"status": "success"
},
"1": {
"urn": "urn:adsk.viewing:fs.file:*****/output/Resource/3D View/3D/3D.svf",
"role": "graphics",
"mime": "application/autodesk-svf",
"guid": "fbec8b0f-58d6-2e86-30c8-211e4056efeb",
"type": "resource"
},
"2": {
"urn": "urn:adsk.viewing:fs.file:*****/output/Resource/3D View/3D/3D1.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "c70aa596-d404-714f-6795-9276087c3800",
"type": "resource",
"resolution": {
"0": 100,
"1": 100
},
"status": "success"
},
"3": {
"urn": "urn:adsk.viewing:fs.file:*****/output/Resource/3D View/3D/3D2.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "6ef65d1a-4a59-111d-f1ec-4e543bd2712b",
"type": "resource",
"resolution": {
"0": 200,
"1": 200
},
"status": "success"
},
"4": {
"urn": "urn:adsk.viewing:fs.file:*****/output/Resource/3D View/3D/3D4.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "2c06739e-5164-4f6d-450e-c8833fd2a2ba",
"type": "resource",
"resolution": {
"0": 400,
"1": 400
},
"status": "success"
}
}
},
"3": {
"isMasterView": true,
"phaseNames": "New Construction",
"hasThumbnail": "true",
"role": "3d",
"children": {
"0": {
"guid": "c884ae1b-61e7-4f9d-0001-719e20b22d0b-009a40af",
"role": "3d",
"name": "New Construction",
"progress": "complete",
"camera": {
"0": 594.0901489257813,
"1": -500.6220397949219,
"2": 819.0045166015625,
"3": 95.86978149414063,
"4": -2.4016761779785158,
"5": 320.78411865234377,
"6": -0.40824830532073977,
"7": 0.40824830532073977,
"8": 0.8164966106414795,
"9": 0.3480738401412964,
"10": 0,
"11": 1,
"12": 1
},
"type": "view",
"status": "success"
},
"1": {
"urn": "urn:adsk.viewing:fs.file:*****/output/Resource/3D View/*****/New Construction/New Construction.svf",
"role": "graphics",
"mime": "application/autodesk-svf",
"guid": "3572dadf-f7d8-cf8b-a625-967f27309e85",
"type": "resource"
},
"2": {
"urn": "urn:adsk.viewing:fs.file:*****/output/Resource/3D View/*****/New Construction/New Construction1.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "a3c19573-8948-7ae0-fb5c-75cab1d0e87a",
"type": "resource",
"resolution": {
"0": 100,
"1": 100
},
"status": "success"
},
"3": {
"urn": "urn:adsk.viewing:fs.file:*****/output/Resource/3D View/*****/New Construction/New Construction2.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "86d53dd2-82c8-1948-5997-00ebf6078ed7",
"type": "resource",
"resolution": {
"0": 200,
"1": 200
},
"status": "success"
},
"4": {
"urn": "urn:adsk.viewing:fs.file:*****/output/Resource/3D View/*****/New Construction/New Construction4.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "7e36c074-8997-d941-4dc3-6a72fcdf3b9b",
"type": "resource",
"resolution": {
"0": 400,
"1": 400
},
"status": "success"
}
},
"name": "New Construction",
"guid": "4b621e7d-f520-422b-95fd-645b8690168a",
"progress": "complete",
"type": "geometry",
"viewableID": "c884ae1b-61e7-4f9d-0001-719e20b22d0b-009a40af",
"status": "success"
}
},
"name": "*****.rvt",
"progress": "complete",
"messages": {
"0": {
"type": "warning",
"code": "Revit-MissingLink",
"message": {
"0": "Missing link files: {0}",
"1": "08.12.2019. *****.dwg, 08.12.2019. *****.dwg, 08.12.2019. *****.dwg, 08.12.2019. *****.dwg, 08.12.2019. *****.dwg, 08.12.2019. *****.dwg, 08.12.2019. *****.dwg, 08.12.2019. *****.dwg, 08.12.2019. *****.dwg, 08.12.2019. *****.dwg"
}
}
},
"outputType": "svf",
"status": "success"
},
"1": {
"children": {
"0": {
"urn": "urn:adsk.viewing:fs.file:*****/output/preview1.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "db899ab5-939f-e250-d79d-2d1637ce4565",
"type": "resource",
"resolution": {
"0": 100,
"1": 100
},
"status": "success"
},
"1": {
"urn": "urn:adsk.viewing:fs.file:*****/output/preview2.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "3f6c118d-f551-7bf0-03c9-8548d26c9772",
"type": "resource",
"resolution": {
"0": 200,
"1": 200
},
"status": "success"
},
"2": {
"urn": "urn:adsk.viewing:fs.file:*****/output/preview4.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "4e751806-0920-ce32-e9fd-47c3cec21536",
"type": "resource",
"resolution": {
"0": 400,
"1": 400
},
"status": "success"
}
},
"progress": "complete",
"outputType": "thumbnail",
"status": "success"
}
},
"hasThumbnail": "true",
"messages": {
"0": {
"type": "warning",
"code": "Revit-MissingLink",
"message": {
"0": "Missing link files: {0}",
"1": "08.12.2019. *****.dwg, 08.12.2019. *****.dwg, 08.12.2019. *****.dwg, 08.12.2019. *****.dwg, 08.12.2019. *****.dwg, 08.12.2019. *****.dwg, 08.12.2019. *****.dwg, 08.12.2019. *****.dwg, 08.12.2019. *****.dwg, 08.12.2019. *****.dwg"
}
}
},
"progress": "99% complete",
"type": "manifest",
"region": "US",
"version": "1.0",
"status": "inprogress"
}
What am I doing wrong?
When you request the IFC translation, you should get a response that the IFC translation request was accepted (success). Later when you request the manifest, you will not see the IFC output until it is fully processed. In your example, you see the SVF2 output because this one is mandatory on BIM360 for RVT files. The IFC entry will appear when the IFC file is ready. Since you requested the IFC sometime ago now, do ask for the manifest again, it should be there by now. If not, please contact us at forge.help at autodesk.com and share the URN which failed and we will take a look at out logs to isolate the issue.

Autodesk Forge model derivate properties returns empty collection

Autodesk Forge model derivate properties returns empty collection, I am using the api
https://developer.api.autodesk.com/modelderivative/v2/designdata/:urn/metadata/:guid/properties
to obtain the properties of a demp.dwg file but it returns the empty collection
{
"data": {
"type": "properties",
"collection": []
} }
the call to get manifest
https://developer.api.autodesk.com/modelderivative/v2/designdata/:urn/manifest
is as follows
{"urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6YW50YW1pbmEvUHJ1ZWJhLmR3Zw",
"derivatives": [
{
"hasThumbnail": "true",
"children": [
{
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6YW50YW1pbmEvUHJ1ZWJhLmR3Zw/output/properties.db",
"role": "Autodesk.CloudPlatform.PropertyDatabase",
"mime": "application/autodesk-db",
"guid": "cb73c076-d3cd-a725-754f-a64cd8c07648",
"type": "resource",
"status": "success"
},
{
"guid": "fa729fe0-682e-c3b7-9662-9d88ce4b7b68",
"type": "geometry",
"role": "2d",
"name": "4140",
"viewableID": "4140",
"status": "success",
"hasThumbnail": "true",
"progress": "complete",
"children": [
{
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6YW50YW1pbmEvUHJ1ZWJhLmR3Zw/output/Prueba-4140_100.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "816e2536-e012-c3d5-1b5a-fa4146daa077",
"type": "resource",
"resolution": [
100,
100
],
"status": "success"
},
{
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6YW50YW1pbmEvUHJ1ZWJhLmR3Zw/output/Prueba-4140_200.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "21cfc2dc-2b82-13d7-5f37-89aba22ce02d",
"type": "resource",
"resolution": [
200,
200
],
"status": "success"
},
{
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6YW50YW1pbmEvUHJ1ZWJhLmR3Zw/output/Prueba-4140_400.png",
"role": "thumbnail",
"mime": "image/png",
"guid": "7c88e238-088a-f574-cbe8-b86397d67ef9",
"type": "resource",
"resolution": [
400,
400
],
"status": "success"
},
{
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6YW50YW1pbmEvUHJ1ZWJhLmR3Zw/output/1b89b0d3-1560-00ab-c51e-7626cfe4cecb_f2d/primaryGraphics.f2d",
"role": "graphics",
"mime": "application/autodesk-f2d",
"guid": "56187d40-cf5c-e4d9-2fe7-a69210e2fcfe",
"type": "resource",
"status": "success"
}
]
}
],
"name": "Prueba.dwg",
"progress": "complete",
"outputType": "svf",
"status": "success"
}
],
"hasThumbnail": "true",
"progress": "complete",
"type": "manifest",
"region": "US",
"version": "1.0",
"status": "success" }
I can't get it to return the data in properties
This seems to be a problem in the GET properties endpoint that's specific to your DWG file. We've reported the issue to the engineering team, and will get back to you as soon as we have more information.
In the meantime, I'd suggest that you take a look at this blog post: https://forge.autodesk.com/blog/accessing-design-metadata-without-viewer. It talks about other ways in which the model properties can be retrieved. In case of your specific DWG, I was able to retrieve the properties in the sqlite form without problems.

Translate IFC Failure

I try to translate a IFC file by API, but failed.
And I can translate this file successful in [https://viewer.autodesk.com/designviews].
The manifest
{
"urn": "dXJuOmFkc2sub2JqZWN0czp......",
"derivatives": [
{
"hasThumbnail": "false",
"name": "XXXXXXXX.ifc",
"progress": "complete",
"messages": [
{
"type": "error",
"message": "Unrecoverable exit code from extractor: -1073741829",
"code": "TranslationWorker-InternalFailure"
}
],
"outputType": "svf",
"status": "failed"
}
],
"hasThumbnail": "false",
"progress": "complete",
"type": "manifest",
"region": "US",
"version": "1.0",
"status": "failed"
}

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"
}

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");