Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jira DOC-407: RC Reorg the REST API docs. #1310

Merged
merged 11 commits into from
Apr 30, 2021
37 changes: 25 additions & 12 deletions content/rc/api/_index.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
---
Title: REST API
Title: Redis Enterprise Cloud REST API
linkTitle: REST API
description: Describes the Redis Cloud REST API and links to additional info
weight: 80
alwaysopen: false
categories: ["RC"]
aliases: /rv/api/
/rc/api/
/rc/api/_index.md
---

The [Redis Cloud REST API](https://api.redislabs.com/v1/swagger-ui.html) helps you manage your Redis Cloud subscription programmatically.

The [Redis Enterprise Cloud REST API](https://api.redislabs.com/v1/swagger-ui.html) helps you manage your Redis Cloud subscription programmatically.

You can use the API to:

Expand All @@ -25,15 +27,26 @@ The Redis Cloud REST API is available only with Flexible or Annual subscriptions

## Getting started

1. [Enable the API]({{< relref "/rc/api/how-to/enable-your-account-to-use-api.md" >}})
1. [Authenticate and authorize]({{< relref "/rc/api/concepts/authentication-and-authorization.md" >}})
1. [Create API keys]({{< relref "/rc/api/how-to/create-api-keys-for-your-team.md" >}})
1. [Use the API]({{< relref "/rc/api/how-to/using-curl.md" >}})
1. [Learn the API lifecycle]({{< relref "/rc/api/concepts/provisioning-lifecycle.md" >}})
1. [Create and manage subscriptions]({{< relref "/rc/api/how-to/create-and-manage-subscriptions.md" >}})

1. [Enable the API]({{< relref "/rc/api/get-started/enable-the-api.md" >}})
1. [Authenticate and authorize]({{< relref "/rc/api/get-started/_index.md" >}})
1. [Create API keys]({{< relref "/rc/api/get-started/manage-api-keys.md" >}})
1. [Use the API]({{< relref "/rc/api/get-started/use-rest-api.md" >}})
1. [Learn the API lifecycle]({{< relref "/rc/api/get-started/process-lifecycle.md" >}})
1. [Create and manage subscriptions]({{< relref "/rc/api/examples/manage-subscriptions.md" >}})

## Examples

1. [Manage subscriptions]({{< relref "/rc/api/examples/manage-subscriptions.md" >}})
1. Database examples
1. [Create database]({{< relref "/rc/api/examples/create-database.md" >}})
1. [Update database]({{< relref "/rc/api/examples/update-database.md" >}})
1. [Back up and import data]({{< relref "/rc/api/examples/back-up-and-import-data.md" >}})
1. [Manage cloud accounts]({{< relref "/rc/api/examples/manage-cloud-accounts.md" >}})
1. [Estimate costs]({{< relref "/rc/api/examples/dryrun-cost-estimates.md" >}})
1. [View account info]({{< relref "/rc/api/examples/view-account-information.md" >}})

## More info

- Use the [Redis Cloud API]({{< relref "/rc/api/how-to/using-curl.md" >}})
- Use the [Redis Cloud API]({{< relref "/rc/api/get-started/use-rest-api.md" >}})
- [Full API Reference](https://api.redislabs.com/v1/swagger-ui.html)
- Secure [authentication and authorization]({{< relref "/rc/api/concepts/authentication-and-authorization.md" >}})
- Secure [authentication and authorization]({{< relref "/rc/api/get-started/_index.md" >}})
9 changes: 0 additions & 9 deletions content/rc/api/concepts/_index.md

This file was deleted.

8 changes: 0 additions & 8 deletions content/rc/api/concepts/usage-quota-and-throttling.md

This file was deleted.

17 changes: 17 additions & 0 deletions content/rc/api/examples/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
Title: REST API Examples
description: These examples show how to use the API and the results to expect.
linkTitle: "Examples"
weight: 30
alwaysopen: false
categories: ["RC"]
aliases: /rv/api/how-to/
/rc/api/how-to/
/rc/api/how-to/_index.md
/rc/api/examples/
/rc/api/examples/_index.md
/rv/api/concepts/
/rc/api/concepts/
/rc/api/concepts/_index.md
---
{{< allchildren style="h2" description="true" />}}
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
---
Title: Auditing using System Log
description: Using the Redis Labs system log to track and audit actions performed in the account
weight: 100
weight: 60
alwaysopen: false
categories: ["RC"]
aliases: /rv/api/how-to/view-auditing-using-system-log/
/rc/api/how-to/view-auditing-using-system-log/
/rc/api/how-to/view-auditing-using-system-log.md
/rc/examples/audit-system-logs/
/rc/api/examples/audit-system-logs.md
---
The Redis Labs system log collects and reports on actions performed on various entities in the account. These entities include the account itself, users, API Keys, subscriptions, databases, accounts, payment methods and more. For each entity, various lifecycle events are logged in the system log.
System logs collect and report actions performed on various entities in your Redis Enterprise Cloud subscription. These entities include the account itself, users, API Keys, subscriptions, databases, accounts, payment methods and more. For each entity, various lifecycle events are logged in the system log.

You can view the system log in the Redis Cloud admin console by selecting `Menu` and then `System Log`. This will display the system log entries for the current account.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
---
Title: Databases Backup and Import
Title: Database backup and import
description: When you create or update a database, you can specify the backup path.
The import API operation lets you import data from various source types and specified locations.
weight: 72
weight: 40
alwaysopen: false
categories: ["RC"]
aliases: /rv/api/how-to/backup-and-import-databases/
/rc/api/how-to/backup-and-import-databases/
/rc/api/how-to/backup-and-import-databases.md
/rc/api/examples/back-up-and-import-data/
/rc/api/examples/back-up-and-import-data.md
---

## Backup a database
## Back up a database

When you create or update a database, you can specify the (optional) `periodicBackupPath` parameter
When you create or update a database in a Flexible or Anual account, you can specify the (optional) `periodicBackupPath` parameter
with a [backup path](/rv/administration/configuration/backups/).
This parameter enables periodic and on-demand backup operations for the specified database.

The API operation for on-demand backups is `POST /subscriptions/{subscriptionId}/databases/{databaseId}/backup`.
On-demand database backup is an [asynchronous operation]({{< relref "/rc/api/concepts/provisioning-lifecycle#asynchronous-operations" >}})".
On-demand database backup is an [asynchronous operation]
({{< relref "/rc/api/get-started/process-lifecycle.md#asynchronous-operations" >}})".

### Prerequisites for backups

Expand All @@ -37,7 +42,7 @@ Instead, the `periodicBackupPath` must be set to a valid path with available sto
## Import a database

You can import data into an existing database from multiple storage sources, including AWS S3, Redis, FTP.
Database import is an [asynchronous operation]({{< relref "/rc/api/concepts/provisioning-lifecycle#asynchronous-operations" >}})".
Database import is an [asynchronous operation]({{< relref "/rc/api/get-started/process-lifecycle.md#asynchronous-operations" >}})".

The API operation for performing on-demand backup is `POST /subscriptions/{subscriptionId}/databases/{databaseId}/import`.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,41 @@
---
Title: Create and manage Databases
Title: Create and manage databases
description: This article describes how to create and manage a database using `cURL` commands.
weight: 70
linkTitle: Create databases
weight: 20
alwaysopen: false
categories: ["RC"]
aliases: /rv/api/how-to/create-and-manage-databases/
/rc/api/how-to/create-and-manage-databases/
/rc/api/how-to/create-and-manage-databases.md
/rc/api/examples/create-database
/rc/api/examples/create-database.md
---
You can use `cURL` commands to create and manage a cloud account
with the [CURL HTTP client]({{< relref "/rc/api/how-to/using-curl#using-the-curl-http-client" >}}).

You can use the Redis Enterprise Cloud REST API to create databases.

These examples use the [`cURL` utility]({{< relref "/rc/api/get-started/use-rest-api.md#using-the-curl-http-client" >}}); you can use any REST client to work with the Redis Cloud REST API.

## Create a database

The API operation that creates a database is: `POST /subscriptions/{subscription-id}/databases`
To create a database use `POST /subscriptions/{subscription-id}/databases`

The database is created in an existing or a newly-created subscription.

The database is created in an existing or a newly created subscription.
When a subscription is created, it is created with at least one database.
You can add more databases to the subscription, and you can update or delete existing databases.

Creating a database is an [asynchronous operation]({{< relref "/rc/api/concepts/provisioning-lifecycle#asynchronous-operations" >}}).
You can add databases to the subscription; you can also update or delete existing databases.

The following Linux shell script sends a `POST /subscriptions/{subscription-id}/databases` and waits for a cloud account ID.
When the cloud account ID is received, the processing phase is complete and the provisioning phase starts.
Creating a database is an [asynchronous operation]({{< relref "/rc/api/get-started/process-lifecycle.md#asynchronous-operations" >}}).

The following Linux shell script sends a `POST /subscriptions/{subscription-id}/databases` and waits for a cloud account ID. When the cloud account ID is received, the processing phase is complete and the provisioning phase starts.

### Prerequisites

- Install `jq` on your machine: `sudo apt install jq`
- These example require `jq`, [a JSON parser](https://stedolan.github.io/jq/).

Use your package manager to install it (Example: `sudo apt install jq`)

- Define the expected variables needed to use the API:

```shell
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
---
Title: Evaluating Cost Before Deployment
Title: Estimate cost
description: How to evaluate the cost of a specific subscription or database without changing existing resources.
weight: 65
weight: 50
alwaysopen: false
categories: ["RC"]
aliases: /rv/api/how-to/dry-run-cost-evaluations/
/rc/api/how-to/dry-run-cost-evaluations/
/rc/api/how-to/dry-run-cost-evaluations.md
/rc/api/examples/dryrun-cost-estimates/
/rc/api/examples/dryrun-cost-estimates.md
---
When you change your subscriptions and databases you also change the cost of your deployment.
With a **dry-run request**, you can evaluate the impact that subscription and databases changes cause before you deploy these changes:
When you change your subscriptions and databases, you also change the cost of your deployment.
With a **dry-run request**, you can evaluate the impact and obtain a cost estimate ahead of that subscription and databases changes cause before you deploy these changes:

- Create subscription
- Create a database
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
---
Title: Create and Manage Cloud Accounts
description: Cloud accounts specify which account to use when creating and modifying infrastructure resources.
weight: 50
linkTitle: Manage Cloud accounts
weight: 80
alwaysopen: false
categories: ["RC"]
aliases: /rv/api/how-to/create-and-manage-cloud-accounts/
/rc/api/how-to/create-and-manage-cloud-accounts/
/rc/api/how-to/create-and-manage-cloud-accounts.md
/rc/api/examples/managge-cloud-accounts
/rc/api/examples/manage-cloud-accounts.md
---
You can use `cURL` commands to create and manage a cloud account
with the [CURL HTTP client]({{< relref "/rc/api/how-to/using-curl#using-the-curl-http-client" >}}).
You can use the Redis Enterprise Cloud REST API to cloud accounts.

These examples use the [`cURL` utility]({{< relref "/rc/api/get-started/use-rest-api.md#using-the-curl-http-client" >}}); you can use any REST client to work with the Redis Cloud REST API.

## Create a cloud account

The API operation that creates a cloud account is: `POST /cloud-accounts`
To create a cloud account, use: `POST /cloud-accounts`

The following Linux shell script sends a `POST /cloud-accounts` and waits for a cloud account ID.
When the cloud account ID is received, the processing phase runs.
Expand All @@ -20,7 +26,10 @@ When the cloud account ID is received, the processing phase runs.

Before you use the API to create and manage cloud account, you must:

- Install `jq` on your machine: `sudo apt install jq`
- These example require `jq`, [a JSON parser](https://stedolan.github.io/jq/).

Use your package manager to install it (Example: `sudo apt install jq`)

- Define the expected variables needed to use the API:

```shell
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
---
Title: Create and manage Subscriptions
Title: Create and edit subscriptions
description: This article describes how to create and manage a subscription using `cURL` commands.
weight: 60
weight: 10
alwaysopen: false
categories: ["RC"]
aliases: /rv/api/how-to/create-and-manage-subscriptions/
/rc/api/how-to/create-and-manage-subscriptions/
/rc/api/how-to/create-and-manage-subscriptions.md
/rc/api/example/manage-subscriptions/
/rc/api/examples/manage-subscriptions.md
---
You can use `cURL` commands to create and manage a subscriptions
with the [CURL HTTP client]({{< relref "/rc/api/how-to/using-curl#using-the-curl-http-client" >}}).

You can use the Redis Enterprise Cloud REST API to create and manage subscriptions.

These examples use the [`cURL` utility]({{< relref "/rc/api/get-started/use-rest-api.md#using-the-curl-http-client" >}}); you can use any REST client to work with the Redis Cloud REST API.

## Create a subscription

Expand All @@ -18,7 +24,10 @@ When the cloud account ID is received, the processing phase is complete and the

### Prerequisites

- Install `jq` on your machine: `sudo apt install jq`
- These example require `jq`, [a JSON parser](https://stedolan.github.io/jq/).

Use your package manager to install it (Example: `sudo apt install jq`)

- Define the expected variables needed to use the API:

```shell
Expand Down Expand Up @@ -83,7 +92,7 @@ To use the sample JSON document in your own account, you must modify these param

- The JSON document contains 2 primary segments: subscription specification and databases specification.
- When you create a subscription, you must specify one or more databases in the "`databases`" array of the above JSON file.
- You can [copy-and-paste]({{< relref "/rc/api/how-to/using-curl#swagger-user-interface" >}}) the contents of the JSON file into the `POST /subscriptions` operation in the [Swagger UI](https://api.redislabs.com/v1/swagger-ui.html).
- You can [copy-and-paste]({{< relref "/rc/api/get-started/use-rest-api.md#swagger-user-interface" >}}) the contents of the JSON file into the `POST /subscriptions` operation in the [Swagger UI](https://api.redislabs.com/v1/swagger-ui.html).

{{< note >}}
The Swagger UI generates default JSON examples for `POST` and `PUT` operations. You can reference these examples and modify them to fit your specific needs and account settings. The examples will fail if used as-is.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
---
Title: Metrics and usage statistics
description: Metrics API provides programmatic access to database usage and performance data
Title: Request performance metrics
description: The metrics API provides programmatic access to database usage and performance data
weight: 40
alwaysopen: false
categories: ["RC"]
draft: true
---
Metrics API provides programmatic access to database usage and performance data.
The metrics API shows data that similar to the data that the Redis Cloud admin console shows in the database metrics.
The REST API provides programmatic access to database usage and performance metrics.

It provides data similar to that shown in the **Metrics** tab of the **View Database** screen of the admin console.

## Metric spans and intervals

Metrics API data shows the data for the database that you request and the metric span that you request.
The metric span determines the time period for the data points in the metrics API response.
Metric data summarizes performance for a given database over a specific period of time.

The metric span determines the time period for the results in the response.

| Metric Span | Data duration | Data point interval | Data point collection |
|---|---|---|---|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
---
Title: Update Databases
Title: Update databases
description: How to construct requests that update an existing database.
weight: 75
weight: 30
alwaysopen: false
categories: ["RC"]
aliases: /rv/api/how-to/update-databases/
/rc/api/how-to/update-databases/
/rc/api/how-to/update-databases.md
/rc/api/examples/update-database/
/rc/api/examples/update-database.md
---

The API operation that updates an existing database is: `PUT /subscriptions/{subscription-id}/databases/{database-id}`

This API operation uses the same [provisioning lifecycle]({{< relref "/rc/api/concepts/provisioning-lifecycle.md" >}}) as the [create and manage databases]({{< relref "/rc/api/how-to/create-and-manage-databases.md" >}}) operation.
This API operation uses the same [provisioning lifecycle]({{< relref "/rc/api/get-started/process-lifecycle.md" >}}) as the [create database]({{< relref "/rc/api/examples/create-database.md" >}}) operation.

## Database update request JSON body

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 complete set of JSON elements]({{< relref "/rc/api/how-to/using-curl#inputs-for-operations-in-swagger" >}}) accepted by the database update API operation in the [Swagger UI](https://api.redislabs.com/v1/swagger-ui.html).
You can see [the complete set of JSON elements]({{< relref "/rc/api/get-started/use-rest-api.md#inputs-for-operations-in-swagger" >}}) accepted by the database update API operation in the [Swagger UI](https://api.redislabs.com/v1/swagger-ui.html).
To see the JSON elements, expand the specific API operation and, in the request section, click **Model**.

Here are several examples of JSON requests to update a database:
Expand Down
14 changes: 14 additions & 0 deletions content/rc/api/examples/usage-quota-and-throttling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
Title: API usage quota and throttling
description:
weight: 50
alwaysopen: false
categories: ["RC"]
draft: true
---
{{/* This appears to be a stub article that starte but not completed.

It's been moved from /concepts to /examples so that, if/when completed,
it shows up in the right place.

*//}}
Loading