Get image copy job details¶
Overview¶
Get details for a specified image copy job.
Classification¶
- Show
API Operation Object¶
- jobs
Synchronous / Asynchronous¶
- synchronous
Request¶
HTTP Request Method¶
- GET
HTTP Request Path¶
{api_endpoint}/v2/extension/image_replicator/jobs/{job_id}
Response¶
HTTP Response Header¶
Format¶
HTTP/1.1 <response_code> <message> (ex. 200 OK)
<response_code>: see "HTTP Responses" section
<message>: message based on the response code
- skip auto insert field such as "X-Compute-Request-Id" and "Content-Length", "Date"
HTTP Response Body¶
Format¶
{
"copy_progress" : <copy progress>,
"destination_image id" : "<destination image_id>",
"destination_region_id" : "<destination region_id>",
"destination_tenant_id" : "<destination tenant_id>",
"job_id" : "<job_id>",
"source_image id" : "<source image_id>",
"source_image_name" : "<source image_name>",
"source_region_id" : "<source region_id>",
"source_tenant_id" : "<source tenant_id>",
"status" : "<status>"
}
Response Parameter¶
item | format | description |
---|---|---|
job_id | UUID | An identifier job's id for the image copying |
source image_id | UUID | source image_id |
source region_id | UUID | source region_id |
source tenant_id | UUID | source tenant_id |
destination image_id | UUID | destination image_id |
destination region_id | UUID | destination region_id |
destination tenant_id | UUID | destination tenant_id |
status | String (replicate_requested, replicating, replicated, cancel_requested, canceling, canceled, error) | It is status job |
copy progress | integer | Progress of the image copying |
Sample API Request and Response¶
Sample API Request¶
Request URI¶
https://example.com/v2/extension/image_replicator/jobs/{job_id}
Request Header¶
X-Auth-Token: ajk3adjiown02
Request Body¶
- none
Sample API Response¶
Response Header¶
HTTP/1.1 200 OK
<response_code>: see "HTTP Responses" section
<message>: message based on the response code
- skip auto insert field such as "X-Compute-Request-Id" and "Content-Length", "Date"
Response Body¶
{
"copy_progress" : <copy progress>,
"destination_image id" : "<destination image_id>",
"destination_region_id" : "<destination region_id>",
"destination_tenant_id" : "<destination tenant_id>",
"job_id" : "<job_id>",
"source_image id" : "<source image_id>",
"source_image_name" : "<source image_name>",
"source_region_id" : "<source region_id>",
"source_tenant_id" : "<source tenant_id>",
"status" : "<status>"
}
Execution Example¶
HTTP Request¶
GET /v2/extension/image_replicator/jobs/33911588-c299-4369-a240-7e5b741cdb6a
User-Agent: curl/7.35.0
Host: 192.168.56.250:9292
X-Auth-Token: f4328bab05ff4502b397b88657baaefd
HTTP Response¶
HTTP/1.1 200 OK
Date: Fri, 10 Jun 2016 04:34:45 GMT
Content-Length: 426
Connection: close
Content-Type: application/json; charset=UTF-8
{"copy_progress": 0, "destination_image_id": null, "destination_region_id": "ot2", "destination_tenant_id": "91b5c7c09cbd45caa3c146fd67ae471e", "job_id": "33911588-c299-4369-a240-7e5b741cdb6a", "source_image_id": "335eef3f-551d-46e1-8781-173f43209d48", "source_image_name": "Test-image-Ubuntu", "source_region_id": "ot1", "source_tenant_id": "236ae314ef6944f4ab98fa7519e54325", "status": "cancel_requested"}
Error Execution Example¶
HTTP Request¶
GET /v2/extension/image_replicator/jobs/33911588-c299-4369-a240-7e5b741cdb6a HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:9292
HTTP Response¶
HTTP/1.1 401 Unauthorized
Date: Fri, 10 Jun 2016 04:45:28 GMT
Content-Length: 44
Vary: X-Auth-Token
Connection: close
Content-Type: text/plain; charset=UTF-8
401 Unauthorized
Authentication required.