You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/operate/rc/api/examples/create-database.md
+9-13Lines changed: 9 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -7,43 +7,39 @@ categories:
7
7
- rc
8
8
description: This article describes how to create and manage a database using `cURL`
9
9
commands.
10
-
linkTitle: Create databases
10
+
linkTitle: Create and manage databases
11
11
weight: 20
12
12
---
13
13
14
-
You can use the Redis Cloud REST API to create databases.
14
+
You can use the Redis Cloud REST API to create and manage databases.
15
15
16
-
These examples use the [`cURL` utility]({{< relref "/operate/rc/api/get-started/use-rest-api#use-the-curl-http-client" >}}). You can use any REST client to work with the Redis Cloud REST API. The examples in this article refer to Redis Cloud Pro databases.
16
+
## Redis Cloud Essentials
17
17
18
-
## Create a database
18
+
## Redis Cloud Pro
19
19
20
-
To create a database, use `POST /subscriptions/{subscription-id}/databases`
20
+
### Create a Redis Cloud Pro database
21
21
22
-
The database is created in an existing or a newly created subscription.
22
+
To create a Redis Cloud Pro database, use `POST /subscriptions/{subscriptionId}/databases`.
23
23
24
-
When a subscription is created, it is created with at least one database.
25
-
26
-
You can add databases to the subscription; you can also update or delete existing databases.
24
+
This call creates a database in the specified subscription. Use `GET /subscriptions` to get a list of subscriptions and their IDs.
27
25
28
26
Creating a database is an [asynchronous operation]({{< relref "/operate/rc/api/get-started/process-lifecycle" >}}).
29
27
30
28
The following API call creates a database.
31
29
32
30
```shell
33
-
POST "https://[host]/v1/subscriptions/$SUBSCRIPTION_ID/databases"
31
+
POST "https://[host]/v1/subscriptions/{subscriptionId}/databases"
34
32
{
35
33
"name": "Database-example-basic",
36
34
"memoryLimitInGb": 10,
37
35
"password": "P@ssw0rd"
38
36
}
39
37
```
40
38
41
-
The JSON body contains only the most basic, required parameters in order to create a database:
39
+
The example JSON body contains only the most basic, required parameters in order to create a database:
42
40
43
41
- Database name - A unique name per subscription that can contain only alphanumeric characters and hyphens
44
42
- Maximum database size in GB
45
43
- Database password
46
44
47
-
### Additional database parameters
48
-
49
45
There are many additional parameters and settings that can be defined on database creation. Review the database parameters and options in the [Full API documentation]({{< relref "/operate/rc/api/api-reference#tag/Databases-Pro/operation/createDatabase" >}}).
0 commit comments