ListChangeOrderVersions - List change order versions

Updated at:

Use OpenAPI to list deployment versions.

Versions

Central edition, region edition

Service endpoint and authorization

  • Get the service endpoint: Replace {domain} in the API request syntax.

  • Get a personal access token.

  • Get the organization ID: Required only for the centralized edition. Go to the organization management console > basic information page to get the organization ID.

Product

Resource

Required permissions

application delivery

deployment

read-only

Request syntax

Central version

GET https://{domain}/oapi/v1/appstack/organizations/{organizationId}/apps/{appName}/changeOrders/versions

Regional version

GET https://{domain}/oapi/v1/appstack/apps/{appName}/changeOrders/versions

Request header

Parameter

Type

Required

Description

Example

x-yunxiao-token

string

Yes

The personal access token for Alibaba Cloud DevOps.

pt-0fh3****0fbG_35af****0484

Request parameters

Parameter

Type

Location

Required

Description

Example

appName

string

path

Yes

The application name.

my-web-service

envNames

array

query

No

The environment identifiers. If this parameter is not specified, deployment orders from all environments are returned.

['dev','test']

states

array

query

No

The states for filtering deployment orders. If not specified, deployment orders in all states are returned. Valid values: INIT, PREPARING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, SUCCESS, FAILED, and CANCELED.

['SUCCESS','FAILED','CANCELED']

creators

array[integer]

query

No

The Alibaba Cloud DevOps account IDs of the creators. If this parameter is not specified, deployment orders from all creators are returned.

['bd9e3c6d-624f-4580-af7d-c5e26f1xxxxx']

pageSize

integer

query

Yes

The page size. Default value: 10.

10

current

integer

query

No

The current page number. The numbering starts from 1. Default value: 1.

1

organizationId

string

path

  • Yes: centralized edition

  • No: region-specific edition

The organization ID.

ec766e63aee3437d9a51f334d6exxxxx

Request example

Central edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/appstack/organizations/ec766e63aee3437d9a51f334d6exxxxx/apps/my-web-service/changeOrders/versions?envNames=['dev','test']&states=['SUCCESS','FAILED','CANCELED']&creators=['bd9e3c6d-624f-4580-af7d-c5e26f1xxxxx']&pageSize=10&current=1' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/appstack/apps/my-web-service/changeOrders/versions?envNames=['dev','test']&states=['SUCCESS','FAILED','CANCELED']&creators=['bd9e3c6d-624f-4580-af7d-c5e26f1xxxxx']&pageSize=10&current=1' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Return parameters

Parameter

Type

Description

Example value

total

number

Total number of records.

10

current

number

The current page number.

1

pageSize

number

The number of records per page.

10

pages

number

The total number of pages.

10

records

array

List of data records. For details, see The records parameter.

records parameter

Parameter

Type

Description

Example value

version

string

The version number.

20250717115350-021

appOrchestration

object

The built-in application orchestration. For details, see The appOrchestration parameter.

artifacts

string

The artifact information.

{‘test’:{‘image’:‘nginx’}}

changeOrderSummarys

array

List of change order summaries. For details, see The changeOrderSummarys parameter.

creator

string

The creator.

5e706d5503283833284f41c1

gmtCreate

string

The time when the version was created.

2025-07-17T03:53:55.000+00:00

envs

array

List of environments. For details, see The envs parameter.

appOrchestration parameter

Parameter

Type

Description

Example value

storageType

string

The storage type.

BUILTIN

app

object

The application details.

  • creatorId

string

The ID of the application creator.

10df6011-2837-4fdb-ad92-356a679xxxxx

  • description

string

The application description.

for java

  • labelList

array

List of labels. For details, see The labelList parameter.

  • favoured

boolean

Whether the application is a favorite.

false

  • gmtCreate

string

Time when the application was created.

2024-09-01 00:00:00

  • type

string

The application type.

APP

format

string

The format.

MANIFEST

suitableResourceTypes

array[string]

The applicable resource types.

sn

string

The unique serial number.

app-builtin-orchestration-1

revision

object

The orchestration revision information.

  • sha

string

The commit SHA value of the orchestration revision.

c229f22024535638af41838daa43af1e6d4xxxxx

  • message

string

The commit message of the orchestration revision.

3t7cb880d20614038740e00e819dcdb13a3xxxxx

  • author

string

The author of the orchestration revision.

10df6011-2837-4fdb-ad92-356a679xxxxx

  • commitTime

string

The time at which the orchestration revision was committed.

