Get report
Renders a filed report as a PDF and answers with the bytes under an attachment filename.
GET /v1/patrol/report/{name}
| Address | https://api.hanzo.ai/v1/patrol/report/{name} |
| Method | GET |
| Operation | get_patrol_report_by_name |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Renders a filed report as a PDF and answers with the bytes under an attachment filename. ?format=text answers the stored text verbatim under text/plain, which is what a copy button reads.
Everyone but the customer may read every report; a client reads only a report about a site of their own, and anything else is 404 rather than a refusal, so the route is no existence oracle. A report whose text cannot be set answers that text rather than failing, because the account is the thing being asked for.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | yes |
Response
The document declares no response body for this operation. It answers 200 on success and the platform error shape on failure — see Errors.
Examples
hanzo patrol report get <name>import { Configuration, PatrolApi } from 'hanzoai';
const api = new PatrolApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getPatrolReportByName({ name: 'name' });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_report_by_name(name='name')cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.PatrolAPI.GetPatrolReportByName(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_report_by_name(&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).getPatrolReportByName();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/report/<name> \
-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?