Skip to contents

Cancels an import operation if it has not yet completed.

Usage

cancel_import(index, import_id)

Arguments

index

Name of the index

import_id

The ID of the import operation to cancel

Value

List with http response, content, and status_code. - 200: Import was successfully cancelled - 404: Import not found - 500: Internal error

Details

Only imports with status "Pending" or "InProgress" can be cancelled. Completed, failed, or already cancelled imports cannot be cancelled.

Examples

if (FALSE) { # \dontrun{
# Start an import
import_result <- start_import("my-index", "s3://bucket/data/")
import_id <- import_result$content$id

# Cancel it
cancel_import("my-index", import_id)
} # }