UpdateReleaseStage - Update release stage
Applicable versions | Central version, Region version |
Endpoint and authorization information
- Get the endpoint: Replace {domain} in the API request syntax.
- Get a personal access token.
- Obtain organizationId: Required only for the Central version. Go to the Basic Information page in the Organization Management console to retrieve your organization ID.
Product | Resource | Required permission |
Application Delivery | R&D phase | Read and write |
Request syntax
Central version
PUT https://{domain}/oapi/v1/appstack/organizations/{organizationId}/apps/{appName}/releaseWorkflows/{releaseWorkflowSn}/releaseStages/{releaseStageSn}
Region version
PUT https://{domain}/oapi/v1/appstack/apps/{appName}/releaseWorkflows/{releaseWorkflowSn}/releaseStages/{releaseStageSn}
Request headers
Parameter | Type | Required | Description | Example value |
x-yunxiao-token | string | Yes | Personal access token. | pt-0fh3****0fbG_35af****0484 |
Request parameters
Parameter | Type | Location | Required | Description | Example value |
appName | string | path | Yes | Application name. | my-web-service |
releaseWorkflowSn | string | path | Yes | Unique serial number of the release workflow. | 3f472a12b15d4f418ad6227bb85f787c |
releaseStageSn | string | path | Yes | Unique serial number of the release stage. | 6b4c53eee9a842c6a11235b29d002a81 |
organizationId | string | path |
| Organization ID. | ec766e63aee3437d9a51f334d6exe671 |
| - | object | body | No | Request body for creating a release stage. | |
| commitMessage | string | body | No | Version commit message. | message-xxxxx |
| labelList | array | body | Yes | List of labels. | |
| - | object | body | No | AppStack label. | |
| displayName | string | body | No | Label display name. Used for descriptive purposes only and not used in label matching. | Test label key |
| displayValue | string | body | No | Label display value. Used for descriptive purposes only and not used in label matching. | Test label value |
| extraMap | object | body | No | Map of extended label properties. You can use this to store custom extension fields when defining a label. | {} |
| name | string | body | Yes | Label name. Must contain only lowercase letters, hyphens, and digits, and must start and end with a lowercase letter or digit. | demo-label |
| namespace | string | body | Yes | Label namespace. Determines the scope of the label. | default |
| value | string | body | Yes | Label value. Must contain only lowercase letters, hyphens, and digits, and must start and end with a lowercase letter or digit. | demo-label-value |
| name | string | body | Yes | Name. | stage-name |
| order | string | body | No | Sort order. | 1 |
| variableGroups | array | body | Yes | List of variable groups. | |
| - | object | body | No | Generic variable group model. | |
| displayName | string | body | No | Variable group display name. | Development variable group |
| name | string | body | No | Variable group identifier. | dev |
| type | string | body | No | Variable group type. | GLOBAL |
Request examples
Central version
curl -X 'PUT' \
'https://{domain}/oapi/v1/appstack/organizations/ec766e63aee3437d9a51f334d6exe671/apps/my-web-service/releaseWorkflows/3f472a12b15d4f418ad6227bb85f787c/releaseStages/6b4c53eee9a842c6a11235b29d002a81' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"commitMessage": "message-xxxxx",
"labelList": [
{
"displayName": "Test label key",
"displayValue": "Test label value",
"extraMap": {},
"name": "demo-label",
"namespace": "default",
"value": "demo-label-value"
}
],
"name": "stage-name",
"order": "1",
"variableGroups": [
{
"displayName": "Development variable group",
"name": "dev",
"type": "GLOBAL"
}
]
}'
Region version
curl -X 'PUT' \
'https://{domain}/oapi/v1/appstack/apps/my-web-service/releaseWorkflows/3f472a12b15d4f418ad6227bb85f787c/releaseStages/6b4c53eee9a842c6a11235b29d002a81' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"commitMessage": "message-xxxxx",
"labelList": [
{
"displayName": "Test label key",
"displayValue": "Test label value",
"extraMap": {},
"name": "demo-label",
"namespace": "default",
"value": "demo-label-value"
}
],
"name": "stage-name",
"order": "1",
"variableGroups": [
{
"displayName": "Development variable group",
"name": "dev",
"type": "GLOBAL"
}
]
}'
Response parameters
Parameter | Type | Description | Example value |
| - | object | Flow stage. | |
| appName | string | Application name. | my-web-app |
| labels | array | List of labels. | |
| - | object | AppStack label. | |
| displayName | string | Label display name. Used for descriptive purposes only and not used in label matching. | Test label key |
| displayValue | string | Label display value. Used for descriptive purposes only and not used in label matching. | Test label value |
| extraMap | object | Map of extended label properties. You can use this to store custom extension fields when defining a label. | {} |
| name | string | Label name. Must contain only lowercase letters, hyphens, and digits, and must start and end with a lowercase letter or digit. | demo-label |
| namespace | string | Label namespace. Determines the scope of the label. | default |
| value | string | Label value. Must contain only lowercase letters, hyphens, and digits, and must start and end with a lowercase letter or digit. | demo-label-value |
| name | string | Name. | my-stage |
| order | string | Stage order. | 1 |
| pipeline | object | Pipeline V1. | |
| engineSn | string | Flow pipeline identifier. | 321 |
| engineType | string | Possible values: [FlowV1 FlowV2 FlowAny]. | FlowV1 |
| pipeline | object | ||
| pipelineYaml | string | Pipeline content. | {"name":"my-flow-name","owner":"31a62065395ee4198d5516a8","pipelineConfigVo":{"triggerVoList":[{"type":"MANUAL"}],"settings":"{\\"executeScope\\":\\"\\",\\"caches\\":[{\\"directory\\":\\"/root/.m2\\",\\"desc\\":\\"maven dependency cache\\",\\"disable\\":false},{\\"directory\\":\\"/root/.gradle/caches\\",\\"desc\\":\\"gradle dependency cache\\",\\"disable\\":false},{\\"directory\\":\\"/root/.npm\\",\\"desc\\":\\"npm global dependency cache\\",\\"disable\\":false},{\\"directory\\":\\"/root/.yarn\\",\\"desc\\":\\"yarn global dependency cache\\",\\"disable\\":false},{\\"directory\\":\\"/go/pkg/mod\\",\\"desc\\":\\"go mod cache\\",\\"disable\\":false},{\\"directory\\":\\"/root/.cache\\",\\"desc\\":\\"other cache\\",\\"disable\\":false}]}","flow":"schema: tb\\npipeline:\\n - name: Stage 1\\n stages:\\n - driven: AUTO\\n jobs:\\n - displayName: Empty task\\n task: execution-component@66\\n identifier: \'10_1726646111967\'\\n templateType: task\\n templateSign: \'\'\\n templateBatchUpdate: \'N\'\\n extraInfo: \'\'\\n params:\\n ENGINE_PIPELINE_NAME: \'\${INPUTS.ENGINE_PIPELINE_NAME}\'\\n ENGINE_PIPELINE_ID: \'\${INPUTS.ENGINE_PIPELINE_ID}\'\\n ENGINE_PIPELINE_INST_ID: \'\${INPUTS.ENGINE_PIPELINE_INST_ID}\'\\n ENGINE_PIPELINE_INST_NUMBER: \'\${INPUTS.ENGINE_PIPELINE_INST_NUMBER}\'\\n buildNodeGroup: K8S-4\\n capabilities: \'Linux,amd64\'\\n buildEnvironment: container\\n specifyContainerImageId: >-\\n build-steps-public-registry.cn-beijing.cr.aliyuncs.com/build-steps/alinux3:latest\\n clone_option: all\\n selected_sources: \'\'\\n steps: []\\n plugins: []\\n output: []\\n freeInTaskGroupModeFields: []\\n","sources":"[]","webhook":"e0aO78pcq8n5XaFe81b1"},"originPipelineId":1} |
| plugins | object | List of plugins. | [] |
| refObjectList | object | List of plugins. | [] |
| releaseWorkflowSn | string | Serial number of the associated workflow. | 1484e1facb5a4febbe1652607b2eb345 |
| sn | string | Unique serial number. | sn-xxxx |
| variableGroups | array | List of variable groups. | |
| - | object | Generic variable group model. | |
| displayName | string | Variable group display name. | Development variable group |
| name | string | Variable group identifier. | dev |
| type | string | Variable group type. | GLOBAL |
Response example
{
"appName": "my-web-app",
"labels": [
{
"displayName": "Test label key",
"displayValue": "Test label value",
"extraMap": {},
"name": "demo-label",
"namespace": "default",
"value": "demo-label-value"
}
],
"name": "my-stage",
"order": "1",
"pipeline": {
"engineSn": "321",
"engineType": "FlowV1",
"pipeline": {
},
"pipelineYaml": "{\"name\":\"my-flow-name\",\"owner\":\"31a62065395ee4198d5516a8\",\"pipelineConfigVo\":{\"triggerVoList\":[{\"type\":\"MANUAL\"}],\"settings\":\"{\\\\\"executeScope\\\\\":\\\\\"\\\\\",\\\\\"caches\\\\\":[{\\\\\"directory\\\\\":\\\\\"/root/.m2\\\\\",\\\\\"desc\\\\\":\\\\\"maven dependency cache\\\\\",\\\\\"disable\\\\\":false},{\\\\\"directory\\\\\":\\\\\"/root/.gradle/caches\\\\\",\\\\\"desc\\\\\":\\\\\"gradle dependency cache\\\\\",\\\\\"disable\\\\\":false},{\\\\\"directory\\\\\":\\\\\"/root/.npm\\\\\",\\\\\"desc\\\\\":\\\\\"npm global dependency cache\\\\\",\\\\\"disable\\\\\":false},{\\\\\"directory\\\\\":\\\\\"/root/.yarn\\\\\",\\\\\"desc\\\\\":\\\\\"yarn global dependency cache\\\\\",\\\\\"disable\\\\\":false},{\\\\\"directory\\\\\":\\\\\"/go/pkg/mod\\\\\",\\\\\"desc\\\\\":\\\\\"go mod cache\\\\\",\\\\\"disable\\\\\":false},{\\\\\"directory\\\\\":\\\\\"/root/.cache\\\\\",\\\\\"desc\\\\\":\\\\\"other cache\\\\\",\\\\\"disable\\\\\":false}]}\",\"flow\":\"schema: tb\\\\npipeline:\\\\n - name: Stage 1\\\\n stages:\\\\n - driven: AUTO\\\\n jobs:\\\\n - displayName: Empty task\\\\n task: execution-component@66\\\\n identifier: \\'10_1726646111967\\'\\\\n templateType: task\\\\n templateSign: \\'\\'\\\\n templateBatchUpdate: \\'N\\'\\\\n extraInfo: \\'\\'\\\\n params:\\\\n ENGINE_PIPELINE_NAME: \\'${INPUTS.ENGINE_PIPELINE_NAME}\\'\\\\n ENGINE_PIPELINE_ID: \\'${INPUTS.ENGINE_PIPELINE_ID}\\'\\\\n ENGINE_PIPELINE_INST_ID: \\'${INPUTS.ENGINE_PIPELINE_INST_ID}\\'\\\\n ENGINE_PIPELINE_INST_NUMBER: \\'${INPUTS.ENGINE_PIPELINE_INST_NUMBER}\\'\\\\n buildNodeGroup: K8S-4\\\\n capabilities: \\'Linux,amd64\\'\\\\n buildEnvironment: container\\\\n specifyContainerImageId: >-\\\\n build-steps-public-registry.cn-beijing.cr.aliyuncs.com/build-steps/alinux3:latest\\\\n clone_option: all\\\\n selected_sources: \\'\\'\\\\n steps: []\\\\n plugins: []\\\\n output: []\\\\n freeInTaskGroupModeFields: []\\\\n\",\"sources\":\"[]\",\"webhook\":\"e0aO78pcq8n5XaFe81b1\"},\"originPipelineId\":1}",
"plugins": [],
"refObjectList": []
},
"releaseWorkflowSn": "1484e1facb5a4febbe1652607b2eb345",
"sn": "sn-xxxx",
"variableGroups": [
{
"displayName": "Development variable group",
"name": "dev",
"type": "GLOBAL"
}
]
}
Error codes
See Error Code Center for API-related error codes.