API 参考 / custom-fields

缺陷自定义字段定义列表

GET /api/v1/projects/{projectId}/bug-fields · listProjectBugFields

返回本项目为「缺陷」定义的自定义字段(T3.4,审计 #23,决策 D3 hybrid)。缺陷登记为一个 system entity_type,字段定义存 custom-data 底座的 entity_fields;缺陷录入 work_items.custom_fields 时按这些定义 做 S1-S4 校验。需要 view_project。

鉴权:项目 API Token(Authorization: Bearer wfp_…)。详见 Agent 接入。

参数

projectId(必填)
string

响应字段 · 200

items(必填)
CustomFieldDefinition[]
items[].id(必填)
string
items[].key(必填)
string
items[].label(必填)
string
items[].dataType(必填)
enum;取值:text / number / bool / date / select
items[].required(必填)
boolean
items[].unique(必填)
boolean
items[].config(必填)
object

错误

请求示例(curl)

curl -X GET "https://你的项目.workflow.games/api/v1/projects/{projectId}/bug-fields" \
  -H "Authorization: Bearer wfp_…"

响应示例

HTTP/1.1 200
{
  "items": [
    {
      "id": "018f3c2e-0000-7000-8000-000000000000",
      "key": "示例文本",
      "label": "示例文本",
      "dataType": "text",
      "required": true,
      "unique": true,
      "config": "示例文本"
    }
  ]
}

合同真值:OpenAPI 3.1(0.1.0)。

相关:Agent 接入指南 · 使用指南 · API 参考索引

Workflow 正在加载…