Read one repository over the ZAP transport
Answers a single repository's record, named by `name`.
POST /v1/git/zap/getRepo
| Address | https://api.hanzo.ai/v1/git/zap/getRepo |
| Method | POST |
| Operation | post_git_zap_getrepo |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Answers a single repository's record, named by name. A repository outside the caller's org and project scope is a 404 envelope, the same answer one that does not exist gets.
A ZAP PROCEDURE, not a REST resource. It answers the bridge's {status, msg, data} envelope rather than the raw view the /v1 route returns — which is a wire shape a typed op cannot produce, and the reason this stays a raw handler — and it calls the SAME core function the REST route calls, so the two transports cannot diverge in behaviour. Org and project scope come from the request identity and NEVER from the body: the body cannot widen the caller's scope. Without a validated org the answer is a 403 envelope.
Request
3 fields, body application/json.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
description | body | string | — | |
name | body | string | — | |
project | body | string | — |
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 git zap getRepoimport { Configuration, GitApi } from 'hanzoai';
const api = new GitApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postGitZapGetrepo({ description: "<description>", name: "<name>" });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import GitApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = GitApi(client).post_git_zap_getrepo(description="<description>", name="<name>")cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.GitAPI.PostGitZapGetrepo(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, git_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = git_api::post_git_zap_getrepo(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.GitApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new GitApi(client).postGitZapGetrepo();curl -X POST https://api.hanzo.ai/v1/git/zap/getRepo \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "<description>",
"name": "<name>"
}'The door reaches git through the git tool, which names its 56 operations with its own verbs — this one among them, under a name only the door declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "get_git"
}
}
}'How is this guide?