Querying Pipeline Environment Details
Function
This API is used to query the pipeline environment.
URI
GET /cpepipeline/v2/environments/{environment_id}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| environment_id | Yes | String | Build job instance ID. See Creating a Pipeline Environment. |
Request
| 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
| 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. |
| Parameter | Type | Description |
|---|---|---|
| name | String | Environment name. |
| tasks | String | Environment task. For details, see Table 5. |
| 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. |
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
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot