---
title: "List the deployments."
method: GET
path: "/users/{login_name}/clusters/{cluster_id}/deployments"
tags: ["deployment"]
---

# List the deployments.

`GET /users/{login_name}/clusters/{cluster_id}/deployments`

List the deployments.

## Path parameters

- `login_name` string, required
- `cluster_id` string, required

## Response `200`

OK

- DeploymentListResponse
  - `deployments` Deployment[]
    - `spec` DeploymentSpec
      - `cluster` string
      - `command` string — Command is the command to run.
      - `deployment_resource` DeploymentResource
        - `cpu` string
        - `gpu` string
        - `memory` string
      - `deployment_source` DeploymentSource
        - `docker` DeploymentDockerSource
          - `image` string
        - `git` DeploymentGitSource
          - `branch` string
          - `builder` string
          - `directory` string — directory is the target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. +optional
          - `image` string
          - `image_tag` string
          - `repo` string
          - `revision` string
        - `huggingface` DeploymentHuggingfaceSpaceSource
          - `space` string
          - `tag` string — tag is the tag of the docker image. (Optional) If not set, we will get from the huggingface API.
      - `env_vars` object — EnvVars is the environment variables of the deployment.
      - `framework` 'mosec' | 'gradio' | 'streamlit' | 'other' | 'unknown'
      - `http_probe_path` string — HTTPProbePath is the user defined path of the http probe.
      - `id` string — ID holds the unique identifier of the deployment.
      - `image_config` ImageConfig
        - `enable_cache_optimize` boolean — EnableCacheOptimize is the flag to enable image cache optimization.
        - `secret_id` string — Secret for private registry
      - `max_replicas` integer — MaxReplicas is the maximum number of replicas of the deployment.
      - `min_replicas` integer — MinReplicas is the minimum number of replicas of the deployment.
      - `name` string — Name is the name of the deployment. e.g. demo. [a-z0-9]([-a-z0-9]*[a-z0-9])?
      - `port` integer — Port is the port of the deployment.
      - `secret` string[] — Secret is the secret of the deployment.
      - `server_resource` 'nvidia-tesla-t4-4c-16g' | 'cpu-4c-16g' | 'nvidia-ampere-a100-40g-12c-85g' | 'nvidia-ada-l4-8c-32g' | 'nvidia-ada-l4-4-48c-192g' | 'nvidia-ada-l4-2-24c-96g'
      - `spot_instance` boolean
      - `startup_duration` integer — StartupDuration is the startup timeout.
      - `target_load` integer — TargetLoad is the target load of the deployment. (inflight requests per replica)
      - `templateId` string — TemplateID is the template ID of the deployment.
      - `zero_duration` integer — ZeroDuration is the idle timeout before scaling to zero.
    - `status` DeploymentStatus
      - `available_replicas` integer — AvailableReplicas is the count of replicas ready to receive invocations as reported by the faas-provider
      - `build_id` string
      - `created_at` string — CreatedAt is the time read back from the faas backend's data store for when the function or its container was created.
      - `endpoint` string — Endpoint is the endpoint of the deployment. e.g. https://df433125-bdaa-4180-9087-313d5f64a3d5.modelz.ai
      - `image` string — Image is the image name of the deployment.
      - `innocation_count` integer — InvocationCount count of invocations
      - `phase` string — Phase is the current phase of the deployment.
      - `replicas` integer — Replicas desired within the cluster

---

[API](https://skmtc.dev/modelz/apis/modelz-api.md) · [All operations](https://skmtc.dev/modelz/apis/modelz-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/modelz/modelz-api/revisions/b68d575c96e8/schema)
