Patrol
Stands watch over an estate: sites, units, tours, keys, cameras, and the incidents that interrupt them.
Also for this capability: API · CLI · MCP · 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 | PatrolApi in every published client | 29 methods |
| MCP | tool patrol on https://api.hanzo.ai/v1/mcp | 26 operations, 15 under the document's own id — ask describe for the rest |
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:
CLI
SDK
HTTP
MCP
hanzo patrol key list.ts
.py
.go
.rs
.java
import { 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();curl https://api.hanzo.ai/v1/patrol/key \
-H "Authorization: Bearer $HANZO_API_KEY"Tool patrol, op get_patrol_key — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "patrol",
"arguments": {
"op": "get_patrol_key",
"input": {}
}
}
}'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 unit assigned, a site secured, a report filed, a controller told. |
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 the open incident. |
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. |
Was this page useful?