This API is used to query the execution status of a task.
After a task, such as creating a BMS or attaching disks, is delivered, job_id is returned, based on which you can query the execution status of the task.
GET /v1/{project_id}/jobs/{job_id}
Table 1 lists the parameters.
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Specifies the project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
job_id |
Yes |
Specifies the task ID. |
Parameter |
Type |
Description |
---|---|---|
status |
String |
Specifies the task status.
|
entities |
Object |
Specifies the task object. For details, see Table 2. The displayed information varies depending on the task type. For operations related to BMSs, server_id is displayed. For operations related to NICs, nic_id is displayed. If subtasks exist, details about the subtasks are also displayed. |
job_id |
String |
Specifies the task ID. |
job_type |
String |
Specifies the task type. The value can be:
|
begin_time |
String |
Specifies the time when the job started. The timestamp format is ISO 8601, for example, 2019-04-25T20:04:47.591Z. |
end_time |
String |
Specifies the time when the job ended. The timestamp format is ISO 8601, for example, 2019-04-26T20:04:47.591Z. |
error_code |
String |
Specifies the error code returned upon a task execution failure. |
fail_reason |
String |
Specifies the cause of a task execution failure. |
message |
String |
Specifies the message returned when an error occurs. |
code |
String |
Specifies the error code returned when an error occurs. For details about error codes, see section Status Codes. |
Parameter |
Type |
Description |
---|---|---|
sub_jobs_total |
Integer |
Specifies the number of subtasks. If the task has no subtasks, the value of this parameter is 0. |
sub_jobs |
Array of objects |
Specifies the execution information about a subtask. If the task has no subtasks, the value of this parameter is left blank. For details, see Table 3. |
Parameter |
Type |
Description |
---|---|---|
status |
String |
Specifies the task status.
|
entities |
Array of objects |
Specifies the task object. The displayed information varies depending on the task type. For operations related to BMSs, server_id is displayed. For operations related to NICs, nic_id is displayed. For details, see Table 4. |
job_id |
String |
Specifies the task ID. |
job_type |
String |
Specifies the task type. The value can be:
|
begin_time |
String |
Specifies the time when the job started. The timestamp format is ISO 8601, for example, 2019-04-25T20:04:47.591Z. |
end_time |
String |
Specifies the time when the job ended. The timestamp format is ISO 8601, for example, 2019-04-26T20:04:47.591Z. |
error_code |
String |
Specifies the error code returned upon a task execution failure. |
fail_reason |
String |
Specifies the cause of a task execution failure. |
message |
String |
Specifies the message returned when an error occurs. |
code |
String |
Specifies the error code returned when an error occurs. For details about error codes, see section Status Codes. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | { "status": "SUCCESS", "entities": { "sub_jobs_total": 1, "sub_jobs": [ { "status": "SUCCESS", "entities": { "server_id": "bae51750-0089-41a1-9b18-5c777978ff6d" }, "job_id": "2c9eb2c5544cbf6101544f0635672b60", "job_type": "baremetalSingleCreate", "begin_time": "2019-04-25T20:04:47.591Z", "end_time": "2019-04-25T20:08:21.328Z", "error_code": null, "fail_reason": null } ] }, "job_id": "2c9eb2c5544cbf6101544f0602af2b4f", "job_type": "baremetalBatchCreate", "begin_time": "2019-04-25T20:04:34.604Z", "end_time": "2019-04-25T20:08:41.593Z", "error_code": null, "fail_reason": null } |
Returned Values |
Description |
---|---|
200 |
The request has been successfully processed. |
For details about other returned values, see Status Codes.
See Error Codes.