Skip to content
Suomi

Replace the model files a finding refers to

PUT
/v1/projects/{projectId}/findings/{guid}/files
Code sample: Shell / cURL
curl --request PUT \
--url https://api.whatsbuilt.fi/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/findings/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '[ { "ifc_project": "example", "filename": "example", "reference": "example" } ]'

BCF 3.0 §3.3: the list replaces the finding’s files. Each replaced file comes as a deletion in listFindingFiles.

projectId
required
string format: uuid
guid
required
string format: uuid

The finding’s guid

Media typeapplication/json
Array<object>
<= 200 items
object
ifc_project
string | null
<= 255 characters
filename
string | null
<= 512 characters
reference
string | null
<= 2048 characters

Example generated

[
{
"ifc_project": "example",
"filename": "example",
"reference": "example"
}
]

The finding’s files

Media typeapplication/json
Array<object>

A live finding file.

object
id
required

A whole number as a string

string
project_id
required

The project.

string format: uuid
topic_guid
required

Its topic.

string format: uuid
ifc_project
required

The IFC project.

string | null
filename
required

The file’s name.

string | null
reference
required

Its reference.

string | null
changed_at
required

The row’s change time.

string
deleted
required
boolean

Example

[
{
"deleted": false
}
]

Invalid body, parameters or Idempotency-Key

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

Missing, malformed, expired or revoked token

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

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

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

No such project, finding, comment, viewpoint, draft or element

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

IDEMPOTENCY_KEY_REUSED: the key was used with another body

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

RATE_LIMITED; wait for Retry-After seconds

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}