Skip to main content
POST
/
sources
/
bulk-action
/
Bulk Actions on Sources
curl --request POST \
  --url https://api-prod.voltai.ai/source/api/sources/bulk-action/ \
  --header 'Content-Type: application/json' \
  --cookie sessionid= \
  --data '
{
  "source_names": [
    "<string>"
  ],
  "topic_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "job_version": "<string>"
}
'
import requests

url = "https://api-prod.voltai.ai/source/api/sources/bulk-action/"

payload = {
"source_names": ["<string>"],
"topic_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job_version": "<string>"
}
headers = {
"cookie": "sessionid=",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {cookie: 'sessionid=', 'Content-Type': 'application/json'},
body: JSON.stringify({
source_names: ['<string>'],
topic_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
job_version: '<string>'
})
};

fetch('https://api-prod.voltai.ai/source/api/sources/bulk-action/', 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-prod.voltai.ai/source/api/sources/bulk-action/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'source_names' => [
'<string>'
],
'topic_uuid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'job_version' => '<string>'
]),
CURLOPT_COOKIE => "sessionid=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api-prod.voltai.ai/source/api/sources/bulk-action/"

payload := strings.NewReader("{\n \"source_names\": [\n \"<string>\"\n ],\n \"topic_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"job_version\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("cookie", "sessionid=")
req.Header.Add("Content-Type", "application/json")

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-prod.voltai.ai/source/api/sources/bulk-action/")
.header("cookie", "sessionid=")
.header("Content-Type", "application/json")
.body("{\n \"source_names\": [\n \"<string>\"\n ],\n \"topic_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"job_version\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-prod.voltai.ai/source/api/sources/bulk-action/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["cookie"] = 'sessionid='
request["Content-Type"] = 'application/json'
request.body = "{\n \"source_names\": [\n \"<string>\"\n ],\n \"topic_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"job_version\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "action": "enable",
  "source_names": [
    "document.pdf",
    "datasheet.pdf"
  ]
}

Authorizations

sessionid
string
cookie
required

Query Parameters

organization_name
string
required

Organization name (required for multi-tenant API keys)

Body

Request schema for source bulk actions.

action
enum<string>
required

Action to perform on the sources

  • enable - enable
  • disable - disable
  • reindex - reindex
  • reparse - reparse
  • add-to-topic - add-to-topic
  • remove-from-topic - remove-from-topic
  • delete - delete
Available options:
enable,
disable,
reindex,
reparse,
add-to-topic,
remove-from-topic,
delete
source_names
string[]
required

List of source names to perform the action on (e.g., ['document.pdf', 'datasheet.pdf'])

Minimum string length: 1
topic_uuid
string<uuid>

Topic UUID (required for add-to-topic and remove-from-topic actions)

job_version
string

Job version (optional, for reparse action)

Minimum string length: 1

Response

Reusable response schema for bulk actions.

message
string
required
deleted_count
integer
created_count
integer
existing_count
integer
processed_paths
integer
updated_count
integer
deleted_subtopics
integer
error_count
integer
errors
object[]