-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DOC-3871 RS: Add missing filename option & examples to import DB REST…
… API references
- Loading branch information
Showing
2 changed files
with
85 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
{ | ||
|
@@ -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. | ||
|