View Thumbnail URL
This topic provides instructions on how to retrieve the following:
- URL of the thumbnail.
- Display URL of the thumbnail.
As a prerequisite for completing the current topic, you need to complete the following tasks:
You will use the following query in this task:
| Type | Operation | Description |
|---|---|---|
| Query | model | Retrieves model details. |
Step 1 - Get the URL of the Thumbnail
The model query retrieves the URL of the thumbnail. The thumbnail is a small image that represents the model.
- In Manufacturing Data Model Explorer, enter the following query in the Query pane:
Query:
query GetModel($modelId: ID!) { model(modelId: $modelId) { id name { value } designItem{ id name extensionType } thumbnail { status signedUrl } component { id name { value } partNumber { value } description { value } } } }Show More - In the Query Variables Pane, enter the value of the
modelId. To know how to obtain themodelId(tipRootModel), refer to Retrieve Items.Query Variables
{ "modelId": "bW9kZWx-d00wSVJmdmczT1VLTHZsYjJ4dDJMdF9MMkN-Y3hTMXhkYkFmSjFZZWZUSldUQU9zUV9hZ2E" } - Click Play. The field
signedUrlis the URL of the thumbnail.Response
{ "data": { "model": { "id": "bW9kZWx-d00wSVJmdmczT1VLTHZsYjJ4dDJMdF9MMkN-Y3hTMXhkYkFmSjFZZWZUSldUQU9zUV9hZ2E", "name": { "value": "A" }, "designItem": { "id": "urn:adsk.wipstg:dm.lineage:5mxzvEAWSoCRQEcpeWsrww", "name": "A", "extensionType": "f3d" }, "thumbnail": { "status": "SUCCESS", "signedUrl": "https://cdn-stg.derivative.autodesk.com/dXJuOmFkc2sud2lwc3RnOmZzLmZpbGU6dmYuNW14enZFQVdTb0NSUUVjcGVXc3J3dz92ZXJzaW9uPTI/output/0/1/thumbnails/01_thumb_400x400.png?Policy=eyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLXN0Zy5kZXJpdmF0aXZlLmF1dG9kZXNrLmNvbS9kWEp1T21Ga2Myc3VkMmx3YzNSbk9tWnpMbVpwYkdVNmRtWXVOVzE0ZW5aRlFWZFRiME5TVVVWamNHVlhjM0ozZHo5MlpYSnphVzl1UFRJL291dHB1dC8wLzEvdGh1bWJuYWlscy8wMV90aHVtYl8qIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzQ2NTYwODc3fX19XX0_&Key-Pair-Id=APKAJVJIJZ6OEYDPJSQA&Signature=TMWN7NQyYxAgINMGIRbAXc6bXqoi2yFv0qYHkclcU3yP0kWQarTKmx0dFfOPkXNm2rl53PBuJDvi0xV5~bbpuMv241s19wpHMTfSFTWZQHj2nwai1qo~KQM~iRuQnt5o2Psc~dvXwlHKITfbxqsKA3C9t7IQQJuC2hr0PftLh622l~xiDWVjP0xCwITCLXvwpqxxlJX9bmXQwhP-hs19MXUwkcYq2dibXmNwWU8xYrSPBupDx2jicWsybD36PPqtRHSsUS6jLi6wnotGA3ryCiMY6hINiengk5VLLRhzjwpBOzLr0hTDPCSUSOww2CxknLMPHaytkYSh4kLNnWWdOg__" }, "component": { "id": "cHJvZHVjdH53TTBJUmZ2ZzNPVUtMdmxiMnh0Mkx0X0wyQ35GMkJWR2xuUnZUY2VCZlExNWtVTkpVX2FnYQ", "name": { "value": "A" }, "partNumber": { "value": "A" }, "description": { "value": "A BOM P1" } } } } }Show More
Note:
- The status mentioned in the response is the result of the successful execution of the requests. If the requests are not successful, we recommend that you retry executing the queries to get a successful response. For more information about other statuses, see ThumbnailStatusEnum.
- The generated URL is valid for six hours after it is generated.
Step 2 - View the Thumbnail
To view the thumbnail, perform the following actions:
- Start your preferred web browser.
- Browse to the URL of the image that you want to view. In this case, the value of
signedUrl.
After performing the given steps, you should be able to see a screen like the following image.