Hanzo AI
OpenapiPatrol

List unit

Lists the fleet with each unit's position trail, which is what the map draws.

GET /v1/patrol/unit

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

Lists the fleet with each unit's position trail, which is what the map draws. It is the operation's own: a unit names no site, so a customer reads none of it — the officer crewing one is the company's staff, and the trail is where that person has been all shift.

Request

GET /v1/patrol/unit takes no parameters and no body — the credential is the whole request.

Response

StatusBodyMeaning
200patrol.patrolUnitListok
defaultproblem-detailsrefused

200 body — 13 fields.

FieldInTypeAlwaysDescription
databodypatrol.patrolUnit[]Data is every unit in the org, each with its position trail.
data[].duebodystringDue is the lone-worker deadline, or empty when none is set.
data[].latbodynumber (double)Lat is the unit's last latitude in degrees.
data[].lonbodynumber (double)Lon is the unit's last longitude in degrees.
data[].namebodystringName is the unit's call sign, which is its document name and the segment /v1/patrol/unit/{name}/fix addresses it by.
data[].officerbodystringOfficer is who is crewing it.
data[].sectorbodystringSector is the patrol sector it works.
data[].seenbodystringSeen is when the unit last reported.
data[].statebodystringState is available, assigned, enroute, onsite, offline, break or emergency.
data[].trailbodypatrol.patrolFix[]Trail is the tail of the unit's recorded positions, oldest first.
data[].trail[].atbodystringAt is when the position was recorded.
data[].trail[].latbodynumber (double)Lat is the latitude in degrees.
data[].trail[].lonbodynumber (double)Lon is the longitude in degrees.

Failure carries the platform error shape — see Errors.

Examples

hanzo patrol unit list

Patrol API · All Hanzo APIs · Interactive reference

How is this guide?

On this page