Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: qinweiwei <qinweiwei@huawei.com> Co-committed-by: qinweiwei <qinweiwei@huawei.com>
9.8 KiB
Obtaining the Status of a CFW Task
Function
This API is used to obtain the status of a CFW task.
URI
GET /v3/{project_id}/jobs/{job_id}
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Project ID, which can be obtained by calling an API or from the console. For details, see Obtaining a Project ID. |
job_id |
Yes |
String |
Task ID returned when a pay-per-use firewall is created. You can obtain the task ID by calling the API for creating a firewall. Its value is obtained from job_id in the return value. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. You can obtain the token by referring to Obtaining a User Token. |
Content-Type |
Yes |
String |
Content type. It can only be set to application/json. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
data |
Data returned for creating a pay-per-use firewall. |
Parameter |
Type |
Description |
|---|---|---|
id |
String |
ID of the task for creating a pay-per-use firewall. |
status |
String |
Task execution status, which indicates whether a firewall is successfully created. Enumeration values:
|
begin_time |
String |
Creation time in the "yyyy-mm-ddThh:mm:ssZ" format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800. |
end_time |
String |
End time in the "yyyy-mm-ddThh:mm:ssZ" format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800. |
Example Requests
Obtain information about the f588ce71-e26c-400d-8981-f854355f6849 task for creating a pay-per-use firewall in project 09bb24e6fe80d23d2fa2c010b53b418c.
https://{Endpoint}/v3/09bb24e6fe80d23d2fa2c010b53b418c/jobs/f588ce71-e26c-400d-8981-f854355f6849
Example Responses
Status code: 200
Return value of the API for obtaining the information about a pay-per-use firewall creation task.
{
"data" : {
"begin_time" : "2023-11-14 10:10:27 +0800",
"end_time" : "2023-11-14 10:15:46 +0800",
"id" : "7517d932-8e79-4273-a001-ceff74e121f7",
"status" : "Success"
}
}
Status Codes
Status Code |
Description |
|---|---|
200 |
Return value of the API for obtaining the information about a pay-per-use firewall creation task. |
Error Codes
See Error Codes.