api_get_layerstoken required
Returns user-defined geofence layers, paginated (200 first page, 50 thereafter) and optionally filtered by name.
/api— body field action.name = "api_get_layers"Parameters
| Name | Type | Required | Description |
|---|---|---|---|
layer_name | string | optional | Substring filter against `layer_name`.e.g. LIPU |
last_object_id | number | optional | Pagination cursor — send the `object_id` of the last row you received to fetch the next page. Omit it for the first page (200 rows); later pages return 50.e.g. 200 |
version | string | optional | API version (currently only '1'). Accepted but ignored.e.g. 1 |
client_id | number | optional | Narrow the result to one client within the session's own scope. Cannot widen it.e.g. 14952 |
Notes
Request
curl -X POST 'https://private.develop-1.questar.io/v2/private-questar-units/api' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN' \
--data '{"action":{"name":"api_get_layers","parameters":[{"layer_name":"LIPU","last_object_id":200,"version":"1","client_id":14952}]}}'{
"action": {
"name": "api_get_layers",
"parameters": [
{
"layer_name": "LIPU",
"last_object_id": 200,
"version": "1",
"client_id": 14952
}
]
}
}Response
Successful responses always wrap the action's payload in response.properties. The action_value field reports the handler outcome: "0" for success, "1" for invalid params, "2" for not allowed, "3" for limit-exceeded /pagination-session-expired, "999" for general error.
Authentication is checked before the action runs and fails the same way for every action. A token that is not valid returns HTTP 200 with action_value "2" and description invalid_session; an empty bearer returns "2" with session_token_required. Read the description to tell these apart from an action's own "2". With no Authorization header the gateway answers HTTP 401 {"message":"Unauthorized"}, and with a bearer that is not a token HTTP 403 {"message":"Forbidden"}.
{
"response": {
"properties": {
"action_name": "api_get_layers",
"action_value": "0",
"description": "success",
"data": [
{
"object_id": "1",
"layer_id": "501",
"layer_name": "Depot Geofences",
"count_geometries_in_layer": "12",
"created_date": "2025-09-10T12:00:00",
"created_by": "haim.lati",
"last_updated_date": "2025-12-01T08:00:00",
"color_id": "3",
"icon_id": "17"
}
]
}
}
}