RetrieveFileUri - 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)

Returns a URI that can be used to download a drawing file. For example, the URL below returns a URI to the MTO file from the deliverable whose id is '{0001ADB6-0000-0000-9300-1BC0C4591E04}'.

POST https:/MyServer.Domain.com/s3d/v1/Sites('MySiteAlias')/Plants('MyPlant')/Deliverables('{0001ADB6-0000-0000-9300-1BC0C4591E04}')/Files('MTO')/Com.Ingr.Core.V1.RetrieveFileUri/

To know the various formats supported, a query can be made to include instant 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 header with the value "odata.include-annotations=*" has to be added.

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

To request a file entity in given 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