List objects
Returns every object under a deployment's prefix as the object store itself records it: each key relative to the prefix, its size in bytes and its ETag.
GET /v1/project/{slug}/deployments/{id}/objects
| Address | https://api.hanzo.ai/v1/project/{slug}/deployments/{id}/objects |
| Method | GET |
| Operation | get_project_by_slug_deployments_by_id_objects |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Returns every object under a deployment's prefix as the object store itself records it: each key relative to the prefix, its size in bytes and its ETag.
It is what lets a publisher upload only what changed. The publisher diffs its export against this listing — the store's own record, never a manifest kept from an earlier run — and uploads the files that differ or are absent; an object written in one part carries the MD5 of its bytes as its ETag, so a local digest is the whole comparison. A file the diff wrongly skips is still caught: the completion refuses a release while any key of its manifest is absent.
The listing is whole or refused. A store that is unconfigured or fails while listing answers 503 naming the cause, never a partial list.
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.
| 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 | project.projectsObjects | ok |
default | problem-details | refused |
200 body — 4 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
objects | body | project.projectsObject[] | — | Objects is every object under the prefix in the store's key order: empty, never absent, when the prefix holds nothing. |
objects[].etag | body | string | — | ETag is the store's content identity with its quotes removed. |
objects[].key | body | string | — | Key is the object's path RELATIVE to the deployment prefix — the form an upload names it by and a completion's keys lists it in. |
objects[].size | body | integer (int64) | — | Size is the object's length in bytes. |
Failure carries the platform error shape — see Errors.
Examples
hanzo project deployments objects <slug> <id>import { Configuration, ProjectApi } from 'hanzoai';
const api = new ProjectApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getProjectBySlugDeploymentsByIdObjects({ 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_objects(slug='slug', id='id')cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.ProjectAPI.GetProjectBySlugDeploymentsByIdObjects(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_objects(&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).getProjectBySlugDeploymentsByIdObjects();The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were 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 https://api.hanzo.ai/v1/project/<slug>/deployments/<id>/objects \
-H "Authorization: Bearer $HANZO_API_KEY"MCP reaches project through the project tool, which names its 27 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"
}
}
}'