How to manage an SQL Database database
Learn how to create, list, and delete databases from SQL Database using the Azion REST API.
SQL Database allows you to create and manage relational databases. This guide covers how to create, list, and delete a database using the Azion API.
go to SQL Database referenceAfter creating a database, read How to create an SQL Database query to populate your database.
Creating a database
Run the following POST request in your terminal, replacing [TOKEN VALUE] with your personal token and name with the desired database name to create a new database:
You should receive the following response:
Listing all databases
Run the following GET request in your terminal, replacing [TOKEN VALUE] with your personal token:
You should receive the following response:
This endpoint lists all the databases created in your account.
Listing a specific database
Run the following GET request in your terminal, replacing [TOKEN VALUE] with your personal token and {id_database} with the specific id of the database you’ve retrived in the GET all request:
You should receive the following response:
This endpoint lists only the information regarding the specific database whose ID you’ve provided.
Deleting a database
Run the following DELETE request in your terminal, replacing [TOKEN VALUE] with your personal token and {id_database} with the ID of the database you want to delete: