api-v2 icon indicating copy to clipboard operation
api-v2 copied to clipboard

Droplet snapshot action should return image id

Open hadley opened this issue 11 years ago • 10 comments

Currently, to find the image you need to retrieve all images and filter to find only those with matching name, then attempt to match the timestamp.

hadley avatar Oct 24 '14 15:10 hadley

You can also get a list of the snapshots for a droplets. That should require lest paginating or filtering. https://developers.digitalocean.com/#retrieve-snapshots-for-a-droplet

It would be a fairly big change to have the droplet actions endpoint return a different JSON structure based on the params the endpoint is called with. I'll add a card to the backlog so we can discuss this more. How would you prefer the information be included into the JSON that is returned from the droplet create action?

Thank you for the feedback!

wwkeyboard avatar Oct 31 '14 18:10 wwkeyboard

I was thinking that for snapshot resource_id could be id the of the snapshot, not the id of the droplet.

hadley avatar Oct 31 '14 18:10 hadley

So I have to say that I actually thought the same thing until yesterday. The resource id and resource type being droplet is slightly confusing.

Returning the ID of the snapshot (image object) in the response is something I think would be very useful. We'll look into this.

bobbytables avatar Oct 31 '14 20:10 bobbytables

We could also return it as a link. Similar, but reversed, on how a droplet create returns the droplet but links to the create action.

brookemckim avatar Nov 01 '14 17:11 brookemckim

Related request on UserVoice:

https://digitalocean.uservoice.com/forums/136585-digitalocean/suggestions/6920826-return-snapshot-id-when-creating-via-api

andrewsomething avatar Jan 05 '15 15:01 andrewsomething

It's this necessary.

It is very bad to have to list all the images to know the last one that was created.

dadeke avatar Jun 26 '17 23:06 dadeke

i'd just add a reaction, but it's 6 years later. i think a comment is warranted. fix yo stuff, digitalocean

sumeet avatar Apr 08 '20 19:04 sumeet