MethodPathDescription
POST/v1/bdbs/{uid}/actions/importInitiate manual dataset import

Initiate manual dataset import

POST /v1/bdbs/{int: uid}/actions/import

Initiate a manual import process.

Permissions

Permission nameRoles
start_bdb_importadmin
cluster_member
db_member

Request

Example HTTP request

POST /bdbs/1/actions/import

Headers

KeyValueDescription
Hostcnm.cluster.fqdnDomain name
Acceptapplication/jsonAccepted media type
Content-Length0Length of the request body in octets

URL parameters

FieldTypeDescription
uidintegerThe unique ID of the database

Body

The request may contain a subset of the BDB JSON object, which includes the following import-related attributes:

FieldTypeDescription
dataset_import_sourcesarray of dataset_import_sources objectsDetails for the import sources. Call GET /jsonschema on the bdb object and review the dataset_import_sources field to retrieve the object’s structure.
email_notificationbooleanEnable/disable an email notification on import failure/ completion. (optional)
Note:
Other attributes are not allowed and will cause the request to fail.
Example JSON Body
{
    "dataset_import_sources": [
        {
            "type": "url",
            "url": "http://..."
        },
        {
            "type": "url",
            "url": "redis://..."
        }
    ],
    "email_notification": true
}

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

Response

Returns a status code.

Status codes

CodeDescription
200 OKThe request is accepted and is being processed. In order to monitor progress, the import_status, import_progress, and import_failure_reason attributes can be consulted.
404 Not FoundAttempting to perform an action on a nonexistent database.
406 Not AcceptableNot all the modules loaded to the database support ‘backup_restore’ capability.
409 ConflictDatabase is currently busy with another action. In this context, this is a temporary condition and the request should be reattempted later.