Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions content/operate/rc/api/examples/audit-system-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
31 changes: 8 additions & 23 deletions content/operate/rc/api/examples/back-up-and-import-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
{{</note>}}

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/<subscriptionId>/databases/<databaseId>/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:

Expand All @@ -51,27 +48,15 @@ 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/<subscriptionId>/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]|
|Google Blob Storage|google-blob-storage|gs://bucketname/[path/]filename.rdb[.gz]|
|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.
4 changes: 2 additions & 2 deletions content/operate/rc/api/examples/dryrun-cost-estimates.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 |
Expand Down
Loading