API 参考 / blueprints

生成 Project Intent(确定性归一产物)

POST /api/v1/orgs/{orgId}/blueprint-drafts/{draftId}/survey/intent · generateSurveyIntent

返回当前生效问卷版本的 ProjectIntent(确定性归一产物)。不重新计算——返回的是 保存时钉死的同一份 Intent(保证逐字节一致)。仅 active Org Admin 可调用;普通成员 404。 PAT 不可调用本端点。

空态:草案还没有任何问卷版本时返回 400「请先保存问卷后再生成意图」(操作顺序错误), 而非 404。

本接口要求浏览器会话。Bearer API Token 无法调用——Token 的生命周期管理必须在网页端完成。

参数

orgId(必填)
string
draftId(必填)
string

响应字段 · 200

schemaVersion(必填)
integer
team
IntentTeam
team.engine
string
team.headcount
integer
team.roles
string[]
team.experience
string
team.existingAssets
string[]
category
IntentCategory
category.genres
string[]
category.themes
string[]
category.coreLoop
string
market
IntentMarket
market.platforms
string[]
market.regions
string[]
market.targetAge
string
competitors
IntentCompetitor[]
competitors[].marketGameId
string
competitors[].entryKind(必填)
enum;取值:matched / manual
competitors[].name(必填)
string
competitors[].note
string
monetization
IntentMonetization
monetization.model
string
monetization.priceTier
string
monetization.channels
string[]
goals
IntentGoals
goals.timeline
string
goals.budget
string
goals.qualityBar
string
goals.constraints
string[]
goals.preferences
string[]
goals.exclusions
string[]
goals.openQuestions
string[]
capability
CapabilityScore —— 团队能力分数(由人数 / 角色 / 经验 / 资产确定性推导,各分量 0-100)。
capability.headcount
integer
capability.roles
integer
capability.experience
integer
capability.assets
integer
capability.total
integer
hardConstraints
string[]
risks
string[]

错误

请求示例(curl)

curl -X POST "https://workflow.games/api/v1/orgs/{orgId}/blueprint-drafts/{draftId}/survey/intent" \
  -H "Authorization: Bearer wfp_…"

响应示例

HTTP/1.1 200
{
  "schemaVersion": 1,
  "team": {
    "engine": "示例文本",
    "headcount": 1,
    "roles": [
      "示例文本"
    ]
  },
  "category": {
    "genres": [
      "示例文本"
    ],
    "themes": [
      "示例文本"
    ],
    "coreLoop": "示例文本"
  }
}

合同真值:OpenAPI 3.1(0.1.0)。

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

Workflow 正在加载…