Get deployments — GET /v1/project/{slug}/deployments/{id}

Returns one deployment of a project by id.

GET /v1/project/{slug}/deployments/{id}

Addresshttps://api.hanzo.ai/v1/project/{slug}/deployments/{id}
MethodGET
Operationget_project_by_slug_deployments_by_id
AuthAuthorization: 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 (401 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.

FieldInTypeRequiredDescription
slugpathstringyesSlug is the project the deployment belongs to, from the path.
idpathstringyesID is the deployment id, from the path.

Response

StatusBodyMeaning
200project.projectsDeploymentok
defaultproblem-detailsrefused

200 body — 22 fields.

FieldInTypeAlwaysDescription
bucketbodystring—Bucket is the object-store bucket its files were written to.
bytesbodyinteger (int64)—Bytes is their total size in bytes.
commitbodystring—Commit is the revision that was built, for a deployment that came from a repository.
createdAtbodyinteger (int64)—CreatedAt is when the deployment was queued, as Unix seconds.
filesbodyinteger (int64)—Files is how many objects the deployment published.
idbodystring—ID identifies this one deployment attempt, and is what CI quotes back to complete it.
liveUrlbodystring—LiveURL is where this deployment serves, once it is live.
messagebodystring—Message is what happened, in words — the build's own note, or on a failure why it failed.
prefixbodystring—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 cannot write over another.
projectIdbodystring—ProjectID is the project this deployment belongs to.
sourcebodystring—Source is what caused the deployment — a git push, an uploaded artifact, a generated site.
statusbodystring—Status is where the attempt got to — queued, live, or failed.
updatedAtbodyinteger (int64)—UpdatedAt is when it last changed state, as Unix seconds — so the gap between the two is how long the build took.
uploadbodyproject.projectsUploadGrant—
upload.copybodyboolean—Copy is true when the completion of this deployment accepts copyFrom and copy.
upload.expiresAtbodyinteger (int64)—ExpiresAt is when the grant stops being accepted, as Unix seconds.
upload.fieldsbodyobject—Fields are form values every POST must carry VERBATIM, alongside key and file.
upload.fields.*bodystring—
upload.maxBytesbodyinteger (int64)—MaxBytes bounds ONE object, not the upload as a whole.
upload.prefixbodystring—Prefix is the only place this grant can write: the deployment's own key prefix.
upload.urlbodystring—URL is the address to POST each object to.
versionbodyinteger (int64)—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 project deployments get <slug> <id>
import { Configuration, ProjectApi } from 'hanzoai';

const api = new ProjectApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getProjectBySlugDeploymentsById({ slug: 'slug', id: 'id' });
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ProjectApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ProjectApi(client).get_project_by_slug_deployments_by_id(slug='slug', id='id')
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.ProjectAPI.GetProjectBySlugDeploymentsById(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, project_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = project_api::get_project_by_slug_deployments_by_id(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ProjectApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new ProjectApi(client).getProjectBySlugDeploymentsById();
curl https://api.hanzo.ai/v1/project/<slug>/deployments/<id> \
  -H "Authorization: Bearer $HANZO_API_KEY"

Tool project, op get_project_by_slug_deployments_by_id — 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": "project",
         "arguments": {
           "op": "get_project_by_slug_deployments_by_id",
           "input": {
             "slug": "<slug>",
             "id": "<id>"
           }
         }
       }
     }'

Project API · All Hanzo APIs · Interactive reference

Was this page useful?