From cb5d9d1c3a5e73766d3a27b96ac658395d179966 Mon Sep 17 00:00:00 2001 From: Cameron Bates Date: Mon, 13 Jan 2025 13:22:22 -0500 Subject: [PATCH 1/2] RC API: Minor fixes to least-viewed example pages --- .../rc/api/examples/audit-system-logs.md | 11 ++----- .../api/examples/back-up-and-import-data.md | 31 +++++-------------- .../rc/api/examples/dryrun-cost-estimates.md | 4 +-- 3 files changed, 12 insertions(+), 34 deletions(-) diff --git a/content/operate/rc/api/examples/audit-system-logs.md b/content/operate/rc/api/examples/audit-system-logs.md index e585e540d8..827bc3d60a 100644 --- a/content/operate/rc/api/examples/audit-system-logs.md +++ b/content/operate/rc/api/examples/audit-system-logs.md @@ -16,16 +16,9 @@ To view the log, sign in to the [Redis Cloud console](https://cloud.redis.io/) a To learn more, see [System logs]({{< relref "/operate/rc/logs-reports/system-logs" >}}). +## Get system logs via REST API -### System log REST API - -The REST API operation for querying the system service log is `GET /logs`. - -For example, the following request returns the latest 100 system log entries, in descending order: - -```shell -GET "https://[host]/v1/logs?limit=100&offset=0" -``` +The REST API operation for querying the system service log is [`GET /logs`]({{< relref "/operate/rc/api/api-reference#tag/Account/operation/getAccountSystemLogs" >}}). The `/logs` API operation accepts the following parameters: diff --git a/content/operate/rc/api/examples/back-up-and-import-data.md b/content/operate/rc/api/examples/back-up-and-import-data.md index 1a7a19715b..0c2f824721 100644 --- a/content/operate/rc/api/examples/back-up-and-import-data.md +++ b/content/operate/rc/api/examples/back-up-and-import-data.md @@ -21,22 +21,19 @@ This parameter enables periodic and on-demand backup operations for the specifie The number of database backups that can run simultaneously on a cluster is limited to 4 by default. {{}} -The API operation for on-demand backups is `POST /subscriptions/{subscriptionId}/databases/{databaseId}/backup`. +For Redis Cloud Pro databases, back up a database with [`POST /subscriptions/{subscriptionId}/databases/{databaseId}/backup`]({{< relref "/operate/rc/api/api-reference#tag/Databases-Pro/operation/backupDatabase" >}}). For Redis Cloud Essentials databases, use [`POST /fixed/subscriptions/{subscriptionId}/databases/{databaseId}/backup`]({{< relref "/operate/rc/api/api-reference#tag/Databases-Essentials/operation/backupDatabase_1" >}}). On-demand database backup is an [asynchronous operation]({{< relref "/operate/rc/api/get-started/process-lifecycle" >}}). -```shell -POST "https://[host]/v1/subscriptions//databases//backup" -``` +The backup database API does not require a body. Instead, the `periodicBackupPath` must be set to a valid path with available storage capacity to store the backup files for the specific database. You can set an `adhocBackupPath` in the body to specify a different backup location for this backup. -The backup database API does not require a body. -Instead, the `periodicBackupPath` must be set to a valid path with available storage capacity to store the backup files for the specific database. +See [Set up backup storage locations]({{< relref "/operate/rc/databases/back-up-data#set-up-backup-storage-locations" >}}) to learn how to configure your backup storage locations. -## Import a database +## Import data to a database You can import data into an existing database from multiple storage sources, including AWS S3, Redis, and FTP. Database import is an [asynchronous operation]({{< relref "/operate/rc/api/get-started/process-lifecycle" >}}). -The API operation for performing on-demand backup is `POST /v1/subscriptions/{subscriptionId}/databases/{databaseId}/import`. +Use [`POST /v1/subscriptions/{subscriptionId}/databases/{databaseId}/import`]({{< relref "/operate/rc/api/api-reference#tag/Databases-Pro/operation/importDatabase" >}}) to import data to an existing Redis Cloud Pro database. For Redis Cloud Essentials databases, use [`POST /fixed/subscriptions/{subscriptionId}/databases/{databaseId}/backup`]({{< relref "/operate/rc/api/api-reference#tag/Databases-Essentials/operation/backupDatabase_1" >}}) The requirements for data import are: @@ -51,23 +48,9 @@ The duration of the import process depends on the amount of data imported and th Data imported into an existing database overwrites any existing data. {{< /warning >}} -To import the data, run: - -```shell -POST "https://[host]/v1/subscriptions//databases/{databaseId}/import" \ -{ - "sourceType": "aws-s3", - "importFromUri": [ - "s3://bucketname/filename-dbForAWSBackup-1_of_3.rdb.gz", - "s3://bucketname/filename-dbForAWSBackup-2_of_3.rdb.gz", - "s3://bucketname/filename-dbForAWSBackup-3_of_3.rdb.gz" - ] -} -``` - You can specify the backup location with the `sourceType` and `importFromUri` values for these sources: -|Data location|sourceType|importFromUri| +|Data location|`sourceType`|`importFromUri`| |---|---|---| |Amazon AWS S3|aws-s3|s3://bucketname/[path/]filename.rdb[.gz]| |FTP|ftp|ftp://[username][:password]@[:port]/[path/]filename.rdb[.gz]| @@ -75,3 +58,5 @@ You can specify the backup location with the `sourceType` and `importFromUri` va |Microsoft Azure Blob Storage|azure-blob-storage|abs://:storage_account_access_key@storage_account_name/[container/]filename.rdb[.gz]| |Redis server|redis|redis://[db_password]@[host]:[port]| |Web server|HTTP|HTTP://[username][:password]@[:port]/[path/]filename.rdb[.gz]| + +See [Import data]({{< relref "/operate/rc/databases/import-data" >}}) to learn how to set up your storage locations for data import. diff --git a/content/operate/rc/api/examples/dryrun-cost-estimates.md b/content/operate/rc/api/examples/dryrun-cost-estimates.md index 3d1343cdb6..0b3b283c3f 100644 --- a/content/operate/rc/api/examples/dryrun-cost-estimates.md +++ b/content/operate/rc/api/examples/dryrun-cost-estimates.md @@ -20,7 +20,7 @@ With a **dry-run request**, you can evaluate the impact and obtain a new cost es API operations that support dry-run requests accept the `dryRun` boolean parameter in the JSON request body. -For example, the JSON body of a create subscription request body can include the `dryRun=true` parameter: +For example, the JSON body of a create subscription request body can include `"dryRun": true`: ```json @@ -55,7 +55,7 @@ For example, the JSON body of a create subscription request body can include the Dry-run requests behave like regular requests except that no changes are made to existing resources. A dry-run request produces a cost evaluation report for the subscription. -| API Operation | `dryRun=false` (default) | `dryRun=true` | +| API Operation | `"dryRun": false` (default) | `"dryRun": true` | |---|---|---| | **Create subscription** | Create a subscription | Returns a cost evaluation report of the planned subscription | | **Create database** | Creates a new database in the subscription | Returns a cost evaluation report for the relevant subscription | From 44b60ba3646a3de05aee4422883a87d6215bcf01 Mon Sep 17 00:00:00 2001 From: Cameron Bates <102550101+cmilesb@users.noreply.github.com> Date: Tue, 14 Jan 2025 09:52:30 -0500 Subject: [PATCH 2/2] Update content/operate/rc/api/examples/back-up-and-import-data.md --- content/operate/rc/api/examples/back-up-and-import-data.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/operate/rc/api/examples/back-up-and-import-data.md b/content/operate/rc/api/examples/back-up-and-import-data.md index 0c2f824721..a9b18b3c4c 100644 --- a/content/operate/rc/api/examples/back-up-and-import-data.md +++ b/content/operate/rc/api/examples/back-up-and-import-data.md @@ -33,7 +33,7 @@ See [Set up backup storage locations]({{< relref "/operate/rc/databases/back-up- You can import data into an existing database from multiple storage sources, including AWS S3, Redis, and FTP. Database import is an [asynchronous operation]({{< relref "/operate/rc/api/get-started/process-lifecycle" >}}). -Use [`POST /v1/subscriptions/{subscriptionId}/databases/{databaseId}/import`]({{< relref "/operate/rc/api/api-reference#tag/Databases-Pro/operation/importDatabase" >}}) to import data to an existing Redis Cloud Pro database. For Redis Cloud Essentials databases, use [`POST /fixed/subscriptions/{subscriptionId}/databases/{databaseId}/backup`]({{< relref "/operate/rc/api/api-reference#tag/Databases-Essentials/operation/backupDatabase_1" >}}) +Use [`POST /v1/subscriptions/{subscriptionId}/databases/{databaseId}/import`]({{< relref "/operate/rc/api/api-reference#tag/Databases-Pro/operation/importDatabase" >}}) to import data to an existing Redis Cloud Pro database. For Redis Cloud Essentials databases, use [`POST /fixed/subscriptions/{subscriptionId}/databases/{databaseId}/backup`]({{< relref "/operate/rc/api/api-reference#tag/Databases-Essentials/operation/importDatabase_1" >}}) The requirements for data import are: