List releases
Returns a site's releases newest-first, marking the active one — the rollback menu.
GET /v1/projects/{slug}/releases
| Address | https://api.hanzo.ai/v1/projects/{slug}/releases |
| Method | GET |
| Operation | get_projects_by_slug_releases |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Returns a site's releases newest-first, marking the active one — the rollback menu.
Each row carries the release id to activate, the source it was promoted from, its object and byte counts, and the URL if it is the one serving. Retention bounds the list, so it is the set that can actually still be rolled back to, not a full history.
Scope: a validated principal is required (403 without one) and the site is resolved within that principal's org, so another tenant's slug is a 404.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
slug | path | string | yes | Slug is the project to act on, from the path. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | projectsRelease[] | ok |
200 body — 8 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
[].active | body | boolean | — | Active is whether this is the release the site is SERVING right now. |
[].bytes | body | integer | — | Bytes is their total size in bytes. |
[].createdAt | body | integer | — | CreatedAt is when the release was cut, as Unix seconds — not when it was last activated. |
[].objects | body | integer | — | Objects is how many files the release holds. |
[].releaseId | body | string | — | ReleaseID is derived from a DIGEST of the release's own manifest, so identical content is the same release and a release can never be confused with another… |
[].slug | body | string | — | Slug is the site this release belongs to. |
[].source | body | string | — | Source is what the release was cut from — the build output or upload it was promoted out of. |
[].url | body | string | — | URL is where the site serves. |
Failure carries the platform error shape — see Errors.
Examples
hanzo projects releases list <slug>import { Configuration, ProjectsApi } from 'hanzoai';
const api = new ProjectsApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getProjectsBySlugReleases({ slug: 'slug' });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_releases(slug='slug')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.ProjectsAPI.GetProjectsBySlugReleases(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_releases(&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).getProjectsBySlugReleases();curl https://api.hanzo.ai/v1/projects/<slug>/releases \
-H "Authorization: Bearer $HANZO_API_KEY"MCP reaches projects through the projects tool, which names its 48 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": "list_projects"
}
}
}'How is this guide?