Create pools
Records the capacity an org has, and answers with the secret a runner daemon presents to enter it.
POST /v1/git/pools
| Address | https://api.hanzo.ai/v1/git/pools |
| Method | POST |
| Operation | post_git_pools |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Records the capacity an org has, and answers with the secret a runner daemon presents to enter it.
Declaring is the ONLY way capacity comes to exist: a daemon cannot register against a pool nobody declared, because the secret it would have to present does not exist until this runs. Re-declaring an existing pool replaces its labels and mints a fresh secret; runners already inside it keep working.
Request
2 fields, body application/json (required).
| Field | In | Type | Required | Description |
|---|---|---|---|---|
labels | body | string[] | — | Labels are what a workflow's runs-on: selects this pool by. |
name | body | string | — | Name is the pool's handle in this org, e.g. |
Response
| Status | Body | Meaning |
|---|---|---|
201 | git.poolDeclared | created |
default | problem-details | refused |
201 body — 6 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
pool | body | git.poolView | — | |
pool.createdAt | body | integer (int64) | — | CreatedAt is when the pool was declared, in unix seconds. |
pool.labels | body | string[] | — | Labels are what a workflow's runs-on: selects this pool by. |
pool.name | body | string | — | Name is the pool's handle in this org. |
pool.runners | body | integer (int64) | — | Runners is how many daemons have entered the pool. |
secret | body | string | — | Secret is what a runner daemon presents to enter the pool. |
Failure carries the platform error shape — see Errors.
Examples
hanzo git pools createimport { Configuration, GitApi } from 'hanzoai';
const api = new GitApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postGitPools({ labels: ["<labels>"], 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_pools(labels=["<labels>"], name="<name>")cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.GitAPI.PostGitPools(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::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_pools(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.GitApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new GitApi(client).postGitPools();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 -X POST https://api.hanzo.ai/v1/git/pools \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"labels": [
"<labels>"
],
"name": "<name>"
}'MCP reaches git through the git tool, which names its 56 operations with its own verbs — this one among them, under a name only MCP 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?