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.
The call
Section titled “The call”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?
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.
What you get back
Section titled “What you get back”Each layer feature is one deviation:
geometry— GeoJSON geometry, where it is on the siteproperties— the attribute values, keyed by property-definition UUIDvisible_id— the identifier shown in the Sitemark web appid— 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.
Just the latest flight
Section titled “Just the latest flight”Deviations are produced per capture, so scoping to one flight means finding that operation first:
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:
curl -X GET "https://api.sitemark.com/layerFeatures?operation_id=<operation-id>&semantic_type=DEVIATIONS&_pageSize=1000" \ -H "Authorization: ApiKey <your-api-key>"Working per dataset instead
Section titled “Working per dataset instead”One operation can hold several deviation datasets — for example one per component type. If you need them separately rather than as one list:
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.
Other detection layers
Section titled “Other detection layers”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.