Skip to content

Commit 0965c7a

Browse files
committed
add links part 1
1 parent cc0ec73 commit 0965c7a

File tree

2 files changed

+39
-6
lines changed

2 files changed

+39
-6
lines changed

content/operate/rc/api/examples/create-database.md

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,48 @@ You can use the Redis Cloud REST API to create and manage databases.
1414

1515
## Redis Cloud Essentials
1616

17-
To create a Redis Cloud Essentials database, use
17+
### Create an Essentials database
18+
19+
To create a Redis Cloud Essentials database, use [`POST /fixed/subscriptions/{subscriptionId}/databases`]({{< relref "/operate/rc/api/api-reference#tag/Databases-Essentials/operation/createFixedDatabase" >}}).
20+
21+
This call creates a database in the specified subscription. Use [`GET /fixed/subscriptions`]({{< relref "/operate/rc/api/api-reference#tag/Subscriptions-Essentials/operation/getAllSubscriptions_1" >}}) to get a list of Essentials subscriptions and their IDs.
22+
23+
```shell
24+
POST "https://[host]/v1/fixed/subscriptions/{subscriptionId}/databases"
25+
{
26+
"name": "Basic-essentials-database-example"
27+
}
28+
```
29+
30+
This example JSON body contains only the most basic, required parameters in order to create a database:
31+
32+
- `name`: The database name. A unique name per subscription that can contain only alphanumeric characters and hyphens
33+
34+
There are other additional parameters and settings that can be defined on database creation. Review the database parameters and options in the [full API reference]({{< relref "/operate/rc/api/api-reference#tag/Databases-Essentials/operation/createFixedDatabase" >}}).
35+
36+
Some options may not be compatible with your selected plan. Use [`GET /fixed/subscriptions/{subscriptionId}`]({{< relref "/operate/rc/api/api-reference#tag/Subscriptions-Essentials/operation/getFixedSubscriptionsPlansBySubscriptionId" >}}) to view the plan you have selected and what options it supports.
37+
38+
The response body contains the `taskId` for the task that creates the database. You can use [`GET /v1/tasks/{taskId}`]({{< relref "/operate/rc/api/api-reference#tag/Tasks/operation/getTaskById" >}}) to track the task's status.
39+
40+
### Update an Essentials database
41+
42+
To update a Redis Cloud Essentials database, use [`PUT /fixed/subscriptions/{subscriptionId}/databases/{databaseId}`]({{< relref "/operate/rc/api/api-reference#ADD-TAG" >}}).
43+
44+
The primary component of a database update request is the JSON request body that contains the details of the requested database changes. You can see the full set of changes you can make in the [full API reference]({{< relref "/operate/rc/api/api-reference#tag/Databases-Essentials/operation/deleteFixedDatabaseByID" >}}).
45+
46+
Some options may not be compatible with your selected plan. Use [`GET /fixed/subscriptions/{subscriptionId}`]({{< relref "/operate/rc/api/api-reference#tag/Subscriptions-Essentials/operation/getFixedSubscriptionsPlansBySubscriptionId" >}}) to view the plan you have selected and what options it supports.
47+
48+
The response body contains the `taskId` for the task that updates the database. You can use [`GET /v1/tasks/{taskId}`]({{< relref "/operate/rc/api/api-reference#tag/Tasks/operation/getTaskById" >}}) to track the task's status.
1849

1950
## Redis Cloud Pro
2051

21-
### Create a Redis Cloud Pro database
52+
### Create a Pro database
53+
54+
If you want to create a Pro database in a new subscription, see [Create a Pro subscription]({{< relref "/operate/rc/api/examples/manage-subscriptions#create-a-pro-subscription" >}}).
2255

23-
To create a Redis Cloud Pro database, use `POST /subscriptions/{subscriptionId}/databases`.
56+
To create a Redis Cloud Pro database in an existing subscription, use [`POST /subscriptions/{subscriptionId}/databases`]({{< relref "/operate/rc/api/api-reference#ADD-TAG" >}}).
2457

25-
This call creates a database in the specified subscription. Use `GET /subscriptions` to get a list of subscriptions and their IDs.
58+
This call creates a database in the specified subscription. Use [`GET /subscriptions`]({{< relref "/operate/rc/api/api-reference#ADD-TAG" >}}) to get a list of subscriptions and their IDs.
2659

2760
```shell
2861
POST "https://[host]/v1/subscriptions/{subscriptionId}/databases"
@@ -43,7 +76,7 @@ The response body contains the `taskId` for the task that creates the database.
4376

4477
### Update a Redis Cloud Pro database
4578

46-
To update a Redis Cloud Pro database, use `PUT /subscriptions/{subscriptionId}/databases/{databaseId}`.
79+
To update a Redis Cloud Pro database, use [`PUT /subscriptions/{subscriptionId}/databases/{databaseId}`]({{< relref "/operate/rc/api/api-reference#ADD-TAG" >}}).
4780

4881
The primary component of a database update request is the JSON request body that contains the details of the requested database changes. You can see the full set of changes you can make in the [full API reference]({{< relref "/operate/rc/api/api-reference#tag/Databases-Pro/operation/updateDatabase" >}}).
4982

content/operate/rc/api/examples/manage-subscriptions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Modify the following parameters in the sample JSON document to create a subscrip
3838

3939
Use [`GET /v1/fixed/plans`]({{< relref "/operate/rc/api/api-reference#tag/Subscriptions-Essentials/operation/getAllFixedSubscriptionsPlans" >}}) to get a list of plan IDs.
4040

41-
After you create an Essentials subscription, you must use the [`POST /v1/fixed/subscriptions/{subscriptionId}/databases`]({{< relref "/operate/rc/api/api-reference#tag/Databases-Essentials/operation/createFixedDatabase" >}}) endpoint to create the database.
41+
After you create an Essentials subscription, you must use the [`POST /v1/fixed/subscriptions/{subscriptionId}/databases`]({{< relref "/operate/rc/api/api-reference#tag/Databases-Essentials/operation/createFixedDatabase" >}}) endpoint to [create the database]({{< relref "/operate/rc/api/examples/create-database#redis-cloud-essentials" >}}).
4242

4343
You can include the contents of the JSON document in the `POST /v1/fixed/subscriptions` operation in the [Swagger UI](https://api.redislabs.com/v1/swagger-ui.html). See [Swagger user interface]({{< relref "/operate/rc/api/get-started/use-rest-api#swagger-user-interface" >}}) for more details.
4444

0 commit comments

Comments
 (0)