Webhooks
Webhook events allow developers to subscribe to application events—such as application creation, environment deployment completion, change releases, or successful pipeline executions—enabling integration with third-party platforms like project management systems, your CMDB platform, or third-party deployment and operations platforms.
1. Webhooks
1.1 Create a webhook
AppStack provides global webhooks and in-app webhooks. Global webhooks apply to all applications in an organization, while in-app webhooks apply only to a specific application.
-
To create a global webhook, go to the AppStack homepage, navigate to Global Settings > Webhooks, and click Create Webhook. To create an in-app webhook, go to the target application, select Settings > Webhooks, and click Create Webhook.
-
Enter the webhook parameters:
-
URL: Required. The webhook endpoint URL. It must start with
http://orhttps://. -
Secret token: Optional. This token is sent in the
X-AppStack-Tokenrequest header. The receiver can use this token to verify the request's authenticity. -
Description: Optional. The purpose of the webhook.
-
Trigger events: Select the events that should trigger this webhook. For details, see the list of webhook events.
-
1.2 Test a webhook
After configuring a webhook, you can test it. Clicking Test Webhook sends a mock application creation event to your URL to verify connectivity.
A successful test returns a response status code of 200. The request header includes the X-AppStack-Event (value: App), X-AppStack-Action (value: Create), and X-AppStack-Token fields. The request body is in JSON format and includes id, user.id, orgId, objectKind (value: App), and an objectAttributes object that contains name and description. In the pop-up window, click the See webhooks documentation for details link to view complete field definitions.
1.3 Trigger History
Go to the webhooks list to view the Trigger History for a webhook. This history displays the Trigger Time, Duration, and the Request and Response for each event. You can use this information to trace deliveries and troubleshoot issues.
The trigger history list also includes a Record ID field. Expand an individual record to view header information on the Request tab, including fields such as X-AppStack-Event, X-AppStack-Action, and X-AppStack-Token. On the Response tab, you can view the response status code, such as 200.
2. Webhook headers and body
When a trigger event occurs, Alibaba Cloud DevOps AppStack sends a POST request with a payload to the specified webhook URL.
-
Request headers:
-
X-AppStack-Event: The triggering event object. -
X-AppStack-Action: The triggering event action. -
X-AppStack-Token: A secret token for verifying the request's authenticity. -
X-AppStack-App: The application associated with the triggering event.
-
-
Request body:
-
id: The unique ID of the event. -
user: An object with information about the triggering user. -
orgId: The organization ID where the event occurred. -
time: The time the event was triggered, as a Unix timestamp in milliseconds. Example: 1734233196163. -
objectKind: The type of the triggering object. Valid values include applicationApp, environmentEnv, change orderChangeOrder, application orchestrationAppOrchestration, variable groupVariableGroup, change requestChangeRequest, and release stage executionReleaseStageExecution. For more information, see 3. Webhooks event list. -
objectAttributes: A nested object containing the attributes of the event object. For more information, see 3. Webhooks event list.
-
3. Webhooks events
3.1 Application
3.1.1 Create application
Headers
{
"X-AppStack-Event": "App",
"X-AppStack-Action": "Create",
"X-AppStack-Token": "your-secret-token",
"X-AppStack-App": "myapp-demo"
}
Body
For details about the request body fields, see the GetApplication API.
{
"id": "07ebabc883e14ec78612656bbef61925",
"user": {
"id": "646dabc05ccc4ad1bc2a9e2f"
},
"orgId": "60d54f3daccf2bbd6659f3ad",
"time": 1734232981572,
"objectKind": "App",
"objectAttributes": {
"name": "myapp-demo",
"description": "This is a test application",
"type": "APP"
}
}
3.1.2 Delete application
Headers
{
"X-AppStack-Event": "App",
"X-AppStack-Action": "Delete",
"X-AppStack-Token": "your-secret-token",
"X-AppStack-App": "myapp-demo"
}
Body
For details about the request body fields, see the GetApplication API.
{
"id": "ecd0f8a7b6a6473bbbc3e5212ec33929",
"user": {
"id": "646dabc05ccc4ad1bc2a9e2f"
},
"orgId": "60d54f3daccf2bbd6659f3ad",
"time": "2024-07-29T06:50:25.480+00:00",
"objectKind": "App",
"objectAttributes": {
"name": "myapp-demo",
"description": "This is a test application",
"creatorId": "646dabc05ccc4ad1bc2a9e2f",
"gmtCreate": 1722235582000,
"type": "APP"
}
}
3.2 Environment
3.2.1 Create an environment
Headers
{
"X-AppStack-Event": "Env",
"X-AppStack-Action": "Create",
"X-AppStack-Token": "your-secret-token",
"X-AppStack-App": "myapp-demo"
}
Body
For a description of the fields in the request body, see the GetEnvironment API.
{
"id": "ecfc8a274ff3479e9bfa07e421a06b9c",
"user": {
"id": "646dabc05ccc4ad1bc2a9e2f"
},
"orgId": "60d54f3daccf2bbd6659f3ad",
"time": "2024-07-29T07:06:04.104+00:00",
"objectKind": "Env",
"objectAttributes": {
"name": "test-env",
"displayName": "test environment",
"appName": "myapp-demo",
"description": "This is a test environment for daily testing and verification.",
"lockBy": null,
"resourcePoolName": "default",
"deployGroupName": "demo-k8s-cluster",
"profiles": [
{
"name": "test-vars",
"displayName": "test profile",
"type": "APP"
}
],
"spec": {
"rolloutStrategy": null,
"replicasManagement": "SYSTEM"
},
"labelList": [
{
"namespace": "default",
"name": "envType",
"value": "test",
"displayName": "environment type",
"displayValue": "test environment"
}
]
}
}
3.2.2 Environment settings
Headers
{
"X-AppStack-Event": "Env",
"X-AppStack-Action": "Update",
"X-AppStack-Token": "your-secret-token",
"X-AppStack-App": "myapp-demo"
}
Body
For a description of the fields in the request body, see the GetEnvironment API.
{
"id": "64f6e280c9814f668ca56f713b6af19d",
"user": {
"id": "646dabc05ccc4ad1bc2a9e2f"
},
"orgId": "60d54f3daccf2bbd6659f3ad",
"time": "2024-07-29T07:07:42.536+00:00",
"objectKind": "Env",
"objectAttributes": {
"name": "test-env",
"displayName": "test environment",
"appName": "myapp-demo",
"description": "This is a test environment for daily testing and verification.",
"creatorId": "646dabc05ccc4ad1bc2a9e2f",
"gmtCreate": 1722236764000,
"lockBy": "61c92a37ae805dbacc5b9f78",
"resourcePoolName": "default",
"deployGroupName": "demo-k8s-cluster",
"profiles": [
{
"name": "test-vars",
"displayName": "test profile",
"type": "APP"
}
],
"spec": {
"rolloutStrategy": [
{
"locator": "*",
"batches": null,
"batchSteps": null,
"timeOutMS": 1200000,
"targetReplicas": null,
"batchMode": "ConfirmFirstBatch",
"deployType": "Rolling"
}
],
"replicasManagement": "USER"
},
"labelList": [
{
"namespace": "default",
"name": "envType",
"value": "test",
"displayName": "environment type",
"displayValue": "test environment"
}
]
}
}
3.2.3 Delete an environment
Headers
{
"X-AppStack-Event": "Env",
"X-AppStack-Action": "Delete",
"X-AppStack-Token": "your-secret-token",
"X-AppStack-App": "myapp-demo"
}
Body
For a description of the fields in the request body, see the GetEnvironment API.
{
"id": "f189080c26b94cdcbf069debdfeeff97",
"user": {
"id": "646dabc05ccc4ad1bc2a9e2f"
},
"orgId": "60d54f3daccf2bbd6659f3ad",
"time": "2024-07-29T07:09:04.612+00:00",
"objectKind": "Env",
"objectAttributes": {
"name": "test-env",
"displayName": "test environment",
"appName": "myapp-demo",
"description": "This is a test environment for daily testing and verification.",
"creatorId": "646dabc05ccc4ad1bc2a9e2f",
"gmtCreate": 1722236764000,
"lockBy": null,
"resourcePoolName": "default",
"deployGroupName": "demo-k8s-cluster",
"profiles": [
{
"name": "test-vars",
"displayName": "test profile",
"type": "APP"
}
],
"spec": {
"rolloutStrategy": [
{
"locator": "*",
"batches": null,
"batchSteps": null,
"timeOutMS": 1200000,
"targetReplicas": null,
"batchMode": "ConfirmFirstBatch",
"deployType": "Rolling"
}
],
"replicasManagement": "USER"
},
"labelList": [
{
"namespace": "default",
"name": "envType",
"value": "test",
"displayName": "environment type",
"displayValue": "test environment"
}
]
}
}
3.3 Change order
3.3.1 Change order status update
Headers
{
"X-AppStack-Event": "ChangeOrder",
"X-AppStack-Action": "StatusUpdate",
"X-AppStack-Token": "your-secret-token",
"X-AppStack-App": "myapp-demo"
}
Body
For details about the fields in the request body, see the GetChangeOrder API. The sourceType field has three values:
-
CUSTOMIZE: The change order originates from the AppStack environment page. ThesourceSnis the user ID of the Alibaba Cloud DevOps user who triggered the event. -
FLOW: The change order originates from an AppStack deployment component in a pipeline. ThesourceSnis the pipeline ID. -
OPEN_API: The change order originates from a call to the AppStack OpenAPI. ThesourceSnfield is not provided.
{
"id": "ca59d8f8f6224eb3b518af9c2145aca5",
"user": {
"id": "646dabc05ccc4ad1bc2a9e2f"
},
"orgId": "620321f073741507cb7d0cfd",
"time": "2024-08-15T06:43:34.911+00:00",
"objectKind": "ChangeOrder",
"objectAttributes": {
"name": "20240815144312-Deploy",
"appName": "myapp-demo",
"type": "Deploy",
"startedAt": 1723704199000,
"version": "20240815144312-310",
"tag": "myapp-demo::20240815144315::626e429",
"state": "FAILED",
"overrideFinishState": null,
"controlMode": "Auto",
"description": null,
"jobs": [
{
"sn": "1aa8d03f6b574681af203447812d1d61",
"name": "20240815144312-Deploy",
"envName": "test",
"appName": "myapp-demo",
"changeableEnvSn": "8480d937c656460fada9ca27f37f63a3",
"resourceType": "KUBERNETES",
"changeOrderSn": "32468993abb14653ae9d86cf5d1cac98",
"nextSn": null,
"priority": 0,
"profiles": [
{
"name": "test",
"displayName": "Test environment variable group",
"type": "APP"
}
],
"startedAt": 1723704199000,
"endedAt": 1723704215000,
"state": "FAILED",
"overrideFinishState": null,
"controlMode": "Auto",
"stages": [
{
"sn": "9436683c270d447ab22045de5642b027",
"jobSn": "1aa8d03f6b574681af203447812d1d61",
"resourceType": "KUBERNETES",
"priority": 1,
"startedAt": 1723704199000,
"endedAt": 1723704206000,
"state": "SUCCESS",
"overrideFinishState": null,
"controlMode": "Auto",
"name": "Sequence 1",
"tasks": [
{
"sn": "b8c82092f1a04d829154fde67bc4e0af",
"name": "myapp-demo-test",
"resourceType": "KUBERNETES",
"jobSn": "1aa8d03f6b574681af203447812d1d61",
"locator": "myapp-demo-test/default/core/v1/Service",
"stageSn": "9436683c270d447ab22045de5642b027",
"priority": 0,
"startedAt": 1723704199000,
"endedAt": 1723704202000,
"state": "SUCCESS",
"overrideFinishState": null,
"strategyContent": "{\"behavior\":\"Upsert\"}",
"contextContent": "{\"appName\":\"myapp-demo\",\"envName\":\"test\",\"name\":\"myapp-demo-test\",\"changeOrderVersion\":\"20240815144312-310\",\"artifacts\":{},\"version\":\"v1\",\"jobType\":\"Deploy\",\"group\":\"core\",\"namespace\":\"default\",\"deployGroupName\":\"c8c18031145b74e20811ae8bb59cea7fb\",\"planningStatus\":null,\"kind\":\"Service\",\"currentPassIndex\":null,\"extendParams\":{},\"initialRevisions\":null,\"locator\":\"myapp-demo-test/default/core/v1/Service\",\"apiVersion\":\"core/v1\"}",
"deliveries": "---\napiVersion: \"v1\"\nkind: \"Service\"\nmetadata:\n name: \"myapp-demo-test\"\n namespace: \"default\"\nspec:\n selector:\n run: \"myapp-demo-test\"\n ports:\n - protocol: \"TCP\"\n port: 80\n targetPort: 8080\n",
"spec": "---\napiVersion: \"v1\"\nkind: \"Service\"\nmetadata:\n name: \"myapp-demo-test\"\n namespace: \"default\"\n labels:\n devops.aliyun.com/app-name: \"myapp-demo\"\n devops.aliyun.com/version: \"20240815144312-310\"\n devops.aliyun.com/org-id: \"620321f073741507cb7d0cfd\"\n devops.aliyun.com/env-name: \"test\"\nspec:\n selector:\n run: \"myapp-demo-test\"\n ports:\n - protocol: \"TCP\"\n port: 80\n targetPort: 8080\n",
"engineTaskKey": "77b1c704-70fd-445a-ae58-c2dc2bfc2147",
"engineTaskResultContent": "{\"typeKey\":\"Ade2@KUBERNETES\",\"deliverySn\":\"77b1c704-70fd-445a-ae58-c2dc2bfc2147\",\"state\":\"SUCCESSFUL\",\"userParam\":{\"X-Tenant-Id\":\"620321f073741507cb7d0cfd\",\"X-Operator-Id\":\"646dabc05ccc4ad1bc2a9e2f\",\"traceId\":\"1889cf906d064cb7861cefe989d5a5b5.794.17237041982184057\",\"typeKey\":\"Ade2@KUBERNETES\"},\"statistics\":null,\"podRevision\":null,\"serviceBrief\":{\"ports\":[\"TCP 80:8080\"],\"clusterIp\":\"172.16.192.188\"},\"purgeStatistics\":null,\"callbackParams\":{},\"taskErrorMessages\":{},\"snapshotType\":null,\"snapshotKey\":null,\"uid\":null,\"info\":null,\"resourceType\":\"KUBERNETES\",\"typeKey\":\"Ade2@KUBERNETES\",\"engineTaskKey\":\"77b1c704-70fd-445a-ae58-c2dc2bfc2147\"}",
"orgId": "620321f073741507cb7d0cfd"
}
]
},
{
"sn": "d7cce8a19c3f4343b9a56102e970063a",
"jobSn": "1aa8d03f6b574681af203447812d1d61",
"resourceType": "KUBERNETES",
"priority": 2,
"startedAt": 1723704206000,
"endedAt": 1723704215000,
"state": "FAILED",
"overrideFinishState": null,
"controlMode": "Auto",
"name": "Sequence 2",
"tasks": [
{
"sn": "c86e2410edae4b948e1f11b683954810",
"name": "myapp-demo-test",
"resourceType": "KUBERNETES",
"jobSn": "1aa8d03f6b574681af203447812d1d61",
"locator": "myapp-demo-test/default/apps/v1/Deployment",
"stageSn": "d7cce8a19c3f4343b9a56102e970063a",
"priority": 0,
"startedAt": 1723704206000,
"endedAt": 1723704208000,
"state": "FAILED",
"overrideFinishState": null,
"strategyContent": "{\"version\":\"v2\",\"behavior\":\"Upsert\",\"batches\":2,\"batchSteps\":[{\"type\":\"WEIGHT\",\"value\":\"20\"},{\"type\":\"WEIGHT\",\"value\":\"80\"}],\"quickRollback\":null,\"targetReplicas\":null,\"fromReplicas\":null,\"timeOutMS\":600000,\"batchMode\":\"Manual\",\"deployType\":\"Batch\",\"deleteDeployGroup\":false,\"restraint\":null,\"totalReplicas\":null}",
"contextContent": "{\"appName\":\"myapp-demo\",\"envName\":\"test\",\"name\":\"myapp-demo-test\",\"changeOrderVersion\":\"20240815144312-310\",\"artifacts\":{\"image.backend\":\"yunxiao-registry.cn-beijing.cr.aliyuncs.com/test/demo1:emoji-2024-06-18-15-22-45\"},\"version\":\"v1\",\"jobType\":\"Deploy\",\"group\":\"apps\",\"namespace\":\"default\",\"deployGroupName\":\"c8c18031145b74e20811ae8bb59cea7fb\",\"planningStatus\":null,\"kind\":\"Deployment\",\"currentPassIndex\":0,\"extendParams\":{},\"initialRevisions\":[\"20240815144312-310\",\"20240702150459-614\"],\"locator\":\"myapp-demo-test/default/apps/v1/Deployment\",\"apiVersion\":\"apps/v1\"}",
"deliveries": "---\napiVersion: \"apps/v1\"\nkind: \"Deployment\"\nmetadata:\n name: \"myapp-demo-test\"\n namespace: \"default\"\n labels:\n run: \"myapp-demo-test\"\nspec:\n replicas: \"l\"\n selector:\n matchLabels:\n run: \"myapp-demo-test\"\n template:\n metadata:\n labels:\n run: \"myapp-demo-test\"\n spec:\n containers:\n - name: \"main\"\n image: \"yunxiao-registry.cn-beijing.cr.aliyuncs.com/test/demo1:emoji-2024-06-18-15-22-45\"\n ports:\n - containerPort: 8080\n resources:\n limits:\n cpu: 1\n memory: \"1024Mi\"\n requests:\n cpu: 0.01\n memory: \"32Mi\"\n",
"spec": "---\napiVersion: \"apps/v1\"\nkind: \"Deployment\"\nmetadata:\n name: \"myapp-demo-test\"\n namespace: \"default\"\n labels:\n run: \"myapp-demo-test\"\n devops.aliyun.com/app-name: \"myapp-demo\"\n devops.aliyun.com/env-name: \"test\"\n devops.aliyun.com/version: \"20240815144312-310\"\n devops.aliyun.com/org-id: \"620321f073741507cb7d0cfd\"\nspec:\n replicas: \"l\"\n selector:\n matchLabels:\n run: \"myapp-demo-test\"\n template:\n metadata:\n labels:\n run: \"myapp-demo-test\"\n devops.aliyun.com/app-name: \"myapp-demo\"\n devops.aliyun.com/env-name: \"test\"\n devops.aliyun.com/version: \"20240815144312-310\"\n devops.aliyun.com/org-id: \"620321f073741507cb7d0cfd\"\n spec:\n containers:\n - name: \"main\"\n image: \"yunxiao-registry.cn-beijing.cr.aliyuncs.com/test/demo1:emoji-2024-06-18-15-22-45\"\n ports:\n - containerPort: 8080\n resources:\n limits:\n cpu: 1\n memory: \"1024Mi\"\n requests:\n cpu: 0.01\n memory: \"32Mi\"\n",
"engineTaskKey": "59bb15fb-3454-4d0b-8a15-41e943786ed7",
"engineTaskResultContent": "{\"typeKey\":\"Ade2@KUBERNETES\",\"deliverySn\":\"59bb15fb-3454-4d0b-8a15-41e943786ed7\",\"state\":\"FAILED\",\"userParam\":{\"X-Tenant-Id\":\"620321f073741507cb7d0cfd\",\"X-Operator-Id\":\"646dabc05ccc4ad1bc2a9e2f\",\"traceId\":\"1889cf906d064cb7861cefe989d5a5b5.794.17237041982184057\",\"typeKey\":\"Ade2@KUBERNETES\"},\"statistics\":{\"externalOrderId\":null,\"rolloutId\":null,\"strategy\":\"Batch\",\"currentPassIndex\":0,\"totalPasses\":2,\"passStatus\":\"FAILED\",\"overallStatus\":\"FAILED\",\"passStatistics\":null,\"overallStatistics\":null,\"batchStatisticList\":[{\"updatedReplicas\":20,\"desiredReplicas\":20},{\"updatedReplicas\":0,\"desiredReplicas\":100}],\"purgeStatistics\":null,\"lastPass\":false},\"podRevision\":{\"newRevisions\":[{\"name\":\"notExists-0\",\"status\":\"NotExists\",\"age\":\"2024-08-15T06:43:27Z\",\"deployGroupName\":null,\"namespace\":null,\"refWorkload\":null,\"revision\":\"20240815144312-310\"}],\"oldRevisions\":[{\"name\":\"myapp-demo-test-6655b7f48d-pmwbs\",\"status\":\"Running\",\"age\":\"2024-07-02T07:05:27Z\",\"deployGroupName\":null,\"namespace\":\"default\",\"refWorkload\":null,\"revision\":\"20240702150459-614\"},{\"name\":\"myapp-demo-test-6655b7f48d-hqqqc\",\"status\":\"Running\",\"age\":\"2024-07-02T07:05:59Z\",\"deployGroupName\":null,\"namespace\":\"default\",\"refWorkload\":null,\"revision\":\"20240702150459-614\"},{\"name\":\"myapp-demo-test-6655b7f48d-zhbj9\",\"status\":\"Running\",\"age\":\"2024-07-02T07:06:00Z\",\"deployGroupName\":null,\"namespace\":\"default\",\"refWorkload\":null,\"revision\":\"20240702150459-614\"}]},\"serviceBrief\":null,\"purgeStatistics\":null,\"callbackParams\":{},\"taskErrorMessages\":{\"Delivery[59bb15fb-3454-4d0b-8a15-41e943786ed7]\":\"Error occurs when preparing delivery[59bb15fb-3454-4d0b-8a15-41e943786ed7]: Cannot deserialize value of type `int` from String \\\"l\\\": not a valid `int` value\\n at [Source: (StringReader); line: 16, column: 13] (through reference chain: io.fabric8.kubernetes.api.model.apps.Deployment[\\\"spec\\\"]->io.fabric8.kubernetes.api.model.apps.DeploymentSpec[\\\"replicas\\\"])\"},\"snapshotType\":\"OSS\",\"snapshotKey\":\"620321f073741507cb7d0cfdc86e2410edae4b948e1f11b683954810\",\"uid\":null,\"info\":null,\"resourceType\":\"KUBERNETES\",\"typeKey\":\"Ade2@KUBERNETES\",\"engineTaskKey\":\"59bb15fb-3454-4d0b-8a15-41e943786ed7\"}",
"orgId": "620321f073741507cb7d0cfd"
}
]
}
],
"type": "Deploy",
"snapshot": {
"deployGroup": {
"name": "c8c18031145b74e20811ae8bb59cea7fb",
"displayName": "devops-pre-autotest-002",
"description": "",
"poolName": "default",
"appSelector": null,
"claimList": [
{
"sn": "1b516ad73f7947339d56d33656a6b95c",
"type": "ACK",
"instanceName": "c8c18031145b74e20811ae8bb59cea7fb",
"specMap": {},
"itemSnList": [],
"refType": null,
"refId": null
}
],
"creator": "646dabc05ccc4ad1bc2a9e2f"
}
}
}
],
"sn": "32468993abb14653ae9d86cf5d1cac98",
"creator": "646dabc05ccc4ad1bc2a9e2f",
"gmtCreate": 1723704199000,
"sourceType": "CUSTOMIZE",
"sourceSn": "646dabc05ccc4ad1bc2a9e2f"
}
}
3.4 Application orchestration
3.4.1 Create orchestration
Headers
{
"X-AppStack-Event": "AppOrchestration",
"X-AppStack-Action": "Create",
"X-AppStack-Token": "your-secret-token",
"X-AppStack-App": "myapp-demo"
}
Body
See the GetAppOrchestration API for details on the request body.
{
"id": "c534abbceaad422fbb56ed7c53298675",
"user": {
"id": "646dabc05ccc4ad1bc2a9e2f"
},
"orgId": "60d54f3daccf2bbd6659f3ad",
"time": "2024-07-29T07:10:27.934+00:00",
"objectKind": "AppOrchestration",
"objectAttributes": {
"storageType": "BUILTIN",
"app": {
"name": "myapp-demo",
"description": "This is a test application",
"creatorId": "646dabc05ccc4ad1bc2a9e2f",
"gmtCreate": 1722236335000,
"type": "APP"
},
"format": "MANIFEST",
"suitableResourceTypes": [
"KUBERNETES"
],
"sn": "myapp-demo@KUBERNETES",
"revision": {
"sha": "73f3aa0a977946dbc79f948ba0933b1ab3962b2f",
"message": "Initialize orchestration",
"author": "646dabc05ccc4ad1bc2a9e2f",
"commitTime": 1722237027908
},
"name": "myapp-demo",
"creatorId": "646dabc05ccc4ad1bc2a9e2f",
"gmtCreate": 1722237027894,
"modifierId": "646dabc05ccc4ad1bc2a9e2f",
"gmtModified": 1722237027894,
"type": "AppBuiltInOrchestration",
"labelPolicy": "NONE",
"labelList": [],
"syncSourceTemplate": null,
"placeholderList": [
{
"name": "image.backend",
"description": "backend service image",
"type": "string",
"value": "NULL",
"overridable": true,
"rule": null,
"valueSource": "CONSTANT",
"predefined": true,
"rsType": "KUBERNETES"
},
{
"name": "envName",
"description": "environment name",
"type": "string",
"value": "APPSTACK_ENV_NAME",
"overridable": false,
"rule": null,
"valueSource": "VARIABLE",
"predefined": true,
"rsType": "KUBERNETES"
},
{
"name": "namespace",
"description": "namespace",
"type": "string",
"value": "default",
"overridable": true,
"rule": null,
"valueSource": "CONSTANT",
"predefined": false,
"rsType": "KUBERNETES"
},
{
"name": "cpuLimit",
"description": "CPU limit",
"type": "string",
"value": "1",
"overridable": true,
"rule": null,
"valueSource": "CONSTANT",
"predefined": false,
"rsType": "KUBERNETES"
},
{
"name": "memoryLimit",
"description": "memory limit",
"type": "string",
"value": "1024Mi",
"overridable": true,
"rule": null,
"valueSource": "CONSTANT",
"predefined": false,
"rsType": "KUBERNETES"
},
{
"name": "cpuRequest",
"description": "CPU request",
"type": "string",
"value": "0.01",
"overridable": true,
"rule": null,
"valueSource": "CONSTANT",
"predefined": false,
"rsType": "KUBERNETES"
},
{
"name": "memoryRequest",
"description": "memory request",
"type": "string",
"value": "32Mi",
"overridable": true,
"rule": null,
"valueSource": "CONSTANT",
"predefined": false,
"rsType": "KUBERNETES"
}
],
"componentList": [
{
"name": "demo-service",
"kind": "Service",
"description": "service access policy",
"content": "---\napiVersion: v1\nkind: Service\nmetadata:\n name: myapp-demo-{{ .AppStack.envName }}\n # Namespace configuration:\n # We recommend using a different Kubernetes namespace for each environment to ensure isolation.\n # During deployment, Alibaba Cloud DevOps replaces the {{ .Values.namespace }} placeholder with its configured value.\n namespace: {{ .Values.namespace }}\nspec:\n selector:\n run: myapp-demo-{{ .AppStack.envName }}\n ports:\n - protocol: TCP\n port: 80\n targetPort: 8080",
"priority": 1,
"type": "KUBERNETES"
},
{
"name": "demo-deployment",
"kind": "Deployment",
"description": "stateless application",
"content": "---\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: myapp-demo-{{ .AppStack.envName }}\n labels:\n run: myapp-demo-{{ .AppStack.envName }}\n # Namespace configuration:\n # We recommend using a different Kubernetes namespace for each environment to ensure isolation.\n # During deployment, Alibaba Cloud DevOps replaces the {{ .Values.namespace }} placeholder with its configured value.\n namespace: {{ .Values.namespace }}\nspec:\n replicas: 1\n selector:\n matchLabels:\n run: myapp-demo-{{ .AppStack.envName }}\n template:\n metadata:\n labels:\n run: myapp-demo-{{ .AppStack.envName }}\n spec:\n containers:\n - name: main\n # Image configuration:\n # During deployment, Alibaba Cloud DevOps replaces the predefined placeholder {{ .AppStack.image.backend }} with the actual image for the deployment.\n # You can either manually enter an image address when creating a new deployment or use a build artifact from an upstream pipeline.\n # You can also add multiple images to this placeholder to support multi-container scenarios, such as sidecars or init containers.\n image: {{ .AppStack.image.backend }}\n # Port configuration:\n ports:\n - containerPort: 8080\n # Resource configuration:\n # When different environments require different CPU or memory resources, you can define placeholders and use them with variable groups.\n # For example, if you set the {{ .Values.cpuLimit }} placeholder, Alibaba Cloud DevOps replaces it with the configured value during deployment.\n resources:\n limits:\n cpu: {{ .Values.cpuLimit }}\n memory: {{ .Values.memoryLimit }}\n requests:\n cpu: {{ .Values.cpuRequest }}\n memory: {{ .Values.memoryRequest }}\n # Lifecycle configuration:\n #lifecycle:\n # preStop:\n # exec:\n # command: [ \"/bin/bash\", \"-c\", \"sleep 10\" ]\n # Liveness probe configuration:\n #livenessProbe:\n # initialDelaySeconds: 10\n # failureThreshold: 3\n # periodSeconds: 5\n # successThreshold: 1\n # timeoutSeconds: 2\n # httpGet:\n # scheme: HTTP\n # path: /health\n # port: 7002\n # Readiness probe configuration:\n #readinessProbe:\n # initialDelaySeconds: 60\n # failureThreshold: 4\n # periodSeconds: 10\n # successThreshold: 1\n # timeoutSeconds: 3\n # httpGet:\n # scheme: HTTP\n # port: 7002\n # path: /health",
"priority": 2,
"type": "KUBERNETES"
}
]
}
}
3.4.2 Update orchestration
Headers
{
"X-AppStack-Event": "AppOrchestration",
"X-AppStack-Action": "Update",
"X-AppStack-Token": "your-secret-token",
"X-AppStack-App": "myapp-demo"
}
Body
See the GetAppOrchestration API for details on the request body.
{
"id": "4bcd40b2c1044260b2bd946b2195981d",
"user": {
"id": "646dabc05ccc4ad1bc2a9e2f"
},
"orgId": "60d54f3daccf2bbd6659f3ad",
"time": "2024-07-29T07:14:47.991+00:00",
"objectKind": "AppOrchestration",
"objectAttributes": {
"storageType": "BUILTIN",
"app": {
"name": "myapp-demo",
"description": "This is a test application",
"creatorId": "646dabc05ccc4ad1bc2a9e2f",
"gmtCreate": 1722236335000,
"type": "APP"
},
"format": "MANIFEST",
"suitableResourceTypes": [
"KUBERNETES"
],
"sn": "myapp-demo@KUBERNETES",
"revision": {
"sha": "7277190c92046cb56d4ba5941cbce4b78c11337c",
"message": "Change port number to 8081",
"author": "646dabc05ccc4ad1bc2a9e2f",
"commitTime": 1722237287949
},
"name": "myapp-demo",
"creatorId": "646dabc05ccc4ad1bc2a9e2f",
"gmtCreate": 1722237028000,
"modifierId": "61c92a37ae805dbacc5b9f78",
"gmtModified": 1734234554000,
"type": "AppBuiltInOrchestration",
"labelPolicy": "FROM_LABEL_BINDING",
"labelList": [
{
"namespace": "default",
"name": "envType",
"value": "dev",
"displayName": "Environment Level",
"displayValue": "Development Environment"
},
{
"namespace": "default",
"name": "envType",
"value": "test",
"displayName": "Environment Level",
"displayValue": "Testing Environment"
},
{
"namespace": "default",
"name": "envType",
"value": "prepub",
"displayName": "Environment Level",
"displayValue": "Staging Environment"
},
{
"namespace": "default",
"name": "envType",
"value": "production",
"displayName": "Environment Level",
"displayValue": "Production Environment"
}
],
"syncSourceTemplate": null,
"placeholderList": [
{
"name": "image.backend",
"description": "backend service image",
"type": "string",
"value": "NULL",
"overridable": true,
"rule": null,
"valueSource": "CONSTANT",
"predefined": true,
"rsType": "KUBERNETES"
},
{
"name": "envName",
"description": "environment name",
"type": "string",
"value": "APPSTACK_ENV_NAME",
"overridable": false,
"rule": null,
"valueSource": "VARIABLE",
"predefined": true,
"rsType": "KUBERNETES"
},
{
"name": "namespace",
"description": "namespace",
"type": "string",
"value": "default",
"overridable": true,
"rule": null,
"valueSource": "CONSTANT",
"predefined": false,
"rsType": "KUBERNETES"
},
{
"name": "cpuLimit",
"description": "CPU limit",
"type": "string",
"value": "1",
"overridable": true,
"rule": null,
"valueSource": "CONSTANT",
"predefined": false,
"rsType": "KUBERNETES"
},
{
"name": "memoryLimit",
"description": "memory limit",
"type": "string",
"value": "1024Mi",
"overridable": true,
"rule": null,
"valueSource": "CONSTANT",
"predefined": false,
"rsType": "KUBERNETES"
},
{
"name": "cpuRequest",
"description": "CPU request",
"type": "string",
"value": "0.01",
"overridable": true,
"rule": null,
"valueSource": "CONSTANT",
"predefined": false,
"rsType": "KUBERNETES"
},
{
"name": "memoryRequest",
"description": "memory request",
"type": "string",
"value": "32Mi",
"overridable": true,
"rule": null,
"valueSource": "CONSTANT",
"predefined": false,
"rsType": "KUBERNETES"
}
],
"componentList": [
{
"name": "demo-service",
"kind": "Service",
"description": "service access policy",
"content": "---\napiVersion: v1\nkind: Service\nmetadata:\n name: myapp-demo-{{ .AppStack.envName }}\n # Namespace configuration:\n # We recommend using a different Kubernetes namespace for each environment to ensure isolation.\n # During deployment, Alibaba Cloud DevOps replaces the {{ .Values.namespace }} placeholder with its configured value.\n namespace: {{ .Values.namespace }}\nspec:\n selector:\n run: myapp-demo-{{ .AppStack.envName }}\n ports:\n - protocol: TCP\n port: 80\n targetPort: 8081",
"priority": 1,
"type": "KUBERNETES"
},
{
"name": "demo-deployment",
"kind": "Deployment",
"description": "stateless application",
"content": "---\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: myapp-demo-{{ .AppStack.envName }}\n labels:\n run: myapp-demo-{{ .AppStack.envName }}\n # Namespace configuration:\n # We recommend using a different Kubernetes namespace for each environment to ensure isolation.\n # During deployment, Alibaba Cloud DevOps replaces the {{ .Values.namespace }} placeholder with its configured value.\n namespace: {{ .Values.namespace }}\nspec:\n replicas: 1\n selector:\n matchLabels:\n run: myapp-demo-{{ .AppStack.envName }}\n template:\n metadata:\n labels:\n run: myapp-demo-{{ .AppStack.envName }}\n spec:\n containers:\n - name: main\n # Image configuration:\n # During deployment, Alibaba Cloud DevOps replaces the predefined placeholder {{ .AppStack.image.backend }} with the actual image for the deployment.\n # You can either manually enter an image address when creating a new deployment or use a build artifact from an upstream pipeline.\n # You can also add multiple images to this placeholder to support multi-container scenarios, such as sidecars or init containers.\n image: {{ .AppStack.image.backend }}\n # Port configuration:\n ports:\n - containerPort: 8080\n # Resource configuration:\n # When different environments require different CPU or memory resources, you can define placeholders and use them with variable groups.\n # For example, if you set the {{ .Values.cpuLimit }} placeholder, Alibaba Cloud DevOps replaces it with the configured value during deployment.\n resources:\n limits:\n cpu: {{ .Values.cpuLimit }}\n memory: {{ .Values.memoryLimit }}\n requests:\n cpu: {{ .Values.cpuRequest }}\n memory: {{ .Values.memoryRequest }}\n # Lifecycle configuration:\n #lifecycle:\n # preStop:\n # exec:\n # command: [ \"/bin/bash\", \"-c\", \"sleep 10\" ]\n # Liveness probe configuration:\n #livenessProbe:\n # initialDelaySeconds: 10\n # failureThreshold: 3\n # periodSeconds: 5\n # successThreshold: 1\n # timeoutSeconds: 2\n # httpGet:\n # scheme: HTTP\n # path: /health\n # port: 7002\n # Readiness probe configuration:\n #readinessProbe:\n # initialDelaySeconds: 60\n # failureThreshold: 4\n # periodSeconds: 10\n # successThreshold: 1\n # timeoutSeconds: 3\n # httpGet:\n # scheme: HTTP\n # port: 7002\n # path: /health",
"priority": 2,
"type": "KUBERNETES"
}
]
}
}
3.4.3 Delete orchestration
Headers
{
"X-AppStack-Event": "AppOrchestration",
"X-AppStack-Action": "Delete",
"X-AppStack-Token": "your-secret-token",
"X-AppStack-App": "myapp-demo"
}
Body
See the GetAppOrchestration API for details on the request body.
{
"id": "0001408e7e4743748a891beb6d3d87ae",
"user": {
"id": "646dabc05ccc4ad1bc2a9e2f"
},
"orgId": "60d54f3daccf2bbd6659f3ad",
"time": "2024-07-29T07:17:31.418+00:00",
"objectKind": "AppOrchestration",
"objectAttributes": {
"storageType": "BUILTIN",
"app": {
"name": "myapp-demo",
"description": "This application was created on July 29, 2024",
"creatorId": "646dabc05ccc4ad1bc2a9e2f",
"gmtCreate": 1722236335000,
"type": "APP"
},
"format": "MANIFEST",
"suitableResourceTypes": [
"KUBERNETES"
],
"sn": "myapp-demo@KUBERNETES",
"revision": {
"sha": "7277190c92046cb56d4ba5941cbce4b78c11337c",
"message": "Change port number to 8081",
"author": "646dabc05ccc4ad1bc2a9e2f",
"commitTime": 1722237287949
},
"name": "myapp-demo",
"creatorId": "646dabc05ccc4ad1bc2a9e2f",
"gmtCreate": 1722237288000,
"modifierId": "646dabc05ccc4ad1bc2a9e2f",
"gmtModified": 1722237288000,
"type": "AppBuiltInOrchestration",
"labelPolicy": "FROM_LABEL_BINDING",
"labelList": [
{
"namespace": "default",
"name": "envType",
"value": "dev",
"displayName": "Environment Level",
"displayValue": "Development Environment"
},
{
"namespace": "default",
"name": "envType",
"value": "test",
"displayName": "Environment Level",
"displayValue": "Testing Environment"
},
{
"namespace": "default",
"name": "envType",
"value": "production",
"displayName": "Environment Level",
"displayValue": "Production Environment"
},
{
"namespace": "default",
"name": "envType",
"value": "prepub",
"displayName": "Environment Level",
"displayValue": "Staging Environment"
}
],
"syncSourceTemplate": null,
"placeholderList": [
{
"name": "image.backend",
"description": "backend service image",
"type": "string",
"value": "NULL",
"overridable": true,
"rule": null,
"valueSource": "CONSTANT",
"predefined": true,
"rsType": "KUBERNETES"
},
{
"name": "envName",
"description": "environment name",
"type": "string",
"value": "APPSTACK_ENV_NAME",
"overridable": false,
"rule": null,
"valueSource": "VARIABLE",
"predefined": true,
"rsType": "KUBERNETES"
},
{
"name": "namespace",
"description": "namespace",
"type": "string",
"value": "default",
"overridable": true,
"rule": null,
"valueSource": "CONSTANT",
"predefined": false,
"rsType": "KUBERNETES"
},
{
"name": "cpuLimit",
"description": "CPU limit",
"type": "string",
"value": "1",
"overridable": true,
"rule": null,
"valueSource": "CONSTANT",
"predefined": false,
"rsType": "KUBERNETES"
},
{
"name": "memoryLimit",
"description": "memory limit",
"type": "string",
"value": "1024Mi",
"overridable": true,
"rule": null,
"valueSource": "CONSTANT",
"predefined": false,
"rsType": "KUBERNETES"
},
{
"name": "cpuRequest",
"description": "CPU request",
"type": "string",
"value": "0.01",
"overridable": true,
"rule": null,
"valueSource": "CONSTANT",
"predefined": false,
"rsType": "KUBERNETES"
},
{
"name": "memoryRequest",
"description": "memory request",
"type": "string",
"value": "32Mi",
"overridable": true,
"rule": null,
"valueSource": "CONSTANT",
"predefined": false,
"rsType": "KUBERNETES"
}
],
"componentList": [
{
"name": "demo-service",
"kind": "Service",
"description": "service access policy",
"content": "---\napiVersion: v1\nkind: Service\nmetadata:\n name: myapp-demo-{{ .AppStack.envName }}\n # Namespace configuration:\n # We recommend using a different Kubernetes namespace for each environment to ensure isolation.\n # During deployment, Alibaba Cloud DevOps replaces the {{ .Values.namespace }} placeholder with its configured value.\n namespace: {{ .Values.namespace }}\nspec:\n selector:\n run: myapp-demo-{{ .AppStack.envName }}\n ports:\n - protocol: TCP\n port: 80\n targetPort: 8081",
"priority": 1,
"type": "KUBERNETES"
},
{
"name": "demo-deployment",
"kind": "Deployment",
"description": "stateless application",
"content": "---\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: myapp-demo-{{ .AppStack.envName }}\n labels:\n run: myapp-demo-{{ .AppStack.envName }}\n # Namespace configuration:\n # We recommend using a different Kubernetes namespace for each environment to ensure isolation.\n # During deployment, Alibaba Cloud DevOps replaces the {{ .Values.namespace }} placeholder with its configured value.\n namespace: {{ .Values.namespace }}\nspec:\n replicas: 1\n selector:\n matchLabels:\n run: myapp-demo-{{ .AppStack.envName }}\n template:\n metadata:\n labels:\n run: myapp-demo-{{ .AppStack.envName }}\n spec:\n containers:\n - name: main\n # Image configuration:\n # During deployment, Alibaba Cloud DevOps replaces the predefined placeholder {{ .AppStack.image.backend }} with the actual image for the deployment.\n # You can either manually enter an image address when creating a new deployment or use a build artifact from an upstream pipeline.\n # You can also add multiple images to this placeholder to support multi-container scenarios, such as sidecars or init containers.\n image: {{ .AppStack.image.backend }}\n # Port configuration:\n ports:\n - containerPort: 8080\n # Resource configuration:\n # When different environments require different CPU or memory resources, you can define placeholders and use them with variable groups.\n # For example, if you set the {{ .Values.cpuLimit }} placeholder, Alibaba Cloud DevOps replaces it with the configured value during deployment.\n resources:\n limits:\n cpu: {{ .Values.cpuLimit }}\n memory: {{ .Values.memoryLimit }}\n requests:\n cpu: {{ .Values.cpuRequest }}\n memory: {{ .Values.memoryRequest }}\n # Lifecycle configuration:\n #lifecycle:\n # preStop:\n # exec:\n # command: [ \"/bin/bash\", \"-c\", \"sleep 10\" ]\n # Liveness probe configuration:\n #livenessProbe:\n # initialDelaySeconds: 10\n # failureThreshold: 3\n # periodSeconds: 5\n # successThreshold: 1\n # timeoutSeconds: 2\n # httpGet:\n # scheme: HTTP\n # path: /health\n # port: 7002\n # Readiness probe configuration:\n #readinessProbe:\n # initialDelaySeconds: 60\n # failureThreshold: 4\n # periodSeconds: 10\n # successThreshold: 1\n # timeoutSeconds: 3\n # httpGet:\n # scheme: HTTP\n # port: 7002\n # path: /health",
"priority": 2,
"type": "KUBERNETES"
}
]
}
}
3.5 Variable group
3.5.1 Create a variable group
Headers
{
"X-AppStack-Event": "VariableGroup",
"X-AppStack-Action": "Create",
"X-AppStack-Token": "your-secret-token",
"X-AppStack-App": "myapp-demo"
}
Body
See the GetVariableGroup API for details about the request body fields.
{
"id": "2704eec852c6496293fbbd57a3756769",
"user": {
"id": "646dabc05ccc4ad1bc2a9e2f"
},
"orgId": "60d54f3daccf2bbd6659f3ad",
"time": "2024-07-29T07:00:28.327+00:00",
"objectKind": "VariableGroup",
"objectAttributes": {
"name": "test-vars",
"displayName": "Test environment variable group",
"vars": []
}
}
3.5.2 Update a variable group
Headers
{
"X-AppStack-Event": "VariableGroup",
"X-AppStack-Action": "Update",
"X-AppStack-Token": "your-secret-token",
"X-AppStack-App": "myapp-demo"
}
Body
See the GetVariableGroup API for details about the request body fields.
{
"id": "a8488254b29d4b8e97c2f8b45b84f14b",
"user": {
"id": "646dabc05ccc4ad1bc2a9e2f"
},
"orgId": "60d54f3daccf2bbd6659f3ad",
"time": "2024-07-29T07:02:23.656+00:00",
"objectKind": "VariableGroup",
"objectAttributes": {
"name": "test-vars",
"displayName": "Test environment variable group",
"vars": [
{
"key": "key1",
"value": "value1",
"description": "This is variable 1"
},
{
"key": "key2",
"value": "value2",
"description": "This is variable 2"
}
]
}
}
3.5.3 Delete a variable group
Headers
{
"X-AppStack-Event": "VariableGroup",
"X-AppStack-Action": "Delete",
"X-AppStack-Token": "your-secret-token",
"X-AppStack-App": "myapp-demo"
}
Body
See the GetVariableGroup API for details about the request body fields.
{
"id": "34483737e03746d6a0e60f5b767a9f24",
"user": {
"id": "646dabc05ccc4ad1bc2a9e2f"
},
"orgId": "60d54f3daccf2bbd6659f3ad",
"time": "2024-07-29T07:03:40.665+00:00",
"objectKind": "VariableGroup",
"objectAttributes": {
"name": "test-vars",
"displayName": "Test environment variable group"
}
}
3.6 Change request
3.6.1 Create change request
Headers
{
"X-AppStack-Event": "ChangeRequest",
"X-AppStack-Action": "Create",
"X-AppStack-Token": "your-secret-token",
"X-AppStack-App": "myapp-demo"
}
Body
For details on the request body fields, see the CreateChangeRequest API.
{
"id": "8379c68b025c4dd0bf04dc8279bdad3e",
"user": {
"id": "646dabc05ccc4ad1bc2a9e2f"
},
"orgId": "630de053ca912501d6c92e10",
"time": "2024-07-29T11:58:33.961+00:00",
"objectKind": "ChangeRequest",
"objectAttributes": {
"sn": "c7ae55830f9043cd971f872282bdbc2e",
"appName": "myapp-demo",
"state": "DEVELOPING",
"name": "Routine Change 001",
"type": "APP",
"appCodeRepoSn": "0f90e45370474414bd63bf2a9908042d",
"appCodeRepo": {
"sn": "0f90e45370474414bd63bf2a9908042d",
"appName": "myapp-demo",
"name": "myapp-demo",
"repoUrl": "https://codeup.aliyun.com/630de053ca912501d6c92e10/myapp-demo.git",
"identifier": "myapp_demo",
"repoContext": {
"repoUrl": "https://codeup.aliyun.com/630de053ca912501d6c92e10/myapp-demo.git",
"projectId": "4536398",
"defaultBranch": "master",
"repoType": "CODEUP"
},
"connectionConfig": {
"connectionId": "641004",
"connectionType": "FLOW"
}
},
"branch": "feature/20240729_001",
"ownerId": "646dabc05ccc4ad1bc2a9e2f",
"originBranch": "master",
"originBranchRevision": "2d26ea0ada1317ce95ef0c5307c4bc234621e94e",
"creatorId": "646dabc05ccc4ad1bc2a9e2f",
"gmtCreate": 1722254314000,
"gmtModified": 1722254314000,
"extInfo": {
"repoUrl": "https://codeup.aliyun.com/630de053ca912501d6c92e10/myapp-demo.git",
"repoType": "CODEUP",
"appCodeRepo": {
"sn": "0f90e45370474414bd63bf2a9908042d",
"appName": "myapp-demo",
"name": "myapp-demo",
"repoUrl": "https://codeup.aliyun.com/630de053ca912501d6c92e10/myapp-demo.git",
"identifier": "myapp_demo",
"repoContext": {
"repoUrl": "https://codeup.aliyun.com/630de053ca912501d6c92e10/myapp-demo.git",
"projectId": "4536398",
"defaultBranch": "master",
"repoType": "CODEUP"
},
"connectionConfig": {
"connectionId": "641004",
"connectionType": "FLOW"
}
},
"autoDeleteBranchWhenEnd": false
}
}
}
3.6.2 Update change request state
Headers
{
"X-AppStack-Event": "ChangeRequest",
"X-AppStack-Action": "StatusUpdate",
"X-AppStack-Token": "your-secret-token",
"X-AppStack-App": "myapp-demo"
}
Body
For details on the request body fields, see the UpdateChangeRequestState API.
{
"id": "db926f9a92d64884b50401f7a19f8aa4",
"user": {
"id": "646dabc05ccc4ad1bc2a9e2f"
},
"orgId": "630de053ca912501d6c92e10",
"time": "2024-07-29T12:00:53.660+00:00",
"objectKind": "ChangeRequest",
"objectAttributes": {
"sn": "c7ae55830f9043cd971f872282bdbc2e",
"appName": "myapp-demo",
"state": "INTEGRATING",
"name": "Routine Change 001",
"type": "APP",
"appCodeRepoSn": "0f90e45370474414bd63bf2a9908042d",
"appCodeRepo": {
"sn": "0f90e45370474414bd63bf2a9908042d",
"appName": "myapp-demo",
"name": "myapp-demo",
"repoUrl": "https://codeup.aliyun.com/630de053ca912501d6c92e10/myapp-demo.git",
"identifier": "myapp_demo",
"repoContext": {
"repoUrl": "https://codeup.aliyun.com/630de053ca912501d6c92e10/myapp-demo.git",
"projectId": "4536398",
"defaultBranch": "master",
"repoType": "CODEUP"
},
"connectionConfig": {
"connectionId": "641004",
"connectionType": "FLOW"
}
},
"branch": "feature/20240729_001",
"ownerId": "646dabc05ccc4ad1bc2a9e2f",
"originBranch": "master",
"originBranchRevision": "2d26ea0ada1317ce95ef0c5307c4bc234621e94e",
"creatorId": "646dabc05ccc4ad1bc2a9e2f",
"gmtCreate": 1722254314000,
"gmtModified": 1722254454000,
"extInfo": {
"repoUrl": "https://codeup.aliyun.com/630de053ca912501d6c92e10/myapp-demo.git",
"repoType": "CODEUP",
"appCodeRepo": {
"sn": "0f90e45370474414bd63bf2a9908042d",
"appName": "myapp-demo",
"name": "myapp-demo",
"repoUrl": "https://codeup.aliyun.com/630de053ca912501d6c92e10/myapp-demo.git",
"identifier": "myapp_demo",
"repoContext": {
"repoUrl": "https://codeup.aliyun.com/630de053ca912501d6c92e10/myapp-demo.git",
"projectId": "4536398",
"defaultBranch": "master",
"repoType": "CODEUP"
},
"connectionConfig": {
"connectionId": "641004",
"connectionType": "FLOW"
}
},
"autoDeleteBranchWhenEnd": false
}
}
}
3.7 Development stage
3.7.1 Stage execution status update
Headers
{
"X-AppStack-Event": "ReleaseStageExecution",
"X-AppStack-Action": "StatusUpdate",
"X-AppStack-Token": "your-secret-token",
"X-AppStack-App": "myapp-demo"
}
Body
The objectAttributes object in the request body contains the following fields:
-
releaseWorkflowSn: The development workflow ID. -
releaseStageSn: The development workflow stage ID. -
engineInstanceId: A composite ID formatted aspipeline ID:run ID. -
state: The pipeline run status. -
context.triggerMode: The pipeline trigger mode. -
context.startTime: The pipeline run start time. -
context.endTime: The pipeline run end time.
{
"id": "0b3b23464e374d6985ea46a3d2d5d498",
"user": {
"id": "61c92a37ae805dbacc5b9f78"
},
"orgId": "60d54f3daccf2bbd6659f3ad",
"time": 1734243628688,
"objectKind": "ReleaseStageExecution",
"objectAttributes": {
"releaseStageSn": "80e65045dc794d3c921e81ec896b4693",
"releaseWorkflowSn": "8abe97bf557b410f8ca389e564553af1",
"engineInstanceId": "3786032:1",
"state": "FAILED",
"context": {
"triggerMode": "MANUAL",
"startTime": 1734243615000,
"endTime": 1734243628295
}
}
}