启动静态导出任务

Changed on

<Warning>静态导出未公开提供。 仅适用于 Enterprise 套餐。请联系 sales@mintlify.com 申请访问权限。</Warning>

为部署启动一个静态导出任务。该任务会将你的文档预渲染为一组自包含的静态 HTML、RSC 及资源文件,然后将结果打包为单个可下载的归档文件。

每个部署同一时间只能有一个处于活动状态的静态导出任务。当已有任务处于 queued 或 running 状态时启动新任务,将返回 409。速率限制为每个组织每小时最多启动 10 个任务。

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

post/static-export/{projectId}/jobs

Request

  • Base URL
    https://api.mintlify.com/v1
  • Auth
    HTTP bearer

Path parameters

projectIdstring required

你的项目 ID。可以从控制台的 API 密钥 页面复制。

Response

导出任务已被接受并加入队列。

jobIdstring required

静态导出任务的唯一标识符。

status'queued' | 'running' | 'completed' | 'failed' required

任务的当前状态。

createdAtstring date-time required

任务的创建时间。

updatedAtstring date-time required

任务上次状态变更的时间。

errorstring nullable

人类可读的错误消息。仅当 status 为 failed 时才会出现,否则为 null。

bundleUrlstring uri

指向静态导出软件包归档的有时限预签名 S3 链接。仅当 status 为 completed 时才会出现。请在 expiresAt 之前下载该软件包。可再次调用此端点获取新的链接。

sizeBytesinteger

软件包大小(字节)。仅当 status 为 completed 时才会出现。

expiresAtstring date-time

当前 bundleUrl 的过期时间。仅当 status 为 completed 时才会出现。

Example response

{
  "jobId": "6520f3a1c9b1a20012ab34cd",
  "status": "completed",
  "bundleUrl": "https://mintlify-static-exports.s3.amazonaws.com/6520f3a1c9b1a20012ab34cd/export.zip?X-Amz-Signature=...",
  "sizeBytes": 18432000
}

Changes

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status