Skip to content
Suomi

One plan with its coverage

GET
/v1/projects/{projectId}/inspection-plans/{planId}
Code sample: Shell / cURL
curl --request GET \
--url https://api.whatsbuilt.fi/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/inspection-plans/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>'

The listInspectionPlans item with how far its scope is inspected. Draft plans are for the admin role; archived plans show to every role.

projectId
required
string format: uuid
planId
required
string format: uuid

The plan

Media typeapplication/json
object
id
required

The plan.

string format: uuid
project_id
required

The project.

string format: uuid
template_id
required

Its template.

string format: uuid
name
required

Its name.

string
description
required

Its description.

string | null
scope
required

Keys AND together, values within a key OR; {} is the whole project. New keys may come.

object
ifc_type

IFC types.

Array<string>
storey_name

Storey names.

Array<string>
global_ids

GlobalIds.

Array<string>
assigned

The plan also covers its added elements (listInspectionPlanElements, kind added)

boolean
excluded

The plan leaves out its excluded elements

boolean
start_date
required

YYYY-MM-DD

string | null
due_date
required

YYYY-MM-DD

string | null
status
required

Draft, active, completed or archived; new statuses may come

string
Allowed values: draft active completed archived
created_by
required

Who created it.

string | null
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/
created_at
required

When it was created.

string
modified_date
required

When it was changed last.

string
assignees
required

Its assignees.

Array<object>

An assignee of a plan.

object
user_id
required

The user.

string
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/
name
required

Their name.

string | null
sort_order
required

The first assignee gets the findings of failed steps

integer format: int32
changed_at
required

The row’s change time.

string
deleted
required
boolean
coverage
required

PlanCoverage: the plan’s elements per coverage state.

object
in_scope
required

Live elements in scope.

integer format: int32
not_scanned
required

No workflow, or one nobody has started.

integer format: int32
in_progress
required

Started, not finished.

integer format: int32
done
required

Completed.

integer format: int32
failed
required

Elements in the failed coverage state.

integer format: int32
assigned_count
required
integer
excluded_count
required
integer
removed_count

Hand-picked elements no longer in the model

integer
precreation

For the admin role: what precreateInspections and removePrecreatedInspections would touch

object
with_workflow
required
integer
removable
required
integer
kept
required
integer
labelled
required
integer
per_call
required

The most inspections one precreateInspections call opens: 1 000, fewer for a template of more than 5 steps

integer

Example

{
"scope": {
"assigned": true,
"excluded": true
},
"status": "draft",
"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 or plan, or a draft plan and the role is not admin

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"
}