Skip to content

Get all deviations of a site

Deviations are as-built versus design: what the drone found on site, compared with what the design says should be there. This is the call that returns them all.

Terminal window
curl -X GET "https://api.sitemark.com/layerFeatures?site_id=<site-id>&semantic_type=DEVIATIONS&_pageSize=1000" \
-H "Authorization: ApiKey <your-api-key>"

That is every deviation on the site, across every flight. Each record keeps its operation_id, so you can group by flight yourself.

Don’t have the site id yet?

Terminal window
curl -X GET "https://api.sitemark.com/sites?_pageSize=100" \
-H "Authorization: ApiKey <your-api-key>"

Returns the sites your API key can read. Take the id of the one you want.

Each layer feature is one deviation:

  • geometry — GeoJSON geometry, where it is on the site
  • properties — the attribute values, keyed by property-definition UUID
  • visible_id — the identifier shown in the Sitemark web app
  • id — the integer id, used as the join key for change history

Large sites are paginated: keep requesting the next _page until you reach pagination.pageCount. See Pagination.

To make properties readable, resolve the UUIDs against List property definitions — see How properties are keyed.

Deviations are produced per capture, so scoping to one flight means finding that operation first:

Terminal window
curl -X GET "https://api.sitemark.com/operations?site_id=<site-id>&status=COMPLETED&_sortBy=-date_captured&_pageSize=100" \
-H "Authorization: ApiKey <your-api-key>"

Only COMPLETED operations have delivered data layers, and _sortBy=-date_captured puts the most recent flight first. Then swap the filter:

Terminal window
curl -X GET "https://api.sitemark.com/layerFeatures?operation_id=<operation-id>&semantic_type=DEVIATIONS&_pageSize=1000" \
-H "Authorization: ApiKey <your-api-key>"

One operation can hold several deviation datasets — for example one per component type. If you need them separately rather than as one list:

Terminal window
curl -X GET "https://api.sitemark.com/datasets?operation_id=<operation-id>&semantic_type=DEVIATIONS&_pageSize=100" \
-H "Authorization: ApiKey <your-api-key>"

Check the names in the response, then query /layerFeatures?dataset_id=<dataset-id>. The layout_definition on a dataset gives the order in which the Sitemark app displays that layer’s properties.

Not sure what a flight produced at all? Drop the semantic_type filter and you get every layer it delivered, each with its own semantic_type.

Solar anomalies, wind anomalies and the rest work identically — only the semantic_type changes. See Semantic types for the full list.

Components such as trenches and panels are site-level, not per flight, so they behave differently: see Read all tickets of a site for that pattern, or Data model for which filter applies to what.