Help Center/ ServiceStage/ API Reference/ Historical APIs/ Managing Pipelines/ Querying Pipeline Environment Details
Updated on 2026-04-10 GMT+08:00

Querying Pipeline Environment Details

Function

This API is used to query the pipeline environment.

URI

GET /cpepipeline/v2/environments/{environment_id}

Table 1 Path parameter

Parameter

Mandatory

Type

Description

environment_id

Yes

String

Build job instance ID. See Creating a Pipeline Environment.

Request

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Message body type (format). Default value: application/json;charset=utf8.

X-Auth-Token

Yes

String

API calling can be authenticated using a token or AK/SK. If you use a token, this parameter is mandatory and must be set to the token. For details about how to obtain a token, see Obtaining a User Token.

Response

Table 3 Response parameters

Parameter

Type

Description

id

String

Environment ID.

name

String

Environment name.

creator

String

Environment creator.

revisor

String

Environment saver.

created_at

Integer

Creation time.

updated_at

Integer

Update time.

status

Integer

Environment status.

project_id

String

Project ID.

detail

String

Environment details. For details, see Table 4.

Table 4 detail

Parameter

Type

Description

name

String

Environment name.

tasks

String

Environment task. For details, see Table 5.

Table 5 tasks

Parameter

Type

Description

id

Integer

Task ID.

name

String

Task name.

displayName

String

Display name of a task.

input

Object

Task input parameter. For details, see Table 7.

status

Integer

Task status.

errorDetails

String

Task error information.

stageName

String

Stage type.

taskTypeId

Object

Task type. For details, see Table 6.

Table 6 taskTypeId

Parameter

Type

Description

category

String

Task directory.

owner

String

Task owner.

provider

String

Task provider.

type

String

Task type.

Table 7 input

Parameter

Type

Description

instanceId

String

Component instance ID.

appName

String

Component name.

modifiedPath

String

Product path.

version

String

Modified version.

Example Response

{
    "id": "805f7ec2-7c05-417b-bc3e-5f6035edb673",
    "name": "Environment-894g",
    "creator": "servicestage_iam5",
    "revisor": "servicestage_iam5",
    "created_at": 1753165301070,
    "updated_at": 1753165301070,
    "status": 0,
    "project_id": "59336be373624a998b2527fdb9913266",
    "detail": {
        "name": "Environment-894g",
        "tasks": [
            {
                "id": 0,
                "name": "Deploy",
                "displayName": "Deploy",
                "taskTypeId": {
                    "category": "Deploy",
                    "owner": "System",
                    "provider": "ENV-CAS",
                    "type": null
                },
                "input": {
                    "instanceId": "20acd377-0659-478c-b563-c2585166278e",
                    "appName": "ghy-test-0707-1-2",
                    "modifiedPath": "{\"ghy-test-0707-1-2\":\"${Artifacts_ghy-test-comp-0626-3-62e353_Output_release@PublishBuildImage}\"}",
                    "version": "1.0.0"
                },
                "output": {},
                "status": null,
                "skipped": false
            }
        ]
    }
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

404

Not Found

500

Internal Server Error

Error Codes

See ServiceStage Error Codes.