---
title: "获取Deployment版本历史"
method: GET
path: "/k8s/cluster/{id}/namespaces/{namespaceName}/deployments/{deploymentName}/history"
tags: ["Deployment版本管理"]
---

# 获取Deployment版本历史

`GET /k8s/cluster/{id}/namespaces/{namespaceName}/deployments/{deploymentName}/history`

获取指定Deployment的所有版本历史信息

## Path parameters

- `id` integer, required
- `namespaceName` string, required
- `deploymentName` string, required

## Headers

- `Authorization` string, required

## Response `200`

OK

- object
  - `code` integer — 状态码
  - `data` object — 返回的数据
    - `currentRevision` integer — 当前版本号
    - `deploymentName` string — Deployment名称
    - `namespace` string — 命名空间
    - `revisions` ModelDeploymentRevision[] — 版本列表
      - `annotations` object — 注释
      - `changeReason` string — 变更原因
      - `creationTime` string — 创建时间
      - `images` string[] — 镜像列表
      - `labels` object — 标签
      - `replicasSummary` ModelReplicasSummary
        - `available` integer — 可用副本数
        - `current` integer — 当前副本数
        - `desired` integer — 期望副本数
        - `ready` integer — 就绪副本数
        - `updated` integer — 已更新副本数
      - `revision` integer — 版本号
      - `status` string — 版本状态 (current/historical)
    - `totalRevisions` integer — 总版本数
  - `message` string — 提示信息

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/opsre/apis/devops.md) · [All operations](https://skmtc.dev/opsre/apis/devops/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/opsre/devops/revisions/25cac8835c4c/schema)
