Skip to content
Suomi

The elements a plan covers today, by coverage state

GET
/v1/projects/{projectId}/inspection-plans/{planId}/scope
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/scope?limit=10000' \
--header 'Authorization: Bearer <token>'

GlobalIds per state in GlobalId order, a page at a time; pass next_after as after until it is null. The scope is resolved when asked, so it has no window.

projectId
required
string format: uuid
planId
required
string format: uuid
after
string
>= 1 characters <= 64 characters

Next_after of the previous page

limit
integer
default: 10000 >= 1 <= 10000

One page

Media typeapplication/json

InspectionPlanElementStates: one page of the scope’s GlobalIds per coverage state.

object
not_scanned
required

No workflow, or one nobody has started.

Array<string>
in_progress
required

Started, not finished.

Array<string>
done
required

Completed.

Array<string>
failed
required

Global ids in the failed coverage state.

Array<string>
next_after
required

The after of the next page; null on the last page.

string | null

Example generated

{
"not_scanned": [
"example"
],
"in_progress": [
"example"
],
"done": [
"example"
],
"failed": [
"example"
],
"next_after": "example"
}

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