GET/api/public/v1/jobs/{id}

jobs.read

所需权限
随任务类型而定
类别
只读
计费
不计费
幂等
不需要
MCP 工具
get_job

参数

  • id位置 path必填 是类型 string (uuid)

请求体

没有请求体

成功响应 200

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "kind": {
      "type": "string",
      "pattern": "^[a-z][a-z_]{0,59}\\.[a-z][a-z_]{0,59}$"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "succeeded",
        "failed",
        "partially_succeeded",
        "needs_action",
        "cancelling",
        "cancelled"
      ]
    },
    "revision": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "progress": {
      "type": "object",
      "properties": {
        "completed": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "total": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "unit": {
          "type": "string",
          "enum": [
            "sheet",
            "page",
            "item",
            "file"
          ]
        }
      },
      "required": [
        "completed",
        "unit"
      ],
      "additionalProperties": false
    },
    "resultRefs": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "pattern": "^[a-z][a-z_]{0,39}$",
            "x-extensible-enum": [
              "grade_session",
              "file",
              "ingestion"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "kind",
          "id"
        ],
        "additionalProperties": false
      }
    },
    "itemFailures": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "reason": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.]{0,119}$"
          },
          "retryable": {
            "type": "boolean"
          }
        },
        "required": [
          "ref",
          "reason",
          "retryable"
        ],
        "additionalProperties": false
      }
    },
    "error": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9_.]{0,119}$"
        },
        "retryable": {
          "type": "boolean"
        }
      },
      "required": [
        "reason",
        "retryable"
      ],
      "additionalProperties": false
    },
    "nextAction": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "poll",
            "resume",
            "review"
          ]
        }
      },
      "required": [
        "kind"
      ],
      "additionalProperties": false
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "id",
    "kind",
    "status",
    "revision",
    "progress",
    "createdAt",
    "updatedAt"
  ],
  "additionalProperties": false
}

可能返回的错误状态码

400401403404409429500503

所有错误都用同一种错误信封返回,原因码见错误与限流。

GET /api/public/v1/jobs/{id} · 接口参考