Start a model upload
curl --request POST \ --url https://api.whatsbuilt.fi/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/model-versions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "filename": "rakenne.ifc", "content_type": "application/octet-stream", "model_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Records a pending model version and answers a presigned PUT for the IFC file. Upload the file, then call ingestModelVersion. Without model_id the file starts a new model; with it the file becomes the model’s next version once ingested. A repeat with the same Idempotency-Key and body returns the same model version with a fresh upload URL, with 200.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”A repeat with the same key and body returns the first answer instead of writing again. Keys are per integration and project.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Letters, digits, underscore, dot, dash and space; ends with .ifc
Example
rakenne.ifcDefault application/octet-stream; send the same Content-Type with the PUT
Upload a new version of this model; without it the file starts a new model
Responses
Section titled “Responses”The model version and where to upload its file an earlier call with the same Idempotency-Key wrote
ModelUpload: the version and where to upload its file.
object
A live model version.
object
The version’s id; the upload that made it
The project.
Every version of one model shares it; the first upload’s id
The file’s name.
pending until ingestModelVersion, processing, then complete or failed. New statuses may come.
The version number once complete; the highest complete version is the current model
Elements in the file.
Why the ingest failed.
Elements compared with the previous version: kept, added, removed, and the removed ones with labels, inspections or other data. New counts may come.
object
Kept.
Added.
Removed.
Removed with labels.
Removed with inspections.
Removed with other data.
Left out as another model’s.
The IFC schema.
The IFC file description.
The kind of model.
When it was uploaded.
When its ingest finished.
The row’s change time.
Null on a repeat once the version has left pending: its file is in place
Send exactly these headers with the PUT
object
Seconds the upload URL stays valid
Example
{ "model_version": { "status": "pending", "deleted": false }, "method": "PUT"}The model version and where to upload its file
ModelUpload: the version and where to upload its file.
object
A live model version.
object
The version’s id; the upload that made it
The project.
Every version of one model shares it; the first upload’s id
The file’s name.
pending until ingestModelVersion, processing, then complete or failed. New statuses may come.
The version number once complete; the highest complete version is the current model
Elements in the file.
Why the ingest failed.
Elements compared with the previous version: kept, added, removed, and the removed ones with labels, inspections or other data. New counts may come.
object
Kept.
Added.
Removed.
Removed with labels.
Removed with inspections.
Removed with other data.
Left out as another model’s.
The IFC schema.
The IFC file description.
The kind of model.
When it was uploaded.
When its ingest finished.
The row’s change time.
Null on a repeat once the version has left pending: its file is in place
Send exactly these headers with the PUT
object
Seconds the upload URL stays valid
Example
{ "model_version": { "status": "pending", "deleted": false }, "method": "PUT"}Invalid body, parameters or Idempotency-Key
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}Missing, malformed, expired or revoked token
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}INSUFFICIENT_SCOPE; INSUFFICIENT_PROJECT_ROLE when the project role the scopes give does not cover the write, or the project is not the integration’s; PUBLIC_API_DISABLED when the project’s owning organisation has turned the API off
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}No such project, model, model version or reference document
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}UPLOAD_NOT_CLAIMABLE: the model has no complete version yet; MODEL_BUSY: a version of it is being processed
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}RESOURCE_DELETED: what this Idempotency-Key created has since been deleted; details.id names it
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}IDEMPOTENCY_KEY_REUSED: the key was used with another body
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}RATE_LIMITED; wait for Retry-After seconds
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}UPLOAD_NOT_READY: try again in a moment
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}