WebViewer BIM Server APIs

GET /v1/convert/3d/{format}

Converts a 3d asset into the specified format

ArgumentDescription
{format}Specific format that can be vsfx to convert a 3d Asset to a streaming format for web viewing or properties to extract property meta-data from a 3d Asset

Request Headers

JavaScript

1uri: url to your 3D asset
2ext: ifc
3local: true
ArgumentDescription
uriThe url of the 3d model doc to get the specific format from
extThe extension of the source document if it cannot be determined from the URL
localIf set to true, expects URI to be a locally uploaded doc

Response Body

A JSON document with the following structure:

JSON

1{
2 "jid": "The job id of the result doc",
3 "authorization": "be36e17d84d9eac35f41aef4cd9dc6e894f9f452b96175b2075308725338c3fe"
4}

Note

If enable_auth is set to true for the BIM server configuration, the response body will include an auth token. This token will be necessary to pull the uploaded asset.

Status Code

Status CodeDescription
202If job was accepted

Example

shell

1curl -X GET http://localhost:8085/v1/convert/3d/vsfx -H "uri: url_to_your_3d_asset"

GET /v1/results/{job-id}

Request result for job

Request Headers

JavaScript

1authorization: auth token if `enable_auth` is enabled on the BIM server
ArgumentDescription
{job-id}the job id of the result doc

Status Code

Status CodeDescription
200Job is completed, returning result
102Processing, the job is still executing. Will eventually return one of the above status codes
404Not found, no job was found for requested result
408Requested job has failed since the execution took longer than the job timeout and no result exists. Should keep retrying for the result if you get a 408. Set by request_timeout server timeout, defaults to 10s.
460Requested job has failed during execution and no result exists
461Requested job has failed since the execution took longer than the job timeout and no result exists

Example

shell

1curl -X GET http://localhost:8085/v1/results/{jid} --output out.vsf

POST /v1/util/upload

Uploads a file for usage with other jobs

Request Body

Expects multipart form data with Filename containing filename and data within file

Response Body

A JSON document with the following structure:

JSON

1{
2 "src": "source-id"
3}

Example

shell

1curl -X POST localhost:8085/v1/util/upload -v --form file='@ABSOLUTE_PATH/PlayersTheatre.ifc'

GET /v1/util/upload/status

Checks if a uploaded file exists

Request Headers

src: local://d41d8cd98f00b204e9800998ecf8427e.ifc

ArgumentDescription
src Expects src header containing the key of the local upload ie local://12345sd.ifc

Status Code

Status CodeDescription
200File was found
404File was not found

Example

shell

1curl -I -X GET localhost:8085/v1/util/upload/status -H "src: local://d41d8cd98f00b204e9800998ecf8427e.ifc"

GET /v1/test

Tests if the server queue is functioning

Response Body

A JSON document with the following structure:

JSON

1{
2 "status": "sent"
3}

Example

shell

1curl -X GET http://localhost:8085/v1/test

GET /v1/health

Checks server health

Response Body

A JSON document with the following structure:

JSON

1{
2 "status": "UP"
3}

Example

shell

1curl -X GET http://localhost:8085/v1/health

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales