---
title: Introduction
summary: The HTTP API of a BIM.works instance — base URL, the OpenAPI document, request and response conventions, the runnable operation pages, and where the API stops.
tagline: Every OpenAPI call, runnable on this page.
order: 10
languages: [javascript, java, csharp, php, python]
see-also: [tutorials/openapi/getting-started, api/authentication, api/errors, reference/bql/output]
featured: true
---

# Introduction

Every BIM.works instance serves an [[term:openapi|OpenAPI]] 3.1 document and the operations it describes. It is the way in for everything that is not a JavaScript, Java or .NET [[term:sdk|SDK]]: curl, a backend in another language, an integration platform, and the generated PHP client. Every operation has a page in this part with a request you can edit and execute.

## Base URL and document {#base-url}

Operations live under `<app>/openapi`, where `<app>` is the instance's public URL including its base path. For example: `https://bim.works/openapi/ifc/Query`, `https://client.bim.works/bw/openapi/fs/GetNode`. The document is at `<app>/openapi.json` (also `openapi.yaml`), and [Swagger UI](../../swagger-ui/) is served next to it with the same document.

## Conventions {#conventions}

- Almost every operation is a `POST` with a JSON body, and the path is the tag and the operation id: `/auth/LoginWithApiToken`, `/fs/ListNodes`, `/ifc/Query`. The `GET` calls are [[openapi:GetRootNodeUuid]] and [[openapi:Version]].
- Field names are snake_case (`node_uuid`, `version_uuid`, `response_format`); paths in a request are relative to the token's root [[term:node|node]].
- [[term:model|Models]] are addressed with a [[page:api/schemas#ModelIdentifier]]: a [[term:version|version]], or the latest versions under a node (optionally recursive). Query, [[term:check|check]] and compare take arrays of them. The schema also has a URL identifier, which is not resolved yet.
- Uploads are `multipart/form-data` ([[openapi:UploadModel]]); [[openapi:AddModelWithUrl]] fetches the file instead.
- An operation that answers in more than one format takes a `format` field, and each value names its content type in the operation's page: [[openapi:Download]] (the original file, IFC or ifcXML), [[openapi:Query]] (records, a count, a selection, a table, or the objects as [[term:ifc|IFC]] or ifcXML, [[bql:output#ifc]]), [[openapi:Check]] (results, a summary or [[term:bcf|BCF]]), [[openapi:GetCompareResult]] and [[openapi:ExportCityGML3]]. `format` wins over the `Accept` header, which is only read when `format` is absent: a generated client sends `Accept: application/json` on every call.
- Downloads stream the file ([[openapi:Download]], [[openapi:DownloadAsZip]]). `Download` converts an [[term:ifc-schema|IFC2X3]] model to IFC4 when the request names a `target_schema`; what the conversion lost and added is counted in the response headers and listed by [[openapi:SchemaConversionReport]].
- A stored [[term:action|action]] runs by reference: [[openapi:Query]] and [[openapi:Check]] take an `action_uuid` (and optionally its `action_version`) instead of the query or check text. That needs read rights on the action and the operation's own [[term:scope]], not `actions:read`.
- Calls run synchronously: a [[term:transaction|transaction]] ([[openapi:CommitTransaction]]) returns when the new version exists. Two can answer early instead. An upload with `wait_ms` answers `202` and a `job_uuid` while the checkin runs, which [[openapi:GetCheckin]] follows ([[page:how-to/models/upload-a-model]]). [[openapi:CompareModels]] with `options.wait_ms` answers `202` with `status: RUNNING` and a `result_uuid` when the compare is still running after that time; it goes on in the background, and [[openapi:GetCompareResult]] reads the result later.
- Browser calls are answered with the CORS headers the instance is configured for, so a `fetch` preflight succeeds.

## Groups {#groups}

The rail groups the operations as the OpenAPI document does; a group's name opens its first operation.

<table class="dense">
<thead><tr><th>Group</th><th>Description</th><th>Operations</th></tr></thead>
<tbody>
<tr id="group-auth"><td>[[page:api/loginwithusernamepassword|Auth - Authentication]]</td><td data-link-terms>Authentication and authorization related calls such as for logging in and creating authentication tokens.</td><td>13</td></tr>
<tr id="group-fs"><td>[[page:api/createnode|Fs - FileSystem]]</td><td data-link-terms>BIM.works repository's virtual filesystem related calls.</td><td>16</td></tr>
<tr id="group-model"><td>[[page:api/download|Model]]</td><td data-link-terms>Calls related to models, for example to upload or download models</td><td>12</td></tr>
<tr id="group-versions"><td>[[page:api/version|Versions]]</td><td data-link-terms>Calls related to Versions</td><td>1</td></tr>
<tr id="group-ifc"><td>[[page:api/query|IFC - Industry Foundation Classes]]</td><td data-link-terms>IFC related calls, for example queries and model checks</td><td>21</td></tr>
<tr id="group-gis"><td>[[page:api/exportcitygml3|GIS - Geographic Information Systems]]</td><td data-link-terms>GIS related calls, for example to export to CityGML</td><td>6</td></tr>
<tr id="group-ai"><td>[[page:api/texttoaction|AI - Artificial Intelligence]]</td><td data-link-terms>Natural-language calls, for example to turn a sentence into a BQL query, a BVL visualisation or a BCL check</td><td>1</td></tr>
<tr id="group-account"><td>[[page:api/register|Account]]</td><td data-link-terms>The signed-in account: registration, password, sessions and settings</td><td>10</td></tr>
<tr id="group-admin"><td>[[page:api/listaccounts|Admin]]</td><td data-link-terms>The administration of an organization: its accounts and features</td><td>3</td></tr>
<tr id="group-actions"><td>[[page:api/listactions|Actions]]</td><td data-link-terms>Stored queries, checks, visualizations and other actions, which Query and Check run by uuid</td><td>6</td></tr>
<tr id="group-workspaces"><td>[[page:api/listworkspaces|Workspaces]]</td><td data-link-terms>Curated views on a folder for visitors of the BIM.works web app, and their share links</td><td>5</td></tr>
<tr id="group-info"><td>[[page:api/getapplicationversion|Info]]</td><td data-link-terms>General information about the instance</td><td>1</td></tr>
<tr id="group-viewer"><td>[[page:api/getgeometrymetadata|Viewer]]</td><td data-link-terms>What the viewers need to place and load models</td><td>1</td></tr>
<tr id="group-linkeddata"><td>[[page:api/getlinkeddatapolicy|Linked data]]</td><td data-link-terms>Files, URLs, texts and identifiers linked to objects, which follow their objects to later Versions</td><td>15</td></tr>
</tbody>
</table>

## Trying an operation {#try-it}

Every operation page carries an executor: edit the request, press Send, read the status, timing and body. When you are signed in to this instance in the same browser it uses your [[term:account|account]]'s demo [[term:api-token|API token]], so placeholders such as `BIM_WORKS_FIRST_MODEL` resolve to your [[term:demo-model|demo models]]; a token pasted into the block is used instead. The example under the executor follows the form, in the language chosen in the bar.

## Limits {#limits}

The OpenAPI covers the repository operations: authentication, API tokens and delegated tokens, the account and the organization's administration, the node tree, uploads and downloads, queries, checks, comparisons, transactions, the stored [[term:action|actions]], [[term:workspace|workspaces]], georeferencing, CityGML and glTF export, renders and BCF snapshots. The task API behind the SDKs has more (the [[term:viewer|viewer]]'s geometry streams, chat). The result of [[openapi:Query]] follows the query, so its shape is described in prose ([[bql:output]]) rather than by a schema.
