> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/web/bim/server-api.md).

# WebViewer BIM Server APIs

Enhance your web-based 3D assets with WebViewer BIM Server APIs. Convert 3D assets to various formats for seamless web viewing or extract property meta-data effortlessly. Access and manage your assets

{% hint style="info" %}
New licenses for WebViewer BIM are no longer offered.
{% endhint %}

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

Converts a 3d asset into the specified format

| Argument | Description                                                                                                                                              |
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| {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

{% tabs %}
{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```js
uri: url to your 3D asset
ext: ifc
local: true
```

{% endcode %}
{% endtab %}
{% endtabs %}

| Argument | Description                                                                  |
| -------- | ---------------------------------------------------------------------------- |
| uri      | The url of the 3d model doc to get the specific format from                  |
| ext      | The extension of the source document if it cannot be determined from the URL |
| local    | If set to true, expects URI to be a locally uploaded doc                     |

#### Response Body

A JSON document with the following structure:

{% tabs %}
{% tab title="JSON" %}
{% code lineNumbers="true" %}

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

{% endcode %}
{% endtab %}
{% endtabs %}

#### 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 Code | Description         |
| ----------- | ------------------- |
| 202         | If job was accepted |

**Example**

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

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

{% endcode %}
{% endtab %}
{% endtabs %}

#### `GET /v1/results/{job-id}`

**Request result for job**

Request Headers

{% tabs %}
{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```js
authorization: auth token if `enable_auth` is enabled on the BIM server
```

{% endcode %}
{% endtab %}
{% endtabs %}

| Argument | Description                  |
| -------- | ---------------------------- |
| {job-id} | the job id of the result doc |

#### Status Code

| Status Code | Description                                                                                                                                                                                                        |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 200         | Job is completed, returning result                                                                                                                                                                                 |
| 102         | Processing, the job is still executing. Will eventually return one of the above status codes                                                                                                                       |
| 404         | Not 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. |
| 460         | Requested job has failed during execution and no result exists                                                                                                                                                     |
| 461         | Requested job has failed since the execution took longer than the job timeout and no result exists                                                                                                                 |

**Example**

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

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

{% endcode %}
{% endtab %}
{% endtabs %}

#### `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:

{% tabs %}
{% tab title="JSON" %}
{% code lineNumbers="true" %}

```json
{
  "src": "source-id"
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

**Example**

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

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

{% endcode %}
{% endtab %}
{% endtabs %}

#### `GET /v1/util/upload/status`

Checks if a uploaded file exists

#### Request Headers

`src: local://d41d8cd98f00b204e9800998ecf8427e.ifc`

| Argument | Description                                                                      |
| -------- | -------------------------------------------------------------------------------- |
| src      | Expects src header containing the key of the local upload ie local://12345sd.ifc |

#### Status Code

| Status Code | Description        |
| ----------- | ------------------ |
| 200         | File was found     |
| 404         | File was not found |

**Example**

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

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

{% endcode %}
{% endtab %}
{% endtabs %}

#### `GET /v1/test`

Tests if the server queue is functioning

#### Response Body

A JSON document with the following structure:

{% tabs %}
{% tab title="JSON" %}
{% code lineNumbers="true" %}

```json
{
  "status": "sent"
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

**Example**

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

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

{% endcode %}
{% endtab %}
{% endtabs %}

#### `GET /v1/health`

Checks server health

#### Response Body

A JSON document with the following structure:

{% tabs %}
{% tab title="JSON" %}
{% code lineNumbers="true" %}

```json
{
  "status": "UP"
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

**Example**

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

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

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/web/bim/server-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
