Report this

What is the reason for this report?

Snapshots API should list only snapshots?

Posted on June 28, 2017

I got only 5 snapshots in dashboard which is correct but API…

curl -X GET "https://api.digitalocean.com/v2/snapshots?page=1&per_page=100" \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json"

…list me 67 snapshots for some reason. I think API list all image instead of 5 snapshots.

Any hint? Thanks.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

The /v2/snapshots endpoint can be used to list and act on snapshots for both Droplets and block storage volumes. To limit the output to Droplets snapshots only, add this query string to the call: ?resource_type=droplet

curl -X GET "https://api.digitalocean.com/v2/snapshots?resource_type=droplet&page=1&per_page=100" \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json"

If you have automated backups enabled, they will also be shown.

It’s working as expected for me. So if you’re still experiencing issues, please go ahead and open a support ticket directly through the control panel. As they will be able to view the resources on your account, they should have better insight here.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.