# List objects

URL: https://docs.hanzo.ai/docs/openapi/project/get-project-by-slug-deployments-by-id-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`

> [Project →](https://docs.hanzo.ai/docs/openapi/project) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                                                   |
| ------------- | ----------------------------------------------------------------- |
| **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](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo project deployments objects <slug> <id>
```

**SDK**

**.ts**

```ts
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' });
```

**.py**

```python
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')
```

**.go**

```go
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
}
```

**.rs**

```rust
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?;
```

**.java**

```java
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. `hanzoai@8.5.914` (npm) and `hanzoai@8.5.914` (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 →](https://docs.hanzo.ai/docs/sdks)

**HTTP**

```bash
curl https://api.hanzo.ai/v1/project/<slug>/deployments/<id>/objects \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

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:

```bash
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"
         }
       }
     }'
```

---

[Project API](https://docs.hanzo.ai/docs/openapi/project) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
