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 URLhttps://api.hanzo.ai
Operations29
AuthAuthorization: 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

SurfaceReaches this capability asCoverage
RESTpatrol at its own prefix29 operations
CLIhanzo patrol …29 of 29
SDKPatrolApi in every published client29 methods
MCPtool patrol on https://api.hanzo.ai/v1/mcp26 operations, 15 under the document's own id — ask describe for the rest

Quickstart

export HANZO_API_KEY=sk-...   # console.hanzo.ai → API keys

Then the first call — a read that needs nothing but the key. GET /v1/patrol/key, operation get_patrol_key:

hanzo patrol key list
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

EndpointWhat it does
POST /v1/patrol/alarmTakes one activation.
GET /v1/patrol/camera/{name}/stream/{ticket}Redeems a minted ticket for what opens the camera.
GET /v1/patrol/camera/{name}/streamMints a short-lived way in to one camera.
GET /v1/patrol/cameraLists the cameras a caller may OPEN.
GET /v1/patrol/eventLists the feed, newest first.
POST /v1/patrol/eventWrites one feed row by hand and pushes it to every screen watching.
GET /v1/patrol/feedWatch the live feed
POST /v1/patrol/incident/{name}/stepPerforms 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/incidentLists responses.
POST /v1/patrol/incidentRecords a response by hand, in state received and carrying the site's tier and SLA.
POST /v1/patrol/key/{name}/moveRecords 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/keyLists the key register.
GET /v1/patrol/noteLists internal remarks.
POST /v1/patrol/noteRecords an internal remark, stamped with who wrote it.
POST /v1/patrol/point/{name}/confirmRecords 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/reportComposes 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/siteLists the estate.
GET /v1/patrol/snapshotReturns 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/tourLists patrol rounds with their checkpoints — the proof-of-presence record.
POST /v1/patrol/unit/{name}/fixRecords where a unit is.
POST /v1/patrol/unit/{name}/stateMoves a unit between states — on shift, on a break, off, or in trouble.
GET /v1/patrol/unit/nearAnswers which units can reach a site soonest.
GET /v1/patrol/unitLists the fleet with each unit's position trail, which is what the map draws.

All Hanzo APIs · Interactive reference

Was this page useful?