Patrol
Stands watch over an estate: sites, units, tours, keys, cameras, and the incidents that interrupt them.
Also for this capability: API · CLI · SDKs
Stands watch over an estate: sites, units, tours, keys, cameras, and the incidents that interrupt them.
| Base URL | https://api.hanzo.ai |
| Operations | 29 |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Specification
Specification pending — no HIP in hanzoai/hips declares capability: patrol yet. What this capability serves is below, from the API document; what it is — the store it owns, how it meters, what it publishes — is written as a HIP under HIP-0139.
Four surfaces
| Surface | Reaches this capability as | Coverage |
|---|---|---|
| REST | patrol at its own prefix | 29 operations |
| CLI | hanzo patrol … | 29 of 29 |
| SDK | — | no published client declares one yet — regenerating the clients is what adds them |
| MCP | — | no tool names it yet — use HTTP or an SDK |
Quickstart
export HANZO_API_KEY=sk-... # console.hanzo.ai → API keysThen the first call — a read that needs nothing but the key. GET /v1/patrol/key, operation get_patrol_key:
hanzo patrol key listimport { Configuration, PatrolApi } from 'hanzoai';
const api = new PatrolApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getPatrolKey();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_key()cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.PatrolAPI.GetPatrolKey(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_key(&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).getPatrolKey();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/key \
-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.
Answers 200 with object — ok.
Endpoints
| Endpoint | What it does |
|---|---|
POST /v1/patrol/alarm | Takes one activation. |
GET /v1/patrol/camera/{name}/stream/{ticket} | Redeems a minted ticket for what opens the camera. |
GET /v1/patrol/camera/{name}/stream | Mints a short-lived way in to one camera. |
GET /v1/patrol/camera | Lists the cameras a caller may OPEN. |
GET /v1/patrol/event | Lists the feed, newest first. |
POST /v1/patrol/event | Writes one feed row by hand and pushes it to every screen watching. |
GET /v1/patrol/feed | Watch the live feed |
POST /v1/patrol/incident/{name}/step | Performs one act on an incident: it stamps the act's time, moves the state, appends the act to the trail, and runs what the act sets in motion — a… |
GET /v1/patrol/incident/{name} | Returns one response whole: the incident, every act performed on it, and the SLA clocks those acts settled. |
GET /v1/patrol/incident | Lists responses. |
POST /v1/patrol/incident | Records a response by hand, in state received and carrying the site's tier and SLA. |
POST /v1/patrol/key/{name}/move | Records a key set leaving, returning, or being counted, and moves the register row to match. |
GET /v1/patrol/key/{name} | Returns one key set from the register. |
GET /v1/patrol/key | Lists the key register. |
GET /v1/patrol/note | Lists internal remarks. |
POST /v1/patrol/note | Records an internal remark, stamped with who wrote it. |
POST /v1/patrol/point/{name}/confirm | Records presence at a checkpoint: who confirmed it, the method, where they stood, and the photo key if one was taken. |
GET /v1/patrol/report/{name} | Download a filed report |
POST /v1/patrol/report | Composes and files a report from one estate read, so the same figures read the same a month later. |
GET /v1/patrol/site/{name} | Returns one site whole: the register row plus the panel's zones and the standing hazards, which ride inside the document. |
PUT /v1/patrol/site/{name} | Changes a site's contract and brief fields. |
GET /v1/patrol/site | Lists the estate. |
GET /v1/patrol/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… |
GET /v1/patrol/tenant/{org} | Returns one org's public face — brand, company, operations, features and terminology. |
GET /v1/patrol/tour | Lists patrol rounds with their checkpoints — the proof-of-presence record. |
POST /v1/patrol/unit/{name}/fix | Records where a unit is. |
POST /v1/patrol/unit/{name}/state | Moves a unit between states — on shift, on a break, off, or in trouble. |
GET /v1/patrol/unit/near | Answers which units can reach a site soonest. |
GET /v1/patrol/unit | Lists the fleet with each unit's position trail, which is what the map draws. |
How is this guide?