PUT
/
api
/
workflows
/
{workflowName}
/
draft
/
files
保存 server draft 文件
curl --request PUT \
  --url https://wfapi.yuhe.space/api/workflows/{workflowName}/draft/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "files": [
    {
      "path": "index.ts",
      "content": "export default {};"
    }
  ],
  "removePaths": [
    "<string>"
  ]
}
'
{
  "errCode": 123,
  "errMessage": "<string>",
  "data": {
    "workflowId": "<string>",
    "workflowName": "<string>",
    "updatedFiles": [
      "<string>"
    ],
    "removedFiles": [
      "<string>"
    ],
    "build": {
      "startedAt": "2023-11-07T05:31:56Z",
      "endedAt": "2023-11-07T05:31:56Z",
      "durationMs": 123,
      "stdout": "<string>",
      "stderr": "<string>",
      "error": "<string>"
    },
    "nextVersion": "<string>"
  }
}

Authorizations

Authorization
string
header
required

使用 WORKFLOW_SERVER_ADMIN_KEY 或已创建的账号 API Key。

Path Parameters

workflowName
string
required

Body

application/json
files
object[]
required
removePaths
string[]

Response

200 - application/json

保存并构建结果。

errCode
integer
required
errMessage
string
required
Allowed value: ""
data
object
required