Skip to content

Commit

Permalink
DOC-3871 RS: Add missing filename option & examples to import DB REST…
Browse files Browse the repository at this point in the history
… API references
  • Loading branch information
rrelledge committed Dec 20, 2024
1 parent 97bb16a commit eb41f3b
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Any additional required parameters may differ based on the import location type.
|----------|------|-------------|
| access_key_id | string | The AWS Access Key ID with access to the bucket |
| bucket_name | string | S3 bucket name |
| filename | string | RDB filename, including the file extension. |
| region_name | string | Amazon S3 region name (optional) |
| secret_access_key | string | The AWS Secret Access that matches the Access Key ID |
| subdir | string | Path to the backup directory in the S3 bucket (optional) |
Expand All @@ -72,6 +73,7 @@ Any additional required parameters may differ based on the import location type.
| bucket_name | string | Cloud Storage bucket name |
| client_email | string | Email address for the Cloud Storage client ID |
| client_id | string | Cloud Storage client ID with access to the Cloud Storage bucket |
| filename | string | RDB filename, including the file extension. |
| private_key | string | Private key for the Cloud Storage matching the private key ID |
| private_key_id | string | Cloud Storage private key ID with access to the Cloud Storage bucket |
| subdir | string | Path to the backup directory in the Cloud Storage bucket (optional) |
Expand All @@ -83,6 +85,7 @@ Any additional required parameters may differ based on the import location type.
| account_key | string | Access key for the storage account |
| account_name | string | Storage account name with access to the container |
| container | string | Blob Storage container name |
| filename | string | RDB filename, including the file extension. |
| sas_token | string | Token to authenticate with shared access signature |
| subdir | string | Path to the backup directory in the Blob Storage container (optional) |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ The request _may_ contain a subset of the [BDB JSON object]({{< relref "/operate
Other attributes are not allowed and will cause the request to fail.
{{</note>}}

##### Example JSON Body
##### Example JSON body

General example:

```json
{
Expand All @@ -84,6 +86,85 @@ Other attributes are not allowed and will cause the request to fail.

This request initiates an import process using `dataset_import_sources` values that were previously configured for the database.

FTP example:

```json
{
"dataset_import_sources": [
{
"type": "url",
"url": "ftp://<ftp_user>:<ftp_password>@example.com/<path>/<filename>.rdb.gz"
}
]
}
```

SFTP example:

```json
{
"dataset_import_sources": [
{
"type": "sftp",
"sftp_url": "sftp://<sftp_user>@example.com/<path>/<filename>.rdb"
}
]
}
```

AWS S3 example:

```json
{
"dataset_import_sources": [
{
"type": "s3",
"bucket_name": "backups",
"subdir": "test-db",
"filename": "<filename>.rdb",
"access_key_id": "XXXXXXXXXXXXX",
"secret_access_key": "XXXXXXXXXXXXXXXX"
}
]
}
```

Google Cloud Storage example:

```json
{
"dataset_import_sources": [
{
"type": "gs",
"bucket_name": "backups",
"client_id": "XXXXXXXX",
"client_email": "[email protected]",
"subdir": "test-db",
"filename": "<filename>.rdb",
"private_key_id": "XXXXXXXXXXXXX",
"private_key": "XXXXXXXXXXXXXXXX"
}
]
}
```

Azure Blob Storage example:

```json
{
"dataset_import_sources": [
{
"type": "abs",
"container": "backups",
"subdir": "test-db",
"filename": "<filename>.rdb",
"account_name": "name",
"account_key": "XXXXXXXXXXXXXXXX" // Or you can use "sas_token": "XXXXXXXXXXXXXXXXXX" instead
}
]
}
```

### Response {#post-response}

Returns a status code.
Expand Down

0 comments on commit eb41f3b

Please sign in to comment.