Can spaces be created and destroyed via the API?

Posted December 12, 2018 871 views

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

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.

Submit an Answer
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} 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...