Download File Another Format - Intergraph Smart 3D Web API - Customization & Programming - Hexagon PPM

Intergraph Smart 3D Web API Programmers Reference

Language
English
Product
Intergraph Smart 3D Web API
Subproduct
Smart 3D Web APIs
Search by Category
Customization & Programming
Smart 3D Version
12 (2018)

To know the various formats supported, a query can be made to include instance annotations as follows:

GET

https://MyServer.Domain.com/s3d/v1/Sites('MySiteAlias')/Plants('MyPlant')/Deliverables('{0001ADB6-0000-0000-9300-1BC0C4591E04}')/Files(‘Default’)?$format=application/json;odata.metadata=full

A Prefer HTTP header on the request with the value "odata.include-annotations=*" has to be added.

In the json response, the key "@ingr.supportedFormats" gives the supported formats to download the given file entity in.

To request a file entity in the supported format, the format can be specified either in format query option or Accept header along with the uri returned by the RetrieveFileURI POST uri.

A deliverable file with key as "Default" can be downloaded in the following formats:

Required format

Extension

MimeType to be used in $format/AcceptHeader

Portable Document Format

.pdf

application/pdf

AutoCAD Drawing Database

.dwg

image/vnd.dwg

MicroStation Design

.dgn

image/vnd.dgn

Drawing Exchange Format

.dxf

image/vnd.dxf

For example:

GET

https://MyServer.Domain.com/s3d/v1/Sites('MySiteAlias')/Plants('MyPlant')/Deliverables('{0001ADB6-0000-0000-9300-1BC0C4591E04}')/Files(‘Default’)/$value?$format=application/pdf.

This is applicable only for SmartSketch drawing.