-
Notifications
You must be signed in to change notification settings - Fork 6
Api reference provider images
mtaylor edited this page Apr 11, 2013
·
2 revisions
curl -X POST --header "Accept: application/xml" --header \
"Content-Type: application/xml" http://localhost:3000/tim/provider_images --data \
"<provider_image>
<target_image id='1' />
</provider_image>"
HTTP Status Code: 201
<provider_image href='http://localhost:3000/tim/provider_images/85' id='85'>
<provider>Amazon EC2</provider>
<external_image_id>ami-123456</external_image_id>
<snapshot>false</snapshot>
<status>NEW</status>
<status_detail></status_detail>
<progress>0</progress>
<target_image href='http://localhost:3000/tim/target_images/1' id='1'></target_image>
</provider_image>
curl --header "Accept: application/xml" http://localhost:3000/tim/provider_images/1
HTTP Status Code: 200
<provider_image href='http://localhost:3000/tim/provider_images/85' id='85'>
<provider>Amazon EC2</provider>
<external_image_id>ami-123456</external_image_id>
<snapshot>false</snapshot>
<status>NEW</status>
<status_detail></status_detail>
<progress>0</progress>
<target_image href='http://localhost:3000/tim/target_images/1' id='1'></target_image>
</provider_image>
curl --header "Accept: application/xml" http://localhost:3000/tim/provider_images
HTTP Status Code: 200
<provider_images>
<provider_image href='http://localhost:3000/tim/provider_images/1' id='1'></provider_image>
<provider_image href='http://localhost:3000/tim/provider_images/2' id='2'></provider_image>
<provider_image href='http://localhost:3000/tim/provider_images/3' id='3'></provider_image>
</provider_image>
curl -X DELETE --header "Accept: application/xml" http://localhost:3000/tim/provider_images/1
HTTP Status Code: 204
curl -X PUT --header "Accept: application/xml" --header \
"Content-Type: application/xml" http://localhost:3000/tim/provider_images/2 --data \
"<provider_image>
<target_image id='3'></target_image>
</provider_image>"
HTTP Status Code: 204
<provider_image href='http://localhost:3000/tim/provider_images/84' id='84'>
<provider></provider>
<external_image_id></external_image_id>
<snapshot></snapshot>
<status></status>
<status_detail></status_detail>
<progress></progress>
<target_image href='http://localhost:3000/tim/target_images/3' id='3'></target_image>
</provider_image>