2024-09-01 00:00:00

name

string

The application name.

my-web-app

creatorId

string

The ID of the application creator.

10df6011-2837-4fdb-ad92-356a679xxxxx

gmtCreate

string

The time the application was created.

2024-09-01 00:00:00

modifierId

string

The ID of the last modifier.

app-builtin-modifier-id

gmtModified

string

The time the resource was last modified.

2024-09-01 00:00:00

description

string

The application description.

for java

type

string

The orchestration type.

AppBuiltInOrchestration

labelPolicy

string

The label policy.

NONE

labelList

array

List of labels. For details, see The labelList parameter.

syncSourceTemplate

object

The source template for orchestration synchronization.

placeholderList

array

List of placeholders.

  • description

string

The placeholder description.

Memory limit

  • name

string

The name of the placeholder.

memoryLimit

  • overridable

boolean

Whether the placeholder can be modified during deployment.

true

  • predefined

boolean

Indicates whether the placeholder is predefined.

false

  • rsType

string

Applicable deployment architecture. Valid values: KUBERNETES and HOST.

KUBERNETES

  • rule

string

The optional validation rule for the placeholder value.

  • type

string

The type of the placeholder. Valid values: string, number, boolean, float, and object.

string

  • value

string

The value of the placeholder.

1024Mi

  • valueSource

string

The source of the placeholder's value. Valid values: CONSTANT, VARIABLE, and NULL.

CONSTANT

componentList

array

List of components.

  • content

string

The component's content, in the Go text/template format.

—\napiVersion: v1\nkind: Service\nmetadata:\n name: prod-sidecar-test-{{ .AppStack.envName }}\n # Namespace configuration:\n # It is recommended to use a different Kubernetes namespace for each environment to achieve isolation.\n # During deployment, the placeholder {{ .Values.namespace }} is replaced with the configured namespace value.\n namespace: {{ .Values.namespace }}\nspec:\n selector:\n run: prod-sidecar-test-{{ .AppStack.envName }}\n ports:\n - protocol: TCP\n port: 80\n targetPort: 8080

  • description

string

The description of the component.

Example description

  • kind

string

Component type. For Kubernetes, this corresponds to the object's kind.

Service

  • name

string

The name of the component.

demo-service

  • priority

integer

The priority of the component, starting from 1. During deployment, components are deployed in ascending order of priority.

1

  • type

string

Applicable deployment architecture. Valid values: KUBERNETES and HOST.

KUBERNETES

groupNameMap

object

changeOrderSummarys parameter

Parameter

Type

Description

Example value

sn

string

The unique identifier of the change order.

bc62b3e953714aa8be431f47b9cxxxxx

name

string

The name of the change order.

20241008171130-deployment

state

string

The state of the change order. Possible values: INIT, PREPARING, RUNNING, SUSPENDED, CANCELED, SUCCESS, and FAILED.

SUCCESS

type

string

The type of the change order. Possible values: Deploy, Scale, Rollback, and Destroy.

Deploy

envs parameter

Parameter

Type

Description

Example value

deployGroupName

string

The deployment group name.

deploy-group-name

displayName

string

The display name of the environment.

test-display-name

labelList

array

List of labels. For details, see The labelList parameter.

labelList parameter

Parameter

Type

Description

Example value

displayName

string

The display name of the label. Used for descriptive purposes only.

Test Label Key

displayValue

string

The display value of the label. This is for descriptive purposes and is not used for matching.

Test Label Value

extraMap

object

A map for extended label attributes, allowing you to store custom fields.

map[]

name

string

The name of the label. It can contain only lowercase letters, digits, and hyphens (-), and must start and end with a letter or digit.

demo-label

namespace

string

The namespace that defines the label's scope.

default

value

string

The value of the label. It can contain only lowercase letters, digits, and hyphens (-), and must start and end with a letter or digit.

demo-label-value

Response example

