ListChangeOrdersByOrigin - Query deployments by creation source

Updated at:

Applicable versions

Central Edition, Region Edition

Endpoint and authorization information

  • Obtain the endpoint. Use the endpoint to replace {domain} in the API request syntax.
  • Obtain a personal access token.
  • Obtain the organizationId. Required only for the Central Edition. You can obtain the organization ID from the Basic Information page in the Tenant Management console.

Product

Resource

Required permission

Application Delivery

Deployment

read-only

Request syntax

Central Edition

GET https://{domain}/oapi/v1/appstack/organizations/{organizationId}/changeOrders:byOrigin

Region Edition

GET https://{domain}/oapi/v1/appstack/changeOrders:byOrigin

Request headers

Parameter

Type

Required

Description

Example value

x-yunxiao-token

string

Yes

The personal access token.

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

Request parameters

Parameter

Type

Position

Required

Description

Example value

originType

string

query

Yes

The type of the creation source.

FLOW

originId

string

query

Yes

The identity of the creation source.

If originType is FLOW, the format of originId is pipelineId+pipelineRunId, such as 123+1. Note that the plus sign (+) must be URL-encoded as %2B.

appName

string

query

No

The application name.

my-web-service

envName

string

query

No

The environment name.

dev

organizationId

string

path

  • Yes: Central Edition

  • No: Region Edition

The organization ID.

ec766e63aee3437d9a51f334d6exe671

Request examples

Central Edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/appstack/organizations/ec766e63aee3437d9a51f334d6exe671/changeOrders:byOrigin?originType=FLOW&originId=If originType is FLOW, the format of originId is pipelineId+pipelineRunId, such as 123+1. Note: The + character must be URL-encoded as %2B.&appName=my-web-service&envName=dev' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region Edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/appstack/changeOrders:byOrigin?originType=FLOW&originId=If%20originType%20is%20FLOW%2C%20the%20format%20of%20originId%20is%20pipelineId%2BpipelineRunId%2C%20such%20as%20123%2B1.%20Note%20that%20the%20plus%20sign%20(%2B)%20must%20be%20URL-encoded%20as%20%252B&appName=my-web-service&envName=dev' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example value

-

array

-

object

creator

string

The creator.

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

description

string

The description.

Normal release for daily requirements

endedAt

string

The time when the deployment ended.

2024-10-08T09:11:38Z

gmtCreate

string

The time when the deployment was last modified.

2024-10-08T09:11:38Z

jobs

array

A list of environment deployments.

-

object

Summary information of an environment deployment.

envName

string

The environment name.

sn

string

The job ticket number.

state

string

The job status.

name

string

The deployment name.

20241008171130-Deploy

sn

string

The unique identity of the deployment.

bc62b3e953714aa8be431f47b9c9b72a

startedAt

string

The time when the deployment started.

2024-10-08T09:11:38Z

state

string

The deployment status. Possible values: INIT, PREPARING, RUNNING, SUSPENDED, CANCELED, SUCCESS, and FAILED.

Operation type: RUNNING-running, SUSPENDED-paused, CANCELED-canceled, FAILED-failed, SUCCESS-successful

type

string

The deployment type. Possible values: Deploy, Scale, Rollback, and Destroy.

Operation type: Deploy-deploy, Scale-scale, Rollback-rollback, Destroy-destroy

version

string

The version used.

20241008171130-762

Response example

[
    {
        "creator": "10df6011-2837-4fdb-ad92-356a679a60ca",
        "description": "Normal release for daily requirements",
        "endedAt": "2024-10-08T09:11:38Z",
        "gmtCreate": "2024-10-08T09:11:38Z",
        "jobs": [
            {
                "envName": "",
                "sn": "",
                "state": ""
            }
        ],
        "name": "20241008171130-Deploy",
        "sn": "bc62b3e953714aa8be431f47b9c9b72a",
        "startedAt": "2024-10-08T09:11:38Z",
        "state": "Operation type: RUNNING-running, SUSPENDED-paused, CANCELED-canceled, FAILED-failed, SUCCESS-successful",
        "type": "Operation type: Deploy-deploy, Scale-scale, Rollback-rollback, Destroy-destroy",
        "version": "20241008171130-762"
    }
]

Error codes

For more information, see the Error Code Center.