External Services
post/external-services/{id}/data-imports

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/external-services/{id}/data-imports
  • Auth: HTTP bearer

Path parameters

idinteger required

External service ID

Request body

confirm_target_databasestring nullable

Required when replace is true: must repeat target_database.

replaceboolean

Drop and re-create target_database when it already holds data.

source_urlstring required

Connection string of the database to copy, e.g. postgres://user:password@db.example.com:5432/app?sslmode=require. Must name the database. Never stored or returned.

target_databasestring required

Database of this service that receives the data. Created when it does not exist; typically a project environment's database (<project>_<environment>).

timeout_minutesinteger nullable

Transfer time limit in minutes (default 60, maximum 1440).

Response

Import started; poll the run

atomicboolean required

Whether a failed run leaves no imported data behind.

cancel_requestedboolean required
created_atstring date-time required
created_byinteger nullable
error_messagestring nullable

Why the run did not succeed, in one or two sentences.

finished_atstring date-time nullable
helper_outputstring nullable

Last lines the transfer printed (dump/restore tool output), with every secret removed. Present for successful runs too.

idinteger required
phasestring required

preparing_target, transferring, verifying or finished. Only a successful run reaches finished; otherwise this is where it stopped.

replace_existingboolean required
service_idinteger required
service_typestring required
sourcestring required

Source connection string with its credentials masked.

source_databasestring required
started_atstring date-time required
statusstring required

running, succeeded, failed, cancelled or interrupted.

target_databasestring required
target_object_countinteger nullable

Tables/collections in the target after a successful import.

target_size_bytesinteger nullable
timeout_secondsinteger required
updated_atstring date-time required

Changes