Hanzo AI
OpenapiPatrol

List near

Answers which units can reach a site soonest.

GET /v1/patrol/unit/near

Addresshttps://api.hanzo.ai/v1/patrol/unit/near
MethodGET
Operationget_patrol_unit_near
AuthAuthorization: Bearer $HANZO_API_KEY

Answers which units can reach a site soonest. Distance is a great-circle haversine over the units' last reported positions, and an available unit sorts ahead of a busy one at any distance — a controller asking for the nearest unit is asking for the nearest free one.

Request

2 fields.

FieldInTypeRequiredDescription
sitequerystringSite is the site to measure from, by document name.
limitqueryintegerLimit caps how many units come back.

Response

StatusBodyMeaning
200patrol.patrolNearListok
defaultproblem-detailsrefused

200 body — 4 fields.

FieldInTypeAlwaysDescription
databodypatrol.patrolNearest[]Data is the closest units, available ones first and then by distance.
data[].etabodyinteger (int64)Eta is the minutes the drive would take at the planning speed.
data[].kmbodynumber (double)Km is the great-circle distance to the site in kilometres.
data[].unitbodystringUnit is the unit's call sign.

Failure carries the platform error shape — see Errors.

Examples

hanzo patrol unit near

Patrol API · All Hanzo APIs · Interactive reference

How is this guide?

On this page