Re-index Workspace Files
curl --request POST \
--url https://be.datagol.ai/ai/api/v2/enterprise-search/connector/dg-s3-workspace/re-index \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://be.datagol.ai/ai/api/v2/enterprise-search/connector/dg-s3-workspace/re-index"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://be.datagol.ai/ai/api/v2/enterprise-search/connector/dg-s3-workspace/re-index', 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://be.datagol.ai/ai/api/v2/enterprise-search/connector/dg-s3-workspace/re-index",
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([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://be.datagol.ai/ai/api/v2/enterprise-search/connector/dg-s3-workspace/re-index"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://be.datagol.ai/ai/api/v2/enterprise-search/connector/dg-s3-workspace/re-index")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://be.datagol.ai/ai/api/v2/enterprise-search/connector/dg-s3-workspace/re-index")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_bodyEnterprise Search
Re-index Workspace Files
1️⃣ Overview
Purpose:
Triggers a search index job for all files in the specified workspace.
Supports two modes controlled by the full_reindex flag:
- Full Re-index — indexes all documents present in the workspace from scratch.
- Incremental Index — processes only new or changed documents since the last index run.
2️⃣ Endpoint
POST /ai/api/v2/enterprise-search/connector/dg-s3-workspace/re-index?workspace_id={workspace_id}&full_reindex={true|false}
3️⃣ Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| workspace_id | string | ✅ Yes | The ID of the workspace whose files are to be indexed |
| full_reindex | boolean | ❌ No | true for full re-index of all documents; false for incremental index of new or changed documents only (default: false) |
4️⃣ Authentication
Requires authentication using:
Authorization: Bearer <token>
5️⃣ Request Headers
| Header | Required |
|---|---|
| Authorization | ✅ Yes |
6️⃣ Example Request
Full Re-index
curl --location 'https://ai.datagol.ai/ai/api/v2/enterprise-search/connector/dg-s3-workspace/re-index?workspace_id={workspaceId}&full_reindex=true' \
--header 'Authorization: Bearer <token>' \
--data-raw '{}'
Incremental Index
curl --location 'https://ai.datagol.ai/ai/api/v2/enterprise-search/connector/dg-s3-workspace/re-index?workspace_id={workspaceId}&full_reindex=false' \
--header 'Authorization: Bearer <token>' \
--data-raw '{}'
7️⃣ Behavior Summary
Triggers a search indexing job for the specified workspace.
full_reindex=true: Re-indexes all documents in the workspace from scratch.
full_reindex=false: Performs an incremental index, processing only new or changed documents since the last run.
POST
/
ai
/
api
/
v2
/
enterprise-search
/
connector
/
dg-s3-workspace
/
re-index
Re-index Workspace Files
curl --request POST \
--url https://be.datagol.ai/ai/api/v2/enterprise-search/connector/dg-s3-workspace/re-index \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://be.datagol.ai/ai/api/v2/enterprise-search/connector/dg-s3-workspace/re-index"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://be.datagol.ai/ai/api/v2/enterprise-search/connector/dg-s3-workspace/re-index', 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://be.datagol.ai/ai/api/v2/enterprise-search/connector/dg-s3-workspace/re-index",
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([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://be.datagol.ai/ai/api/v2/enterprise-search/connector/dg-s3-workspace/re-index"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://be.datagol.ai/ai/api/v2/enterprise-search/connector/dg-s3-workspace/re-index")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://be.datagol.ai/ai/api/v2/enterprise-search/connector/dg-s3-workspace/re-index")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_bodyAuthorizations
Query Parameters
Body
application/json
The body is of type object.
Response
200
Re-index Workspace Files