Publish Workflow Version
Publish Workflow Version
Supports publishing a specified Workflow version as the online production version.
This endpoint authenticates with the target Workflow's own API Key, and can only be called by a Workflow that has version management permission enabled.
Request Method
POST
Request URL
https://api.${endpoint}/v1/workflow/version/release
Request Authentication
For details, see the authentication description in the API Overview. Please use the target Workflow's API Key as the token.
Request
Request Example
curl -X POST 'https://api.${endpoint}/v1/workflow/version/release' \
-H 'Authorization: Bearer ${token}' \
-H 'Content-Type: application/json' \
-d '{
"version": "v2"
}'
curl -X POST 'https://api.${endpoint}/v1/workflow/version/release' \
-H 'Authorization: Bearer ${token}' \
-H 'Content-Type: application/json' \
-d '{
"version": "v2"
}'
This code block in the floating window
Request Headers
| Field | Type | Description |
|---|---|---|
| Authorization | Bearer ${token} | Use the target Workflow's API Key for call authentication. |
| Content-Type | application/json | Request body format. |
Request Parameters (Body Parameters)
| Parameter | Type | Description | required |
|---|---|---|---|
| version | String | The version number to publish online. | true |
Response
Response Body
{
"code": 0,
"message": "OK",
"data": {
"version": "v2",
"previous_version": "v1"
}
}
{
"code": 0,
"message": "OK",
"data": {
"version": "v2",
"previous_version": "v1"
}
}
This code block in the floating window
Success Response
| Field | Type | Description |
|---|---|---|
| version | String | The version number published this time. |
| previous_version | String | The online version number before this publish; empty on first publish. |
Failure Response
| Field | Type | Description |
|---|---|---|
| code | int | Error code. |
| message | string | Error message. |
Status Codes
| Status Code | Description |
|---|---|
| 200 | Success |
| 400 | Parameter error |
| 401 | Unauthorized |
| 403 | Insufficient permissions, or the API Key does not have version management permission enabled |
| 429 | Too many requests |
| 500 | Server error |
