# ImageService

> The ImageService methods and their request and response messages.

Source: https://engramsfactory.com/docs/api/image/

Generated from [`image.proto`](https://github.com/cortexapps/engrams/blob/main/crates/engram-protocol/proto/engram/app/v1/image.proto). Every method is
`POST /rpc/engram.app.v1.ImageService/<Method>` with a JSON or protobuf body and an
`x-api-key` header.

## Methods

| Method | Request | Response |
|---|---|---|
| `ListEnabledImages` | [`ListEnabledImagesRequest`](#listenabledimagesrequest) | [`ListEnabledImagesResponse`](#listenabledimagesresponse) |
| `EnableImage` | [`EnableImageRequest`](#enableimagerequest) | [`EnableImageResponse`](#enableimageresponse) |
| `UpdateImage` | [`UpdateImageRequest`](#updateimagerequest) | [`UpdateImageResponse`](#updateimageresponse) |
| `DisableImage` | [`DisableImageRequest`](#disableimagerequest) | [`DisableImageResponse`](#disableimageresponse) |
| `RefreshImage` | [`RefreshImageRequest`](#refreshimagerequest) | [`RefreshImageResponse`](#refreshimageresponse) |
| `ListEnableJobs` | [`ListEnableJobsRequest`](#listenablejobsrequest) | [`ListEnableJobsResponse`](#listenablejobsresponse) |
| `GetEnableJob` | [`GetEnableJobRequest`](#getenablejobrequest) | [`GetEnableJobResponse`](#getenablejobresponse) |
| `RetryEnableJob` | [`RetryEnableJobRequest`](#retryenablejobrequest) | [`RetryEnableJobResponse`](#retryenablejobresponse) |
| `ListRegistries` | [`ListRegistriesRequest`](#listregistriesrequest) | [`ListRegistriesResponse`](#listregistriesresponse) |
| `AddRegistry` | [`AddRegistryRequest`](#addregistryrequest) | [`AddRegistryResponse`](#addregistryresponse) |
| `DeleteRegistry` | [`DeleteRegistryRequest`](#deleteregistryrequest) | [`DeleteRegistryResponse`](#deleteregistryresponse) |

## Messages

### AddRegistryRequest

| Field | Type |
|---|---|
| `host` | `string` |
| `static` | [`StaticRegistryAuth`](#staticregistryauth) (one of auth) |
| `gcp_workload_identity` | [`GcpWorkloadIdentityRegistryAuth`](#gcpworkloadidentityregistryauth) (one of auth) |
| `anonymous` | [`AnonymousRegistryAuth`](#anonymousregistryauth) (one of auth) |
| `aws_ecr` | [`AwsEcrRegistryAuth`](#awsecrregistryauth) (one of auth) |

### AddRegistryResponse

| Field | Type |
|---|---|
| `id` | `string` |
| `host` | `string` |
| `auth_kind` | `string` |
| `auth_principal` | `string` (optional) |

### AnonymousRegistryAuth

No fields.

### AwsEcrRegistryAuth

| Field | Type |
|---|---|
| `assume_role_arn` | `string` (optional) |

### CaptureEnvEntry

| Field | Type |
|---|---|
| `name` | `string` |
| `literal` | `string` (one of value) |
| `secret_ref` | `string` (one of value) |

### DeleteRegistryRequest

| Field | Type |
|---|---|
| `host` | `string` |

### DeleteRegistryResponse

No fields.

### DisableImageRequest

| Field | Type |
|---|---|
| `image_uri` | `string` |

### DisableImageResponse

No fields.

### EnabledImageSummary

| Field | Type |
|---|---|
| `id` | `string` |
| `image_uri` | `string` |
| `manifest_digest` | `string` |
| `last_refreshed_at` | `string` |
| `created_at` | `string` |
| `config` | [`ImageConfig`](#imageconfig) |

### EnableImageRequest

| Field | Type |
|---|---|
| `image_uri` | `string` |
| `config` | [`ImageConfig`](#imageconfig) (optional) |

### EnableImageResponse

| Field | Type |
|---|---|
| `job` | [`EnableJob`](#enablejob) |

### EnableJob

| Field | Type |
|---|---|
| `id` | `string` |
| `image_uri` | `string` |
| `manifest_digest` | `string` (optional) |
| `state` | `string` |
| `chunks_total` | `uint32` (optional) |
| `chunks_done` | `uint32` |
| `attempts` | `uint32` |
| `error` | `string` (optional) |
| `created_at` | `string` |
| `updated_at` | `string` |
| `capture_phase` | `string` (optional) |
| `warm_stage` | `string` (optional) |
| `warm_stage_started_at` | `string` (optional) |
| `output_tail` | `string` (optional) |
| `prestage_hosts` | `string` |
| `warm_stages` | `string` |
| `materialize_stages` | `string` |
| `materialize_host_id` | `string` (optional) |

### GcpWorkloadIdentityRegistryAuth

| Field | Type |
|---|---|
| `impersonate_sa` | `string` (optional) |

### GetEnableJobRequest

| Field | Type |
|---|---|
| `job_id` | `string` |

### GetEnableJobResponse

| Field | Type |
|---|---|
| `job` | [`EnableJob`](#enablejob) |

### ImageConfig

| Field | Type |
|---|---|
| `name` | `string` |
| `description` | `string` (optional) |
| `env` | `map<string, string>` |
| `workdir` | `string` (optional) |
| `resources` | [`ImageResources`](#imageresources) |
| `warm` | [`ImageWarmConfig`](#imagewarmconfig) (optional) |

### ImageResources

| Field | Type |
|---|---|
| `suggested_memory_mib` | `uint32` (optional) |
| `suggested_vcpus` | `uint32` (optional) |
| `suggested_disk_gib` | `uint32` (optional) |
| `suggested_swap_mib` | `uint32` (optional) |

### ImageWarmConfig

| Field | Type |
|---|---|
| `command` | repeated `string` |
| `timeout_secs` | `uint64` (optional) |
| `workdir` | `string` (optional) |
| `env` | repeated [`CaptureEnvEntry`](#captureenventry) |
| `network` | `ProfileNetwork` (optional) |

### ListEnabledImagesRequest

No fields.

### ListEnabledImagesResponse

| Field | Type |
|---|---|
| `images` | repeated [`EnabledImageSummary`](#enabledimagesummary) |

### ListEnableJobsRequest

No fields.

### ListEnableJobsResponse

| Field | Type |
|---|---|
| `jobs` | repeated [`EnableJob`](#enablejob) |

### ListRegistriesRequest

No fields.

### ListRegistriesResponse

| Field | Type |
|---|---|
| `registries` | repeated [`RegistryCredentialSummary`](#registrycredentialsummary) |

### RefreshImageRequest

| Field | Type |
|---|---|
| `image_uri` | `string` |
| `force_recapture` | `bool` |

### RefreshImageResponse

| Field | Type |
|---|---|
| `job` | [`EnableJob`](#enablejob) |

### RegistryCredentialSummary

| Field | Type |
|---|---|
| `id` | `string` |
| `registry_host` | `string` |
| `auth_kind` | `string` |
| `auth_principal` | `string` (optional) |
| `created_at` | `string` |
| `updated_at` | `string` (optional) |

### RetryEnableJobRequest

| Field | Type |
|---|---|
| `job_id` | `string` |

### RetryEnableJobResponse

| Field | Type |
|---|---|
| `job` | [`EnableJob`](#enablejob) |

### StaticRegistryAuth

| Field | Type |
|---|---|
| `username` | `string` |
| `password` | `string` |

### UpdateImageRequest

| Field | Type |
|---|---|
| `image_uri` | `string` |
| `config` | [`ImageConfig`](#imageconfig) |
| `allow_recapture` | `bool` |

### UpdateImageResponse

| Field | Type |
|---|---|
| `job` | [`EnableJob`](#enablejob) (optional) |
