Returns one deployment of a project by id.
Returns one deployment of a project by id.
GET /v1/projects/{slug}/deployments/{id}
| Address | https://api.hanzo.ai/v1/projects/{slug}/deployments/{id} |
| Method | GET |
| Operation | get_projects_by_slug_deployments_by_id |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Returns one deployment of a project by id.
It is how a console follows a build: the status (queued, uploading,
live, error), the message a failure left, and the URL and prefix it went
live at. Like the history, it never replays the upload grant.
Scope: a validated principal is required (403 without one). Both the project and the deployment are resolved within that principal's org, so a deployment of another project — or of another tenant — is a 404.
Request
2 fields.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
slug | path | string | yes | Slug is the project the deployment belongs to, from the path. |
id | path | string | yes | ID is the deployment id, from the path. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | projectsDeployment | ok |
200 body — 21 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
bucket | body | string | — | Bucket is the object-store bucket its files were written to. |
bytes | body | integer | — | Bytes is their total size in bytes. |
commit | body | string | — | Commit is the revision that was built, for a deployment that came from a repository. |
createdAt | body | integer | — | CreatedAt is when the deployment was queued, as Unix seconds. |
files | body | integer | — | Files is how many objects the deployment published. |
id | body | string | — | ID identifies this one deployment attempt, and is what CI quotes back to complete it. |
liveUrl | body | string | — | LiveURL is where this deployment serves, once it is live. |
message | body | string | — | Message is what happened, in words — the build's own note, or on a failure why it failed. |
prefix | body | string | — | Prefix is the key prefix within that bucket holding EXACTLY this deployment's objects — the unit an upload grant is scoped to, so a grant for one deployment… |
projectId | body | string | — | ProjectID is the project this deployment belongs to. |
source | body | string | — | Source is what caused the deployment — a git push, an uploaded artifact, a generated site. |
status | body | string | — | Status is where the attempt got to — queued, live, or failed. |
updatedAt | body | integer | — | UpdatedAt is when it last changed state, as Unix seconds — so the gap between the two is how long the build took. |
upload | body | projectsUploadGrant | — | |
upload.expiresAt | body | integer | — | ExpiresAt is when the grant stops being accepted, as Unix seconds. |
upload.fields | body | object | — | Fields are form values every POST must carry VERBATIM, alongside key and file. |
upload.fields.* | body | string | — | |
upload.maxBytes | body | integer | — | MaxBytes bounds ONE object, not the upload as a whole. |
upload.prefix | body | string | — | Prefix is the only place this grant can write: the deployment's own key prefix. |
upload.url | body | string | — | URL is the address to POST each object to. |
version | body | integer | — | Version counts deployments of this project from 1, so the history reads as an ordered sequence rather than by timestamp. |
Failure carries the platform error shape — see Errors.
Examples
hanzo projects deployments get <slug> <id>import { Configuration, ProjectsApi } from 'hanzoai';
const api = new ProjectsApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getProjectsBySlugDeploymentsById({ slug: 'slug', id: 'id' });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ProjectsApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ProjectsApi(client).get_projects_by_slug_deployments_by_id(slug='slug', id='id')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.ProjectsAPI.GetProjectsBySlugDeploymentsById(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, projects_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = projects_api::get_projects_by_slug_deployments_by_id(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ProjectsApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new ProjectsApi(client).getProjectsBySlugDeploymentsById();curl https://api.hanzo.ai/v1/projects/<slug>/deployments/<id> \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches projects through the projects tool, which names its 48 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": "list_projects"
}
}
}'How is this guide?