Geo/api_get_geometry

api_get_geometrytoken required

Returns geofence geometries (Circle/Polyline/Polygon) with optional filters and pagination.

POST/api— body field action.name = "api_get_geometry"

Parameters

NameTypeRequiredDescription
layer_idnumberoptionalPositive integer layer id filter. Invalid values return action_value '999'.e.g. 59325
layer_namestringoptionalSubstring filter against `layer_name`.e.g. ESTACIONES
geometry_namestringoptionalSubstring filter against `geometry_name`.e.g. ESTACION
geometry_typestringoptionalComma-separated list of geometry type codes (1=Circle, 2=Polyline, 3=Polygon).e.g. 1,3
last_object_idnumberoptionalPagination 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
versionstringoptionalAPI version (currently only '1'). Accepted but ignored.e.g. 1
page_sizenumberoptionalRows per page. Defaults to 200 on the first request and 50 on each request after it.e.g. 200

Notes

First page is 200 rows; later pages 50. The response's `pagination.has_more` tells you whether another page exists — iterate on that rather than on the row count, because a full page is not by itself proof that more rows follow. `page_size` may only make a page smaller — it is capped against the 200/50 size already in effect and can never widen one. `radius` is only populated when geometry_type=1 (Circle). Empty first page returns action_value '2' ('no_geometries').

Request

curl
curl -X POST 'https://private.stage.questar.io/v2/private-questar-units/api' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  --data '{"action":{"name":"api_get_geometry","parameters":[{"layer_id":59325,"layer_name":"ESTACIONES","geometry_name":"ESTACION","geometry_type":"1,3","last_object_id":200,"version":"1","page_size":200}]}}'
Body
{
  "action": {
    "name": "api_get_geometry",
    "parameters": [
      {
        "layer_id": 59325,
        "layer_name": "ESTACIONES",
        "geometry_name": "ESTACION",
        "geometry_type": "1,3",
        "last_object_id": 200,
        "version": "1",
        "page_size": 200
      }
    ]
  }
}

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.

200 OK
{
  "response": {
    "properties": {
      "action_name": "api_get_geometry",
      "action_value": "0",
      "description": "success",
      "data": [
        {
          "object_id": "1",
          "layer_id": "501",
          "layer_name": "Depot%20Geofences",
          "geometry_id": "9001",
          "geometry_name": "Tel%20Aviv%20Warehouse",
          "geometry_type": "1",
          "geometry_type_description": "Circle",
          "geometry_coordinates": "32.0853,34.7818",
          "radius": "150.0000000",
          "image": "",
          "created_date": "2025-09-10T12:00:00",
          "created_by": "haim.lati",
          "comments": "Gate%20B%20entrance"
        }
      ]
    }
  }
}