API 参考 / blueprints

读取当前生效问卷版本

GET /api/v1/orgs/{orgId}/blueprint-drafts/{draftId}/survey · getActiveSurvey

返回草案当前 survey_version_id 指向的问卷版本(含结构化答案 + 确定性 Intent)。 仅 active Org Admin 可读;普通成员 404。PAT 不可调用本端点。

空态:草案真实存在、admin 通过,但还没保存过任何问卷版本(新草案第一次进入问卷向导) 时返回 204 No Content(合法初始态),前端据此进入空白向导。404 仅用于零感知安全边界 (无权 / 草案真不存在)。

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

参数

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

响应字段 · 200

id(必填)
string
draftId(必填)
string
schemaVersion(必填)
integer
answers
SurveyAnswers —— 结构化问卷答案(每步一个对象)。
answers.schemaVersion
integer
answers.step1
SurveyStep1Answers —— 团队与资源(游戏引擎 / 人数 / 角色 / 经验 / 已有资产)。
answers.step1.engine
enum;取值:unity / unreal / godot / cocos / custom / undecided
answers.step1.headcount
integer
answers.step1.roles
string[]
answers.step1.experience
enum;取值:solo / hobby / indie / professional / aaa
answers.step1.existingAssets
string[]
answers.step2
SurveyStep2Answers —— 品类与题材(开放标签 + 核心循环)。
answers.step2.genres
string[]
answers.step2.themes
string[]
answers.step2.coreLoop
string
answers.step3
SurveyStep3Answers —— 目标市场与平台(发布平台 / 发行地区 / 目标年龄段)。
answers.step3.platforms
string[]
answers.step3.regions
string[]
answers.step3.targetAge
enum;取值:all / kids / teen / young_adult / adult
answers.step4
SurveyStep4Answers —— 竞品参照。matched 绑定公共游戏库;manual 只表示未匹配,不代表 Estimate。
answers.step4.competitors
SurveyCompetitorAnswer[]
answers.step5
SurveyStep5Answers —— 商业化(模式 / 价格档位 / 渠道)。
answers.step5.model
enum;取值:premium / f2p / ad / subscription / hybrid
answers.step5.priceTier
string
answers.step5.channels
string[]
answers.step6
SurveyStep6Answers —— 目标与约束(周期 / 预算 / 质量目标 / 硬约束 / 偏好 / 排斥 / 未确定 / 其他)。
answers.step6.timeline
enum;取值:1-3m / 3-6m / 6-12m / 12m+
answers.step6.budget
enum;取值:bootstrapped / small / mid / large
answers.step6.qualityBar
enum;取值:prototype / vertical_slice / early_access / full_release
answers.step6.constraints
SurveyConstraintAnswer[]
intent
ProjectIntent —— 把结构化答案确定性归一出的项目意图(相同 answers + schemaVersion 逐字节一致)。
intent.schemaVersion(必填)
integer
intent.team
IntentTeam
intent.team.engine
string
intent.team.headcount
integer
intent.team.roles
string[]
intent.team.experience
string
intent.team.existingAssets
string[]
intent.category
IntentCategory
intent.category.genres
string[]
intent.category.themes
string[]
intent.category.coreLoop
string
intent.market
IntentMarket
intent.market.platforms
string[]
intent.market.regions
string[]
intent.market.targetAge
string
intent.competitors
IntentCompetitor[]
intent.competitors[].marketGameId
string
intent.competitors[].entryKind(必填)
enum;取值:matched / manual
intent.competitors[].name(必填)
string
intent.competitors[].note
string
intent.monetization
IntentMonetization
intent.monetization.model
string
intent.monetization.priceTier
string
intent.monetization.channels
string[]
intent.goals
IntentGoals
intent.goals.timeline
string
intent.goals.budget
string
intent.goals.qualityBar
string
intent.goals.constraints
string[]
intent.goals.preferences
string[]
intent.goals.exclusions
string[]
intent.goals.openQuestions
string[]
intent.capability
CapabilityScore —— 团队能力分数(由人数 / 角色 / 经验 / 资产确定性推导,各分量 0-100)。
intent.capability.headcount
integer
intent.capability.roles
integer
intent.capability.experience
integer
intent.capability.assets
integer
intent.capability.total
integer
intent.hardConstraints
string[]
intent.risks
string[]
status(必填)
enum;取值:draft / confirmed
createdBy
string
createdAt(必填)
string
confirmedAt
string

响应 · 204

草案还没有任何问卷版本(合法初始态,新草案第一次进入问卷向导)

错误

请求示例(curl)

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

响应示例

HTTP/1.1 200
{
  "id": "018f3c2e-0000-7000-8000-000000000000",
  "draftId": "018f3c2e-0000-7000-8000-000000000000",
  "schemaVersion": 1,
  "status": "draft",
  "createdAt": "示例文本"
}

合同真值:OpenAPI 3.1(0.1.0)。

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

Workflow 正在加载…