PATCH
/
api
/
workflows
/
{workflowName}
/
visibility
更新项目可见性
curl --request PATCH \
  --url https://wfapi.yuhe.space/api/workflows/{workflowName}/visibility \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "visibility": "public"
}
'
{
  "errCode": 123,
  "errMessage": "<string>",
  "data": {
    "id": "<string>",
    "name": "<string>",
    "projectCard": {
      "iconBackgroundColor": "<string>",
      "iconUrl": "<string>"
    },
    "hasDraft": true,
    "latest": "<string>",
    "versions": [
      "<string>"
    ],
    "onlineVersions": [
      "<string>"
    ],
    "nextVersion": "<string>",
    "ownerUserId": "<string>",
    "createdByUserId": "<string>",
    "createdByProfile": {
      "userId": "<string>",
      "displayName": "<string>",
      "avatarUrl": "<string>"
    },
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "runQueue": {
      "acceptsNewRuns": true,
      "concurrency": 3,
      "updatedAt": "2023-11-07T05:31:56Z"
    },
    "draftBuild": {
      "startedAt": "2023-11-07T05:31:56Z",
      "endedAt": "2023-11-07T05:31:56Z",
      "durationMs": 123,
      "stdout": "<string>",
      "stderr": "<string>",
      "error": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

workflowName
string
required

Body

application/json
visibility
enum<string>
required
Available options:
private,
public

Response

更新后的 workflow 摘要。

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