Can spaces be created and destroyed via the API?

December 12, 2018 480 views
API

Hi, I want to be able to create spaces (and occasionally destroy them) via the API. Is this possible?

1 Answer

When we launched Spaces, we decided to start by offering an S3-compatible API. That way Spaces users could take advantage of all the existing the tools and libraries out there in the ecosystem. So the Spaces API is documented separately from the rest of the DO API. You can find the docs here. In most cases, using Spaces with an existing S3 library just requires configuring the endpoint value to be ${REGION}.digitaloceanspaces.com There are a number of example in different languages in this question:

How to use DigitalOcean Spaces with the AWS S3 SDKs?

You could also script this using an S3 compatible cli like s3cmd or rclone.

by Justin Ellingwood
DigitalOcean Spaces is an object storage service designed to make it easy and cost effective to store and serve large amounts of data. If you have previously relied on other object storage services, migrating data to Spaces may be one of your first tasks. In this guide, we...
Have another answer? Share your knowledge.