# 获取静态导出作业状态 (/zh/api/static-export/get-job-status)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 1053 · updated: 2026-09-23 -->
Related: [启动静态导出作业](/zh/api/static-export/start-job.md), [产品更新](/zh/changelog.md)

<Info>
  此端点处于私有 Beta 阶段，需要企业协议。请联系 [sales@mintlify.com](mailto:sales@mintlify.com) 申请访问权限。
</Info>

`GET /static-export/{projectId}/jobs/{jobId}`

获取静态导出任务的当前状态。启动任务后，可以轮询此端点，直到 `status` 变为 `completed`（或 `failed`）。

任务完成后，响应中会包含 `bundleUrl`、`sizeBytes` 和 `expiresAt`。`bundleUrl` 是一个有时限的预签名 S3 链接。请在 `expiresAt` 时间戳之前下载该软件包。可再次调用此端点获取新的链接，底层的导出文件仍可复用。

静态导出仅适用于 Enterprise 套餐。

使用管理员 API 密钥进行身份验证。

## OpenAPI

```json
{
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "parameters": [
    {
      "schema": {
        "type": "string",
        "description": "你的项目 ID。可以从控制台的 [API 密钥](https://app.mintlify.com/settings/organization/api-keys) 页面复制。"
      },
      "required": true,
      "name": "projectId",
      "in": "path"
    },
    {
      "name": "jobId",
      "in": "path",
      "description": "由 `Start static export job` 返回的静态导出任务的 ID。",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "导出任务的当前状态。",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "jobId",
              "status",
              "createdAt",
              "updatedAt"
            ],
            "properties": {
              "jobId": {
                "type": "string",
                "description": "静态导出任务的唯一标识符。",
                "example": "6520f3a1c9b1a20012ab34cd"
              },
              "status": {
                "type": "string",
                "description": "任务的当前状态。",
                "enum": [
                  "queued",
                  "running",
                  "completed",
                  "failed"
                ],
                "example": "completed"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "description": "任务的创建时间。"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "description": "任务上次状态变更的时间。"
              },
              "error": {
                "type": "string",
                "description": "人类可读的错误消息。仅当 `status` 为 `failed` 时才会出现，否则为 `null`。",
                "nullable": true
              },
              "bundleUrl": {
                "type": "string",
                "format": "uri",
                "description": "指向静态导出软件包归档的有时限预签名 S3 链接。仅当 `status` 为 `completed` 时才会出现。请在 `expiresAt` 之前下载该软件包。可再次调用此端点获取新的链接。",
                "example": "https://mintlify-static-exports.s3.amazonaws.com/6520f3a1c9b1a20012ab34cd/export.zip?X-Amz-Signature=..."
              },
              "sizeBytes": {
                "type": "integer",
                "description": "软件包大小（字节）。仅当 `status` 为 `completed` 时才会出现。",
                "example": 18432000
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time",
                "description": "当前 `bundleUrl` 的过期时间。仅当 `status` 为 `completed` 时才会出现。"
              }
            }
          }
        }
      }
    },
    "401": {
      "description": "身份验证失败。",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "人类可读的错误描述。"
              }
            }
          }
        }
      }
    },
    "403": {
      "description": "该部署未启用静态导出。请联系 sales@mintlify.com 进行升级。",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "人类可读的错误描述。"
              }
            }
          }
        }
      }
    },
    "404": {
      "description": "该部署下不存在使用所提供 ID 的任务。",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "人类可读的错误描述。"
              }
            }
          }
        }
      }
    }
  }
}
```
