Updated on 2024-11-06 GMT+08:00

Querying Details About a Release Package

Function

This API is used to query details about a release package.

URI

  • URI format

    GET /v2/{project_id}/factory/release-packages/{package_id}

  • Parameter description
    Table 1 URI parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID. For details about how to obtain a project ID, see Project ID and Account ID.

    package_id

    Yes

    String

    Release package ID. For details about how to obtain the value, see the response parameter package_id in the "Querying Release Packages" API.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

workspace

No

String

Workspace ID

  • If this parameter is not set, data in the default workspace is queried by default.
  • To query data in other workspaces, this header must be carried.

X-Auth-Token

No

String

This parameter is mandatory for token authentication. The length of a user token must meet the following requirements:

Minimum length: 0

Maximum length: 4096

Content-Type

No

String

This parameter is mandatory if the body is available. If the body is unavailable, you do not need to set and verify this parameter.

Example: Content-Type: application/json;charset=UTF-8

Authorization

No

String

This field is mandatory for AK/SK authentication.

Host

No

String

This field is mandatory for AK/SK authentication.

Response Parameters

Table 3 Parameter description

Parameter

Mandatory

Type

Description

release_package

Yes

object

Release package details. For details, see Table 4.

task_details

Yes

array[object]

Release task details. For details, see Table 5.

Table 4 Parameters in release package details

Parameter

Mandatory

Type

Description

apply_timestamp

No

Long

Application time. The value is a 13-digit timestamp.

apply_user_id

No

String

Applicant ID

apply_user_name

No

String

Applicant name

delete_flag

No

integer

Whether to delete the package

0: It will not be deleted.

1: It will be deleted.

deploy_status

No

integer

Release status

1: to be reviewed

2: successful

3: failed

5: being released

deploy_timestamp

No

Long

Release time. Its value is a 13-digit timestamp.

deploy_user_id

No

String

Deployer ID

deploy_user_name

No

String

Deployer name

package_approvers

No

array[object]

Release package review information. For details, see Table 6.

package_id

No

String

Release package ID

package_name

No

String

Release package name

project_id

No

String

Project ID and workspace information in the following format: Project ID-workspace-Workspace ID

workspace_id

No

String

ID of the workspace where the release package is located

Table 5 Parameters in release task details

Parameter

Mandatory

Type

Description

deploy_status

No

integer

Release status

1: to be reviewed

2: successful

3: failed

5: being released

deployed_version

No

integer

Released node version

item_name

No

String

Release task name

pending_item_id

No

String

Release task ID

pending_version

No

integer

Current node version

script_id

No

String

Script ID

task_id

No

String

Job ID

start_job_status

No

integer

Job start status

2: successful

3: failed

submit_timestamp

No

Long

Submission time, which is a 13-digit timestamp

submit_user_id

No

String

Submitter ID

submit_user_name

No

String

Submitter name

task_type

No

integer

Task type

1: job

2: script

3: resource

update_type

No

integer

Change type. The default value is 1.

1: adding

2: modification

3: deletion

Table 6 Release package review parameters

Parameter

Mandatory

Type

Description

user_id

No

String

ID of the release package reviewer

user_name

No

String

Name of the release package reviewer

Example Request

GET /v2/62099355b894428e8916573ae635f1f9/factory/release-packages/1

Example Response

  • Success response

    HTTP status code 200

    {
        "release_package": {
            "apply_timestamp": 1700288912934,
            "apply_user_id": "7b71e498e75d44048c9a22dd3c54f978",
            "apply_user_name": "ei_dlf_l00341563",
            "delete_flag": 0,
            "deploy_status": 3,
            "deploy_timestamp": 1700289155129,
            "deploy_user_id": "7b71e498e75d44048c9a22dd3c54f978",
            "deploy_user_name": "ei_dlf_l00341563",
            "package_approvers": [
                {
                    "user_id": "7b71e498e75d44048c9a22dd3c54f978",
                    "user_name": "ei_dlf_l00341563"
                }
            ],
            "package_id": "4",
            "package_name": "ads_supplier_inventory_info__ads_supplier_inventory_info_20231118143537",
            "project_id": "62099355b894428e8916573ae635f1f9-workspace-45be704b28cb4f25a39221169fd3e27e",
            "workspace_id": "45be704b28cb4f25a39221169fd3e27e"
        },
        "task_details": [
            {
                "deploy_status": 3,
                "deployed_version": 0,
                "item_name": "ads_supplier_inventory_info__ads_supplier_inventory_info",
                "pending_item_id": "19",
                "pending_version": 1,
                "script_id": "ff808081899c04fa01899fc39cf61baa",
                "submit_timestamp": 1690602544380,
                "submit_user_id": "7b71e498e75d44048c9a22dd3c54f978",
                "submit_user_name": "ei_dlf_l00341563",
                "task_type": 2,
                "update_type": 1
            }
        ]
    }
  • Failure response

    HTTP status code 400

    {
        "error_code": "DLF.3051",
        "error_msg": "The request parameter is invalid.  "
    }