Querying Export Tasks
Function
This API is used to query export tasks.
URI
GET /v5/{project_id}/export-task/{task_id}
Parameter | Mandatory | Type | Description |
---|---|---|---|
task_id | Yes | String | Task ID. |
project_id | Yes | String | Project ID. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
enterprise_project_id | No | String | Enterprise project ID. |
Request Parameters
Parameter | Mandatory | Type | Description |
---|---|---|---|
X-Auth-Token | Yes | String | User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
region | Yes | String | Region Id |
Response Parameters
Status code: 200
Parameter | Type | Description |
---|---|---|
task_id | String | Task ID. |
task_name | String | Task ID. |
task_status | String | Specifies the export task status. The value can be success, failure, or running. |
file_id | String | File ID. |
file_name | String | File name. |
Example Requests
Query the ID, status, and name of an export task based on the task_id.
GET https://{endpoint}/v5/{project_id}/export-task/{task_id}?enterprise_project_id=all_granted_eps
Example Responses
Status code: 200
Request succeeded.
{"task_id" : "94ad7efb-xxxxx-46ed-99bf-dcd8c1c75dc2","task_name" : "vul_vul_xxxxxxx_export_task","task_status" : "success","file_id" : "b3e83d25-d92f-4963-a293-e056e81ec44d","file_name" : "hss-vul-vul-zh-xxxxxxxx.zip"}
Status Codes
Status Code | Description |
---|---|
200 | Request succeeded. |
Error Codes
See Error Codes.
- URI