How to create an Edge SQL database

This guide demonstrates how to use Azion Edge SQL to create a new database using the Azion API.

Creating a database

Run the following POST request in your terminal, replacing [TOKEN VALUE] with your personal token and the value of name with the desired database name to create a new database:

Terminal window
curl --location 'https://api.azion.com/v4/edge_sql/databases' \
--header 'Authorization: Token [TOKEN VALUE]' \
--header 'Content-Type: application/json' \
--data '{
"name": "my-database"
}'

You should receive the following response:

{
"state": "pending",
"data": {
"id": 118,
"name": "my-database",
"client_id": "6832h",
"status": "creating",
"created_at": "2024-04-18T11:22:59.468536Z",
"updated_at": "2024-04-18T11:22:59.468586Z",
"deleted_at": null
}
}

Contributors