Can spaces be created and destroyed via the API?

  • Posted December 12, 2018
  • API

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


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

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.