List image copy jobs¶
Overview¶
Lists details for image copy jobs.
Classification¶
- List
API Operation Object¶
- jobs
Synchronous / Asynchronous¶
- synchronous
Request¶
HTTP Request Method¶
- GET
HTTP Request Path¶
{api_endpoint}/v2/extension/image_replicator/jobs
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>"
},
<<repeat>>
]
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
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>"
},
<<repeat>>
]
Execution Example¶
HTTP Request¶
GET /v2/extension/image_replicator/jobs
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:37:20 GMT
Content-Length: 7149
Connection: close
Content-Type: application/json; charset=UTF-8
[{"copy_progress": 0, "destination_image_id": null, "destination_region_id": "ot1", "destination_tenant_id": "236ae314ef6944f4ab98fa7519e54325", "job_id": "0fa2817d-4e54-455d-a676-c78e863297e9", "source_image_id": "335eef3f-551d-46e1-8781-173f43209d48", "source_image_name": "Test-image-Ubuntu", "source_region_id": "ot1", "source_tenant_id": "236ae314ef6944f4ab98fa7519e54325", "status": "replicate_requested"}, {"copy_progress": 0, "destination_image_id": null, "destination_region_id": "ot1", "destination_tenant_id": "236ae314ef6944f4ab98fa7519e54325", "job_id": "adcdc7cc-1f0d-4f97-8ef4-c90fc6977938", "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"}, {"copy_progress": 0, "destination_image_id": null, "destination_region_id": "ot2", "destination_tenant_id": "91b5c7c09cbd45caa3c146fd67ae471e", "job_id": "4dc8acbb-7ddd-4ef9-98e6-9c12d5003381", "source_image_id": "9b805919-8acb-4880-8904-cd2f9a32c1ad", "source_image_name": "Test-image-CentOS", "source_region_id": "ot1", "source_tenant_id": "236ae314ef6944f4ab98fa7519e54325", "status": "cancel_requested"}]
Error Execution Example¶
HTTP Request¶
GET /v2/extension/image_replicator/jobs 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:47:51 GMT
Content-Length: 44
Vary: X-Auth-Token
Connection: close
Content-Type: text/plain; charset=UTF-8
401 Unauthorized
Authentication required.