Droplet snapshot action should return image id
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.
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!
I was thinking that for snapshot resource_id could be id the of the snapshot, not the id of the droplet.
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.
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.
Related request on UserVoice:
https://digitalocean.uservoice.com/forums/136585-digitalocean/suggestions/6920826-return-snapshot-id-when-creating-via-api
It's this necessary.
It is very bad to have to list all the images to know the last one that was created.
i'd just add a reaction, but it's 6 years later. i think a comment is warranted. fix yo stuff, digitalocean