PUT
/
api
/
workflows
/
{workflowName}
/
env
保存环境变量配置
curl --request PUT \
  --url https://wfapi.yuhe.space/api/workflows/{workflowName}/env \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "systemVars": [
    {
      "key": "<string>",
      "value": "<string>"
    }
  ],
  "customVars": [
    {
      "key": "<string>",
      "value": "<string>"
    }
  ],
  "target": "latest"
}
'
{
  "errCode": 123,
  "errMessage": "<string>",
  "data": {
    "workflowId": "<string>",
    "workflowName": "<string>",
    "target": "<string>",
    "resolvedTarget": "<string>",
    "systemVars": [
      {
        "key": "<string>",
        "value": "<string>",
        "description": "<string>",
        "required": true,
        "sensitive": true,
        "placeholder": "<string>",
        "exampleValue": "<string>",
        "options": [
          {
            "value": "<string>",
            "label": "<string>"
          }
        ]
      }
    ],
    "customVars": [
      {
        "key": "<string>",
        "value": "<string>",
        "description": "<string>",
        "required": true,
        "sensitive": true,
        "placeholder": "<string>",
        "exampleValue": "<string>",
        "options": [
          {
            "value": "<string>",
            "label": "<string>"
          }
        ]
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

workflowName
string
required

Body

application/json
systemVars
object[]
required
customVars
object[]
required
target
string
Example:

"latest"

Response

200 - application/json

保存后的环境变量配置。

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