List snapshot
Returns the whole picture in one read: sites, units with their position trails, today's tours and checkpoints, the key register, the recent feed and the…
GET /v1/patrol/snapshot
| Address | https://api.hanzo.ai/v1/patrol/snapshot |
| Method | GET |
| Operation | get_patrol_snapshot |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Returns the whole picture in one read: sites, units with their position trails, today's tours and checkpoints, the key register, the recent feed and the open incident. It replaces the five separate list calls the screen used to make. A client sees only their own sites, and the key register is empty for anyone whose roles do not reach it.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
events | query | integer | — | Events caps how many feed rows ride along. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | patrol.patrolSnapshotOut | ok |
default | problem-details | refused |
200 body — 110 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
data | body | patrol.patrolEstate | — | |
data.events | body | patrol.patrolEvent[] | — | Events is the recent feed, newest first. |
data.events[].at | body | string | — | At is when it was raised. |
data.events[].detail | body | string | — | Detail is the longer account, or empty. |
data.events[].level | body | string | — | Level is red, amber, green or cyan. |
data.events[].name | body | string | — | Name is the event's document name. |
data.events[].site | body | string | — | Site is the site the event is about, or empty. |
data.events[].source | body | string | — | Source is what raised it. |
data.events[].title | body | string | — | Title is the one line the feed shows. |
data.events[].unit | body | string | — | Unit is the unit the event is about, or empty. |
data.incident | body | patrol.patrolIncident | — | |
data.incident.checked | body | string | — | Checked is when the premises had been walked. |
data.incident.clocks | body | patrol.patrolClock[] | — | Clocks is the SLA clocks, present on a single-incident read. |
data.incident.clocks[].elapsed | body | integer (int64) | — | Elapsed is the seconds run so far, or the seconds it took when settled. |
data.incident.clocks[].label | body | string | — | Label names the clock: Verify, Dispatch or On site. |
data.incident.clocks[].settled | body | integer (int64) | — | Settled is the seconds it took, or -1 while the clock is still running. |
data.incident.clocks[].target | body | integer (int64) | — | Target is the contracted seconds. |
data.incident.closed | body | string | — | Closed is when the incident was closed. |
data.incident.dispatched | body | string | — | Dispatched is when a unit was assigned. |
data.incident.enroute | body | string | — | Enroute is when that unit started moving. |
data.incident.escalated | body | string | — | Escalated is when it was escalated, or empty. |
data.incident.false | body | boolean | — | False says the activation turned out to be nothing. |
data.incident.filed | body | string | — | Filed is when the report was written. |
data.incident.name | body | string | — | Name is the incident's document name. |
data.incident.onsite | body | string | — | Onsite is when it arrived. |
data.incident.opened | body | string | — | Opened is when the activation landed. |
data.incident.outcome | body | string | — | Outcome is what it came to. |
data.incident.ref | body | string | — | Ref is the receiving centre's own reference. |
data.incident.secured | body | string | — | Secured is when the site was made safe. |
data.incident.site | body | string | — | Site is where it is happening. |
data.incident.sla | body | integer (int64) | — | SLA is the contracted response time in minutes. |
data.incident.state | body | string | — | State is one of received, verified, dispatched, enroute, onsite, checked, secured, filed and closed. |
data.incident.steps | body | patrol.patrolAct[] | — | Steps is the act trail, present on a single-incident read. |
data.incident.steps[].act | body | string | — | Act is the act performed. |
data.incident.steps[].actor | body | string | — | Actor is who performed it. |
data.incident.steps[].at | body | string | — | At is when it happened. |
data.incident.steps[].detail | body | string | — | Detail is what they wrote with it. |
data.incident.steps[].from | body | string | — | From is the state the incident left. |
data.incident.steps[].to | body | string | — | To is the state it landed in. |
data.incident.tier | body | string | — | Tier is the site's contracted service tier. |
data.incident.trigger | body | string | — | Trigger is what the panel reported. |
data.incident.unit | body | string | — | Unit is the call sign attending, or empty. |
data.incident.verified | body | string | — | Verified is when the activation was confirmed real. |
data.incident.zone | body | string | — | Zone is the panel zone that reported. |
data.keys | body | patrol.patrolKey[] | — | Keys is the key register, empty for a caller whose roles do not reach it. |
data.keys[].holder | body | string | — | Holder is who has it now. |
data.keys[].moved | body | string | — | Moved is when it last changed hands. |
data.keys[].name | body | string | — | Name is the key set's reference, which is its document name. |
data.keys[].site | body | string | — | Site is the site the keys open. |
data.keys[].where | body | string | — | Where is where the set is kept. |
data.sites | body | patrol.patrolSite[] | — | Sites is the estate under contract. |
data.sites[].account | body | string | — | Account is the alarm-panel account number the receiving centre reports. |
data.sites[].cameras | body | integer (int64) | — | Cameras is how many cameras are registered here. |
data.sites[].category | body | string | — | Category is what kind of premises this is. |
data.sites[].client | body | string | — | Client is the customer this site belongs to. |
data.sites[].contact | body | string | — | Contact is the keyholder to reach. |
data.sites[].eircode | body | string | — | Eircode is the postal code. |
data.sites[].hazards | body | string[] | — | Hazards is the standing warnings, present on a single-site read. |
data.sites[].keys | body | boolean | — | Keys says whether the operation holds a key set for this site. |
data.sites[].lat | body | number (double) | — | Lat is the site's latitude in degrees. |
data.sites[].lon | body | number (double) | — | Lon is the site's longitude in degrees. |
data.sites[].name | body | string | — | Name is the site's document name and the segment /v1/patrol/site/{name} addresses it by. |
data.sites[].notes | body | string | — | Notes is the standing brief for the site. |
data.sites[].ref | body | integer (int64) | — | Ref is the site's number in the register. |
data.sites[].risk | body | integer (int64) | — | Risk is the assessed risk score. |
data.sites[].sector | body | string | — | Sector is the patrol sector the site sits in. |
data.sites[].sla | body | integer (int64) | — | SLA is the contracted response time in minutes. |
data.sites[].status | body | string | — | Status is ok, fault, alarm or offline. |
data.sites[].tier | body | string | — | Tier is the contracted service tier. |
data.sites[].town | body | string | — | Town is the town the site is in. |
data.sites[].unit | body | string | — | Unit is the call sign of the unit that covers the site, or empty. |
data.sites[].visits | body | integer (int64) | — | Visits is how many patrol visits the contract calls for. |
data.sites[].zones | body | patrol.patrolZone[] | — | Zones is the panel's detection zones, present on a single-site read. |
data.sites[].zones[].device | body | string | — | Device is the detector type. |
data.sites[].zones[].location | body | string | — | Location is where in the building the zone is. |
data.sites[].zones[].ref | body | string | — | Ref is the zone number the panel reports. |
data.sites[].zones[].state | body | string | — | State is the zone's last known condition. |
data.tours | body | patrol.patrolTour[] | — | Tours is today's rounds with their checkpoints. |
data.tours[].date | body | string | — | Date is the day the round belongs to. |
data.tours[].end | body | string | — | End is when it finished. |
data.tours[].name | body | string | — | Name is the tour's document name. |
data.tours[].points | body | patrol.patrolCheckpoint[] | — | Points is the round's checkpoints in store order. |
data.tours[].points[].actor | body | string | — | Actor is who confirmed it. |
data.tours[].points[].at | body | string | — | At is when it was confirmed, or empty. |
data.tours[].points[].close | body | string | — | Close is when that window shuts. |
data.tours[].points[].lat | body | number (double) | — | Lat is the latitude the confirmation was taken at. |
data.tours[].points[].lon | body | number (double) | — | Lon is the longitude the confirmation was taken at. |
data.tours[].points[].method | body | string | — | Method is how it was confirmed: tag, scan, fence, manual or photo. |
data.tours[].points[].name | body | string | — | Name is the checkpoint's document name and the segment /v1/patrol/point/{name}/confirm addresses it by. |
data.tours[].points[].open | body | string | — | Open is when the window to confirm it opens. |
data.tours[].points[].photo | body | string | — | Photo is the object key of the photo taken, or empty. |
data.tours[].points[].site | body | string | — | Site is the site to attend. |
data.tours[].points[].state | body | string | — | State is pending, done, late or skipped. |
data.tours[].points[].tag | body | string | — | Tag is the tag or marker to read there. |
data.tours[].points[].tour | body | string | — | Tour is the round this checkpoint belongs to. |
data.tours[].start | body | string | — | Start is when the round began. |
data.tours[].unit | body | string | — | Unit is the call sign running the round. |
data.units | body | patrol.patrolUnit[] | — | Units is the fleet, each with the tail of its position trail. |
data.units[].due | body | string | — | Due is the lone-worker deadline, or empty when none is set. |
data.units[].lat | body | number (double) | — | Lat is the unit's last latitude in degrees. |
data.units[].lon | body | number (double) | — | Lon is the unit's last longitude in degrees. |
data.units[].name | body | string | — | Name is the unit's call sign, which is its document name and the segment /v1/patrol/unit/{name}/fix addresses it by. |
data.units[].officer | body | string | — | Officer is who is crewing it. |
data.units[].sector | body | string | — | Sector is the patrol sector it works. |
data.units[].seen | body | string | — | Seen is when the unit last reported. |
data.units[].state | body | string | — | State is available, assigned, enroute, onsite, offline, break or emergency. |
data.units[].trail | body | patrol.patrolFix[] | — | Trail is the tail of the unit's recorded positions, oldest first. |
data.units[].trail[].at | body | string | — | At is when the position was recorded. |
data.units[].trail[].lat | body | number (double) | — | Lat is the latitude in degrees. |
data.units[].trail[].lon | body | number (double) | — | Lon is the longitude in degrees. |
Failure carries the platform error shape — see Errors.
Examples
hanzo patrol snapshotimport { Configuration, PatrolApi } from 'hanzoai';
const api = new PatrolApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getPatrolSnapshot();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import PatrolApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = PatrolApi(client).get_patrol_snapshot()cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.PatrolAPI.GetPatrolSnapshot(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, patrol_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = patrol_api::get_patrol_snapshot(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.PatrolApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new PatrolApi(client).getPatrolSnapshot();The method above is the one at the current release of the document. [email protected] (npm) was generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl https://api.hanzo.ai/v1/patrol/snapshot \
-H "Authorization: Bearer $HANZO_API_KEY"MCP declares no tool for patrol — tools/list on https://api.hanzo.ai/v1/mcp names the products it does reach. Use HTTP or an SDK.
How is this guide?