Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions pages/platform/images.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,70 @@ kraft cloud instance create \
You now have a new instance created from the existing image.


## REST API reference

### List images

```
GET /v1/images
```

Returns all images accessible for your account and known by the platform.
Each image object includes:

| Field | Type | Description |
|-------|------|-------------|
| `uuid` | string | Image UUID. |
| `created_at` | timestamp | Creation time. |
| `owner` | string | Owner of the image (omitted if not root account). |
| `url` | string | Full image address (includes digest). |
| `tags` | array of strings | List of shortened tags. |
| `initrd_or_rom` | bool | Whether the image includes an initrd or ROM component. |
| `size_in_bytes` | int64 | Total image size in bytes. |
| `args` | array of strings | Default arguments (omitted if none). |
| `env` | map of strings | Default environmental variables (omitted if none). |
| `users` | array of strings | Users with access to the image (omitted if not root account). |

### Look up by UUID

```
GET /v1/images?uuid=<uuid>[,<uuid>…]
```

Returns one or more images by UUID.

### Look up by digest

```
GET /v1/images
```

Pass a `digest` string in the request body to return the image matching that digest:

```json title="GET /v1/images"
{
"digest": "user/image@sha256:278cb8b14f9faf9c2702dddd8bfb6124912d82c11b4a2c6590b6e32fc4049472"
}
```

The response includes `url`, `tags`, `initrd_or_rom`, `size_in_bytes`, args` and `env`.

### Look up by tag

```
GET /v1/images
```

Pass a `tag` string in the request body to return the image matching that tag:

```json title="GET /v1/images"
{
"tag": "user/image:tag"
}
```

The response includes `url`, `tags`, `initrd_or_rom`, `size_in_bytes`, args` and `env`.

## Learn more

* The `kraft cloud` [CLI reference](/cli/)
Expand Down
Loading