POST
/
api
/
workflows
/
{workflowName}
/
invitations
生成项目邀请链接
curl --request POST \
  --url https://wfapi.yuhe.space/api/workflows/{workflowName}/invitations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "role": "viewer"
}
'
{
  "errCode": 123,
  "errMessage": "<string>",
  "data": {
    "invitation": {
      "id": "<string>",
      "workflowId": "<string>",
      "token": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "expiresAt": "2023-11-07T05:31:56Z",
      "createdBy": "<string>",
      "acceptedBy": "<string>",
      "acceptedAt": "2023-11-07T05:31:56Z",
      "revokedAt": "2023-11-07T05:31:56Z"
    },
    "token": "<string>"
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

workflowName
string
required

Body

application/json
role
enum<string>
required
Available options:
manager,
runner,
viewer

Response

创建成功,data 中包含邀请记录和服务端签发的 token。

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