GetChangeRequestAuditItems - List approval items for a change request

Updated at:

Applicable versions

Central Edition, Region Edition

Endpoints and authorization information

  • Get an endpoint: Replace {domain} in the API request syntax.
  • Get a personal access token.
  • Obtain the organizationId: Required only for the Central Edition. Go to the Basic Information page in the Organization Management console to obtain the organization ID.

Product

Resource

Required permission

Application Delivery

Change

read-only

Request syntax

Central Edition

GET https://{domain}/oapi/v1/appstack/organizations/{organizationId}/apps/{appName}/changeRequests/{sn}/auditItems

Region Edition

GET https://{domain}/oapi/v1/appstack/apps/{appName}/changeRequests/{sn}/auditItems

Request header

Parameter

Type

Required

Description

Example

x-yunxiao-token

string

Yes

A personal access token.

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

Request parameters

Parameter

Type

Position

Required

Description

Example

appName

string

path

Yes

The application name.

my-web-service

sn

string

path

Yes

You can modify the identifier.

f1e78f22428e4e2496a01691812a17af

refType

string

query

Yes

The association type.

CR

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/apps/my-web-service/changeRequests/f1e78f22428e4e2496a01691812a17af/auditItems?refType=CR' \
  -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/changeRequests/f1e78f22428e4e2496a01691812a17af/auditItems?refType=CR' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters 1

Parameter

Type

Description

Example

-

array

-

object

A code review approval item.

auditOrderSn

string

The approval form number.

4d6697f2376940aa889fbe9f3b7b8da7

commitId

string

The code commit ID.

c229f22024535638af41838daa43af1e6d468116

crId

string

The change ID.

cr-123

operatorId

string

The ID of the user who submitted the code.

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

refSn

string

The identifier of the object associated with the approval.

refType

string

The type of the object associated with the approval.

sourceVersion

string

The version of the source branch.

sha-123

state

string

The approval state.

SUCCESS

targetVersion

string

The version of the target branch.

sha-456

type

string

The approval type.

CODE_REVIEW

url

string

The URL of the code commit.

http://www.aliyun.....

Response parameters 2

Parameter

Type

Description

Example

-

array

-

object

A code security approval item.

auditOrderSn

string

The approval form number.

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

commitDate

string

The submission time.

2024-09-01 00:00:00

commitEmployeeId

string

The user who submitted the request.

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

commitMsg

string

The submission message.

fix unit test

crId

string

The change ID.

cr-123

refSn

string

The identifier of the object associated with the approval.

refType

string

The type of the object associated with the approval.

state

string

The approval state.

SUCCESS

type

string

The approval type.

CODE_SPLC

Response example 1

[
    {
        "auditOrderSn": "4d6697f2376940aa889fbe9f3b7b8da7",
        "commitId": "c229f22024535638af41838daa43af1e6d468116",
        "crId": "cr-123",
        "operatorId": "10df6011-2837-4fdb-ad92-356a679a60ca",
        "refSn": "",
        "refType": "",
        "sourceVersion": "sha-123",
        "state": "SUCCESS",
        "targetVersion": "sha-456",
        "type": "CODE_REVIEW",
        "url": "http://www.aliyun....."
    }
]

Response example 2

[
    {
        "auditOrderSn": "10df6011-2837-4fui-ad92-356a679a60ca",
        "commitDate": "2024-09-01 00:00:00",
        "commitEmployeeId": "10df6011-2837-4fdb-ad92-356a679a60ca",
        "commitMsg": "fix unit test",
        "crId": "cr-123",
        "refSn": "",
        "refType": "",
        "state": "SUCCESS",
        "type": "CODE_SPLC"
    }
]

Error codes

For a list of API error codes, see the Error Code Center.