Skip to content
Suomi

Failed checks, findings, returns and late installs of a date range, grouped or listed

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

Totals of the range and one page of groups, or with by=deviation one page of the deviations themselves; only next_cursor = null ends the pages. A snapshot read when asked, not a windowed list: it has no changed_at and no deletions; read it again for the current state.

projectId
required
string format: uuid
from
string

First day, YYYY-MM-DD in Finnish time; 29 days before to by default

to
string

Last day, YYYY-MM-DD in Finnish time; today by default

by

Group by zone, organisation or element, or list each deviation

string
default: zone
Allowed values: zone organisation element deviation
cursor
string
>= 1 characters <= 512 characters

The next_cursor of the previous page

One page of the report

Media typeapplication/json

DeviationReportPage: the range’s totals and one page of groups or deviations.

object
from
required
string
to
required
string
by
required

What a deviation report groups by.

string
Allowed values: zone organisation element deviation
totals
required

The five counts of a report or group.

object
total
required

Every deviation.

integer format: int32
failed_check
required

Failed checks.

integer format: int32
finding
required

Findings.

integer format: int32
returned
required

Zones returned.

integer format: int32
late_install
required

Late installs.

integer format: int32
groups

With by zone, organisation or element

Array<object>

One group of a report page.

object
key
required

The zone id, organisation id or GlobalId; null for deviations with none

string | null
label
required
string | null
zone_label
string | null
total
required
integer format: int32
failed_check
required
integer format: int32
finding
required
integer format: int32
returned
required
integer format: int32
late_install
required
integer format: int32
rows

With by deviation

Array<object>

One deviation.

object
kind
required

What kind of deviation a row is; new kinds may come.

string
Allowed values: failed_check finding returned late_install
occurred_at
required
string
zone_id
required
string | null
zone_label
required
string | null
account_id
required
string | null
organisation
required

The organisation responsible for the work

string | null
global_id
required
string | null
element_name
required
string | null
work_name
required
string | null
detail
required
string | null
finding_id
required
string | null
delay_days
required
integer | null format: int32
next_cursor
required
string | null

Example

{
"by": "zone",
"rows": [
{
"kind": "failed_check"
}
]
}

VALIDATION_ERROR for a malformed id or parameter

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 is not the integration’s; FEATURE_OFF when the project’s organisation does not use the takt board (zones, handoffs, deviations) or the schedule (schedule tasks, element facts); PUBLIC_API_DISABLED when it 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"
}

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