Some test text!

Search
Hamburger Icon

Web / Guides / Server API

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

uri: url to your 3D asset
ext: ifc
local: 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:

{
  "jid": "The job id of the result doc",
  "authorization": "be36e17d84d9eac35f41aef4cd9dc6e894f9f452b96175b2075308725338c3fe"
}

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

curl -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

authorization: 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
408
  • Requested 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

curl -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:

{
  "src": "source-id"
}

Example

curl -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
srcExpects 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

curl -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:

{
  "status": "sent"
}

Example

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

GET /v1/health

Checks server health

Response Body

A JSON document with the following structure:

{
  "status": "UP"
}

Example

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

Get the answers you need: Chat with us