curl --request POST \
--url https://api.cloudglue.dev/v1/collections/{collection_id}/imports/{import_id}/runs/{run_id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cloudglue.dev/v1/collections/{collection_id}/imports/{import_id}/runs/{run_id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cloudglue.dev/v1/collections/{collection_id}/imports/{import_id}/runs/{run_id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cloudglue.dev/v1/collections/{collection_id}/imports/{import_id}/runs/{run_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cloudglue.dev/v1/collections/{collection_id}/imports/{import_id}/runs/{run_id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cloudglue.dev/v1/collections/{collection_id}/imports/{import_id}/runs/{run_id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudglue.dev/v1/collections/{collection_id}/imports/{import_id}/runs/{run_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "metadata_import_run",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"import_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"import_type": "metadata",
"mode": "append",
"delete_missing": true,
"status": "pending",
"progress": {
"pages_listed": 123,
"files_listed": 123,
"files_created": 123,
"files_updated": 123,
"files_skipped": 123,
"files_failed": 123,
"files_queued": 123,
"files_indexed": 123,
"files_imported": 123,
"files_removed": 123,
"files_enriched": 123
},
"error": "<string>",
"started_at": 123,
"completed_at": 123,
"created_at": 123,
"max_files": 123,
"include_thumbnails": true,
"enrich_metadata": true
}{
"error": "<string>"
}{
"error": "<string>"
}Cancel Bulk Import Run
Cancel an in-flight run. Files already imported by the run are kept. Cancelling an already-finished run is a no-op that returns the current state.
curl --request POST \
--url https://api.cloudglue.dev/v1/collections/{collection_id}/imports/{import_id}/runs/{run_id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cloudglue.dev/v1/collections/{collection_id}/imports/{import_id}/runs/{run_id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cloudglue.dev/v1/collections/{collection_id}/imports/{import_id}/runs/{run_id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cloudglue.dev/v1/collections/{collection_id}/imports/{import_id}/runs/{run_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cloudglue.dev/v1/collections/{collection_id}/imports/{import_id}/runs/{run_id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cloudglue.dev/v1/collections/{collection_id}/imports/{import_id}/runs/{run_id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudglue.dev/v1/collections/{collection_id}/imports/{import_id}/runs/{run_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "metadata_import_run",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"import_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"import_type": "metadata",
"mode": "append",
"delete_missing": true,
"status": "pending",
"progress": {
"pages_listed": 123,
"files_listed": 123,
"files_created": 123,
"files_updated": 123,
"files_skipped": 123,
"files_failed": 123,
"files_queued": 123,
"files_indexed": 123,
"files_imported": 123,
"files_removed": 123,
"files_enriched": 123
},
"error": "<string>",
"started_at": 123,
"completed_at": 123,
"created_at": 123,
"max_files": 123,
"include_thumbnails": true,
"enrich_metadata": true
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the metadata collection
The ID of the metadata import
The ID of the import run
Response
The run in its post-cancel state
One execution of a metadata import.
metadata_import_run What this run ingests, inherited from the import definition: metadata indexes source metadata only (free); media ingests and processes the actual files (billed per file).
metadata, media append imports new files and retries previously-failed ones; refresh re-imports everything the filters match. For media imports, refresh re-syncs the source metadata of files it already imported — media bytes are never re-downloaded.
append, refresh Whether this run sweeps files this import previously brought in that the source no longer returns (refresh runs only)
pending, processing, completed, failed, cancelled Best-effort progress counters for display. Run completion is decided from the actual per-file indexing state, never from these counters, so they can drift slightly under retries without affecting correctness.
Show child attributes
Show child attributes
User-facing failure reason when status is failed
Unix timestamp in milliseconds
Unix timestamp in milliseconds
Unix timestamp in milliseconds
The cap this run executed with; null means unbounded
Whether this run copied poster thumbnails
Whether this run backfills omitted source-metadata fields (see the import-level property).