Querying the Resource Task List
Function
This API is used to query the resource task list.
Calling Method
For details, see Calling APIs.
URI
GET /v5/{project_id}/vpn-gateways/jobs
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| project_id | String | Yes | Specifies a project ID. You can obtain the project ID by referring to Obtaining the Project ID. |
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| resource_id | String | No | Specifies a resource ID. |
Request
Response
- Response parameters
Returned status code 200: successful query
Table 3 Parameters in the response body Parameter
Type
Description
jobs
Array of Job objects
Specifies task information.
request_id
String
Specifies a request ID.
Table 4 Job Parameter
Type
Description
id
String
- Specifies a task ID.
- The value is a UUID containing 36 characters.
resource_id
String
- Specifies a VPN gateway resource ID.
- The value is a UUID containing 36 characters.
job_type
String
- Specifies a task type.
- The value can be upgrade or rollback.
created_at
String
- Specifies the creation time.
- The UTC time format is yyyy-MM-ddTHH:mm:ss.SSSZ.
finished_at
String
- Specifies the end time.
- The UTC time format is yyyy-MM-ddTHH:mm:ss.SSSZ.
Table 5 SubJob Parameter
Type
Description
id
String
- Specifies a task ID.
- The value is a UUID containing 36 characters.
job_type
String
- Specifies a task type.
- Value range:
- prepare_resource
- upgrade_worker_1
- upgrade_worker_2
status
String
- Specifies the task status.
- Value range:
- init: initializing
- upgrading: The upgrade is in progress.
- success: The upgrade is successful.
- fail: The upgrade fails.
created_at
String
- Specifies the creation time.
- The UTC time format is yyyy-MM-ddTHH:mm:ss.SSSZ.
finished_at
String
- Specifies the end time.
- The UTC time format is yyyy-MM-ddTHH:mm:ss.SSSZ.
error_message
String
- Indicates error information.
- Example response
{ "request_id": "8dfd314d50caab38ccc40e4df2213eda", "jobs": [ { "id": "e3be04c3-0b62-45d8-b1dc-f4785c96412e", "resource_id": "b3eb2b86-2a6d-41f2-835f-879021764b84", "job_type": "upgrade", "status": "success", "created_at": "2025-06-04T03:29:01.855Z", "finished_at": "2025-06-04T03:29:33.085Z", "sub_jobs": [ { "id": "80c103ab-61b9-4e74-8e47-fd78ac6177eb", "job_type": "prepare_resource", "status": "success", "created_at": "2025-06-04T11:28:01.926+08:00", "finished_at": "2025-06-04T11:29:03.993+08:00", "error_message": "" }, { "id": "b035cd1c-b9f4-4b05-b9af-b8fcf75eae6a", "job_type": "upgrade_worker_1", "status": "success", "created_at": "2025-06-04T11:29:01.926+08:00", "finished_at": "2025-06-04T11:29:14.993+08:00", "error_message": "" }, { "id": "db3dabe1-60a0-45ff-91b7-735aff90a3dd", "job_type": "upgrade_worker_2", "status": "success", "created_at": "2025-06-04T11:29:01.931+08:00", "finished_at": "2025-06-04T11:29:33.037+08:00", "error_message": "" } ] } ] }
Status Codes
For details, see Status Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.