Add elements to the active plan of a template
curl --request POST \ --url https://api.whatsbuilt.fi/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/inspection-plans/assign \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "template_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "plan_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "global_ids": [ "example" ], "filter": { "ifc_type": [ "example" ], "storey_name": [ "example" ] }, "open_elsewhere": "skip", "dry_run": false, "partial": false }'Up to 500 global_ids, or a filter that the plan’s scope takes. Elements outside the filter join as added plan elements; each gets its inspection and a label. One call handles at most 500 elements, fewer for a template of more than 12 steps. A list of more global_ids than that answers 400 VALIDATION_ERROR and writes nothing; details[0].maximum is the most ids one call takes under the template. With partial: true such a call handles the first taken ids instead, and remaining counts the ids after them: send those next. A filter call answers taken and remaining too: send the same filter until remaining is 0. With dry_run nothing is written and the counts come back. Several active plans on the template need plan_id.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”The body of assignInspectionPlanElements.
object
Required when several active plans use the template.
The elements an assignment takes, by IFC type and storey name.
object
True handles the first taken ids of a list longer than one call takes; default false answers 400
Responses
Section titled “Responses”The result
The answer of assignInspectionPlanElements, as the contract documents it.
A write.
object
The plan an assign wrote to.
object
How the elements joined the plan.
A dry run.
object
A group of a dry run.
object
A group of a dry run.
object
A plan a dry run names.
object
object
Example
{ "saved_as": "filter"}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 or plan, or a draft plan and the role is not admin
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"}Several active plans use the template; send plan_id
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
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"}