I am trying to get the thumbnail from a file uploaded to BIM 360, with these returned from Data Management API folderContent call:
"thumbnails": {
"data": {
"type": "thumbnails",
"id": "dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLjhzdDB2Sk9tUkxPNEF3cVR5cWFCSFE_dmVyc2lvbj0x"
},
"meta": {
"link": {
"href": "https://developer.api.autodesk.com/modelderivative/v2/designdata/dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLjhzdDB2Sk9tUkxPNEF3cVR5cWFCSFE_dmVyc2lvbj0x/thumbnail?scopes=b360project.1cf212f9-8f18-426f-bde3-1528880626fb,O2tenant.25172440"
}
}
},
Q1: the thumbnails.data.id
seems not a urn that can be used with GetThumbnail (I am using forge-apis. What is this data id? It seems a base64 encoded usual urn. If I decode it and use it to GET the thumbnail I got 400: statusBody: { diagnostic: 'The requested thumbnail urn is invalid.' }}
Q2: GET the thumbnails.meta.link.href
gives 404. Is this expected? How can I get a thumbnail for the item?
{
status: 404,
statusText: 'Not Found',
headers: {
date: 'Tue, 31 Oct 2023 21:23:23 GMT',
'strict-transport-security': 'max-age=31536000; includeSubDomains',
'x-ads-app-identifier': 'platform-viewing-2023.10.01.417.dca5d79ee-production',
'x-ads-duration': '46 ms',
'x-ads-startup-time': 'Fri Oct 27 08:21:54 UTC 2023',
'x-ads-troubleshooting': 'The graph node specified by the urn/id was not found',
'content-length': '0',
connection: 'Close'
},
Don't decode thumbnails.data.id, use it as it is.
Here's an example of thumbnail implementation: https://github.com/libvarun/oss-gallery/blob/main/public/js/main.js#L41