Layer features
List Layer Features
Section titled “List Layer Features”Retrieves a paginated list of layer features based on specified filters. Layer features represent structured geographical data (e.g. anomalies, tickets, detections, etc.).
Endpoint: GET /layerFeatures
Authentication: Required (API Key)
Query Parameters
Section titled “Query Parameters”At least one filter (site_id, operation_id, dataset_id, or semantic_type) must be provided.
| Parameter | Type | Required | Description |
|---|---|---|---|
site_id |
(integer|null)[] | No | Filter layer features by one or more site IDs. Supports null to filter for layer features without an associated operation. |
operation_id |
(integer|null)[] | No | Filter layer features by one or more operation IDs. Supports null to filter for layer features without an associated operation. |
dataset_id |
integer[] | No | Filter layer features by one or more dataset IDs. |
semantic_type |
(string|null)[] (enum) | No | Filter layer features by one or more semantic types. See Semantic Types for valid values. Supports null to filter for layer features without an associated operation. |
_page |
integer | Yes | Page number (positive integer) |
_pageSize |
integer | No | Number of items per page (positive integer, max varies by configuration) |
_sortBy |
string | No | Sort order. Format: +field (ascending) or -field (descending); repeat the parameter for tie-breaks (_sortBy=-updated_at&_sortBy=-id). Sortable fields: id, visible_id, description, created_at, updated_at, site, and properties.<key> where <key> is a built-in property key or a custom property definition UUID. Custom-UUID property sorts only resolve when the request is scoped to a single dataset_id; otherwise they fall back to a raw text sort of the stored value (built-in property keys sort correctly regardless). Default: -updated_at then -id |
Response Format
Section titled “Response Format”Returns a paginated response with the following structure:
{ "data": [ { "id": "integer", "visible_id": "string", "properties": {}, "geometry": {}, "dataset_id": "integer", "site_id": "integer", "operation_id": "integer", "company_id": "integer", "semantic_type": "string", "description": "string", "created_at": "timestamp", "updated_at": "timestamp" } ], "pagination": { "page": "integer", "pageSize": "integer", "rowCount": "integer", "pageCount": "integer" }}Response Fields
Section titled “Response Fields”- id: Integer ID of the layer feature. This is the join key used by the
GET /propertyChangesendpoint’slayer_feature_idfilter — unlikevisible_id, it is always present. - visible_id: Human-readable identifier for the layer feature
- properties: Object containing the layer feature properties, keyed by property-definition UUID. Since a dataset can inherit property definitions from a parent dataset, a UUID is not guaranteed to belong to the layer feature’s own
dataset_id— call List Property Definitions withoutdataset_idto resolve UUIDs across all datasets you have access to. - geometry: GeoJSON geometry object
- dataset_id: Integer ID of the associated dataset
- site_id: Integer ID of the associated site
- operation_id: Integer ID of the associated operation
- company_id: Integer ID of the associated company
- semantic_type: Type classification of the layer feature
- description: Text description of the layer feature
- created_at: ISO 8601 timestamp of when the layer feature was created
- updated_at: ISO 8601 timestamp of when the layer feature was last updated
Example Requests
Section titled “Example Requests”Filter by single operation ID:
curl -X GET "https://api.sitemark.com/layerFeatures?operation_id=123&_page=1&_pageSize=50&_sortBy=-updated_at" \ -H "Authorization: ApiKey your-api-key-here"Filter by multiple operation IDs (without brackets):
curl -X GET "https://api.sitemark.com/layerFeatures?operation_id=123&operation_id=456&_page=1&_pageSize=50" \ -H "Authorization: ApiKey your-api-key-here"Filter by multiple operation IDs (with brackets):
curl -X GET "https://api.sitemark.com/layerFeatures?operation_id[]=123&operation_id[]=456&_page=1&_pageSize=50" \ -H "Authorization: ApiKey your-api-key-here"Filter by layer features without an operation:
curl -X GET "https://api.sitemark.com/layerFeatures?operation_id[]&_page=1&_pageSize=50" \ -H "Authorization: ApiKey your-api-key-here"Filter by a specific operation OR layer features without an operation:
curl -X GET "https://api.sitemark.com/layerFeatures?operation_id[]=123&operation_id[]&_page=1&_pageSize=50" \ -H "Authorization: ApiKey your-api-key-here"Filter by single semantic type:
curl -X GET "https://api.sitemark.com/layerFeatures?semantic_type=SOLAR_PANELS&_page=1&_pageSize=50" \ -H "Authorization: ApiKey your-api-key-here"Filter by multiple semantic types (without brackets):
curl -X GET "https://api.sitemark.com/layerFeatures?semantic_type=SOLAR_PANELS&semantic_type=SOLAR_ANOMALIES&_page=1&_pageSize=50" \ -H "Authorization: ApiKey your-api-key-here"Filter by multiple semantic types (with brackets):
curl -X GET "https://api.sitemark.com/layerFeatures?semantic_type[]=SOLAR_PANELS&semantic_type[]=SOLAR_ANOMALIES&_page=1&_pageSize=50" \ -H "Authorization: ApiKey your-api-key-here"Combine multiple filters:
curl -X GET "https://api.sitemark.com/layerFeatures?operation_id=123&semantic_type=ANNOTATIONS&_page=1&_pageSize=50" \ -H "Authorization: ApiKey your-api-key-here"Filter by single site ID:
curl -X GET "https://api.sitemark.com/layerFeatures?site_id=5678&_page=1&_pageSize=50" \ -H "Authorization: ApiKey your-api-key-here"Filter by single dataset ID:
curl -X GET "https://api.sitemark.com/layerFeatures?dataset_id=1234&_page=1&_pageSize=50" \ -H "Authorization: ApiKey your-api-key-here"Example Response
Section titled “Example Response”{ "data": [ { "visible_id": "LF-001", "properties": { "status": "active", "name": "Building A" }, "geometry": { "type": "Point", "coordinates": [102.0, 0.5] }, "dataset_id": 1234, "site_id": 5678, "operation_id": 7890, "company_id": 9012, "semantic_type": "building", "description": "Main office building", "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-20T14:45:00Z" } ], "pagination": { "page": 1, "pageSize": 50, "rowCount": 1, "pageCount": 1 }}Error Responses
Section titled “Error Responses”| Status Code | Description |
|---|---|
| 401 | Unauthorized - Invalid or missing API key |
| 400 | Bad Request - Invalid query parameters or missing required filter |
| 500 | Internal Server Error |
Note: If you don’t provide at least one filter parameter (site_id, operation_id, dataset_id, or semantic_type), you will receive a 400 error.