{
    "total": 88,
    "current": 1,
    "pageSize": 1,
    "pages": 88,
    "records": [
        {
            "version": "20250717115350-021",
            "appOrchestration": {
                "storageType": "BUILTIN",
                "app": {
                    "name": "huaihu-k8s-test",
                    "description": "This application was created on 2025-04-29.",
                    "labelList": [],
                    "favoured": false,
                    "creatorId": "5e706d5503283833284f41c1",
                    "gmtCreate": "2025-04-29T08:37:44.000+00:00",
                    "type": "APP"
                },
                "format": "MANIFEST",
                "suitableResourceTypes": [
                    "KUBERNETES"
                ],
                "sn": "huaihu-k8s-test@KUBERNETES",
                "revision": {
                    "sha": "ecff6bebc255b6506cd75a3c3689539ec5463155",
                    "message": "Update K8s orchestration",
                    "author": "5e706d5503283833284f41c1",
                    "commitTime": "2025-06-27T10:08:23.932+00:00"
                },
                "name": "huaihu-k8s-test",
                "creatorId": "5e706d5503283833284f41c1",
                "gmtCreate": "2025-06-27T10:08:24.000+00:00",
                "modifierId": "5e706d5503283833284f41c1",
                "gmtModified": "2025-06-27T10:08:24.000+00:00",
                "description": null,
                "type": "AppBuiltInOrchestration",
                "labelPolicy": "FROM_LABEL_BINDING",
                "labelList": [
                    {
                        "namespace": "default",
                        "name": "envType",
                        "value": "dev",
                        "displayName": "Environment Level",
                        "displayValue": "Development environment",
                        "extraMap": {}
                    },
                    {
                        "namespace": "default",
                        "name": "envType",
                        "value": "test",
                        "displayName": "Environment Level",
                        "displayValue": "Testing environment",
                        "extraMap": {}
                    },
                    {
                        "namespace": "default",
                        "name": "envType",
                        "value": "prepub",
                        "displayName": "Environment Level",
                        "displayValue": "Staging environment",
                        "extraMap": {}
                    },
                    {
                        "namespace": "default",
                        "name": "envType",
                        "value": "production",
                        "displayName": "Environment Level",
                        "displayValue": "Production environment",
                        "extraMap": {}
                    }
                ],
                "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-deployment",
                        "kind": "Deployment",
                        "description": "stateless application",
                        "content": "---\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: huaihu-k8s-test-{{ .AppStack.envName }}\n  labels:\n    run: huaihu-k8s-test-{{ .AppStack.envName }}\n  # Namespace configuration:\n  # Use different Kubernetes namespaces for each environment to ensure isolation.\n  # During deployment, Alibaba Cloud DevOps replaces the {{ .Values.namespace }} placeholder with the configured value.\n  namespace: {{ .Values.namespace }}\nspec:\n  strategy:\n    rollingUpdate:\n      maxSurge: 20%\n      maxUnavailable: 0%\n    type: RollingUpdate\n  replicas: 2\n  selector:\n    matchLabels:\n      run: huaihu-k8s-test-{{ .AppStack.envName }}\n  template:\n    metadata:\n      labels:\n        run: huaihu-k8s-test-{{ .AppStack.envName }}\n    spec:\n      containers:\n        - name: main\n          readinessProbe:\n            exec:\n              command:\n                - echo\n                - hello\n            failureThreshold: 3\n            initialDelaySeconds: 30\n            periodSeconds: 10\n            successThreshold: 1\n            timeoutSeconds: 1\n          # Image configuration:\n          # Enter an image address manually when creating a deployment, or use build artifacts from an upstream pipeline.\n          # You can also add more image placeholders to support multi-container scenarios, such as Sidecars and InitContainers.\n          image: {{ .AppStack.image.backend }}\n          # Port configuration:\n          ports:\n            - containerPort: 8080\n          # Resource specification configuration:\n          # If different environments require different CPU or memory resources, you can define placeholders and use them with variable groups.\n          # For example, if you use 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": 1,
                        "type": "KUBERNETES"
                    }
                ],
                "groupNameMap": {}
            },
            "artifacts": {
                "k8s-test": {
                    "image.backend": "anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/nginx:1.14.1-8.6"
                }
            },
            "changeOrderSummarys": [
                {
                    "sn": "25d37df408584f13a85ba03a4caf7f5b",
                    "name": "20250717115349-Deployment",
                    "state": "SUCCESS",
                    "type": "Deploy"
                }
            ],
            "creator": "5e706d5503283833284f41c1",
            "gmtCreate": "2025-07-17T03:53:55.000+00:00",
            "envs": [
                {
                    "name": "k8s-test",
                    "displayName": "k8s-test",
                    "deployGroupName": "yufa-ceshi",
                    "labelList": [
                        {
                            "namespace": "default",
                            "name": "envType",
                            "value": "dev",
                            "displayName": "Environment Level",
                            "displayValue": "Development environment",
                            "extraMap": {}
                        }
                    ]
                }
            ]
        }
    ]
}

Error codes

For API error codes, see the Error Code Center.