Skip to content

Commit 74c6e9b

Browse files
authored
DOC-3871 RS: Add missing filename option & examples to import DB REST API references (#1010)
1 parent 82fec82 commit 74c6e9b

File tree

2 files changed

+85
-1
lines changed

2 files changed

+85
-1
lines changed

content/operate/rs/references/rest-api/objects/bdb/dataset_import_sources.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Any additional required parameters may differ based on the import location type.
6161
|----------|------|-------------|
6262
| access_key_id | string | The AWS Access Key ID with access to the bucket |
6363
| bucket_name | string | S3 bucket name |
64+
| filename | string | RDB filename, including the file extension. |
6465
| region_name | string | Amazon S3 region name (optional) |
6566
| secret_access_key | string | The AWS Secret Access that matches the Access Key ID |
6667
| subdir | string | Path to the backup directory in the S3 bucket (optional) |
@@ -72,6 +73,7 @@ Any additional required parameters may differ based on the import location type.
7273
| bucket_name | string | Cloud Storage bucket name |
7374
| client_email | string | Email address for the Cloud Storage client ID |
7475
| client_id | string | Cloud Storage client ID with access to the Cloud Storage bucket |
76+
| filename | string | RDB filename, including the file extension. |
7577
| private_key | string | Private key for the Cloud Storage matching the private key ID |
7678
| private_key_id | string | Cloud Storage private key ID with access to the Cloud Storage bucket |
7779
| subdir | string | Path to the backup directory in the Cloud Storage bucket (optional) |
@@ -83,6 +85,7 @@ Any additional required parameters may differ based on the import location type.
8385
| account_key | string | Access key for the storage account |
8486
| account_name | string | Storage account name with access to the container |
8587
| container | string | Blob Storage container name |
88+
| filename | string | RDB filename, including the file extension. |
8689
| sas_token | string | Token to authenticate with shared access signature |
8790
| subdir | string | Path to the backup directory in the Blob Storage container (optional) |
8891

content/operate/rs/references/rest-api/requests/bdbs/actions/import.md

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ The request _may_ contain a subset of the [BDB JSON object]({{< relref "/operate
6464
Other attributes are not allowed and will cause the request to fail.
6565
{{</note>}}
6666

67-
##### Example JSON Body
67+
##### Example JSON body
68+
69+
General example:
6870

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

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

89+
FTP example:
90+
91+
```json
92+
{
93+
"dataset_import_sources": [
94+
{
95+
"type": "url",
96+
"url": "ftp://<ftp_user>:<ftp_password>@example.com/<path>/<filename>.rdb.gz"
97+
}
98+
]
99+
}
100+
```
101+
102+
SFTP example:
103+
104+
```json
105+
{
106+
"dataset_import_sources": [
107+
{
108+
"type": "sftp",
109+
"sftp_url": "sftp://<sftp_user>@example.com/<path>/<filename>.rdb"
110+
}
111+
]
112+
}
113+
```
114+
115+
AWS S3 example:
116+
117+
```json
118+
{
119+
"dataset_import_sources": [
120+
{
121+
"type": "s3",
122+
"bucket_name": "backups",
123+
"subdir": "test-db",
124+
"filename": "<filename>.rdb",
125+
"access_key_id": "XXXXXXXXXXXXX",
126+
"secret_access_key": "XXXXXXXXXXXXXXXX"
127+
}
128+
]
129+
}
130+
```
131+
132+
Google Cloud Storage example:
133+
134+
```json
135+
{
136+
"dataset_import_sources": [
137+
{
138+
"type": "gs",
139+
"bucket_name": "backups",
140+
"client_id": "XXXXXXXX",
141+
"client_email": "cloud-storage-client@my-project-id.iam.gserviceaccount.com",
142+
"subdir": "test-db",
143+
"filename": "<filename>.rdb",
144+
"private_key_id": "XXXXXXXXXXXXX",
145+
"private_key": "XXXXXXXXXXXXXXXX"
146+
}
147+
]
148+
}
149+
```
150+
151+
Azure Blob Storage example:
152+
153+
```json
154+
{
155+
"dataset_import_sources": [
156+
{
157+
"type": "abs",
158+
"container": "backups",
159+
"subdir": "test-db",
160+
"filename": "<filename>.rdb",
161+
"account_name": "name",
162+
"account_key": "XXXXXXXXXXXXXXXX" // Or you can use "sas_token": "XXXXXXXXXXXXXXXXXX" instead
163+
}
164+
]
165+
}
166+
```
167+
87168
### Response {#post-response}
88169

89170
Returns a status code.

0 commit comments

Comments
 (0)