Link Project Data Source
curl --request POST \
--url https://api.example.com/v1/projects/{project_id}/data-sources \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-selected-account-id: <api-key>' \
--data '
{
"data_sources_data_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connector": {
"name": "<string>",
"type": "sharepoint",
"credentials": {
"type": "client_credentials",
"creds": {
"client_id": "<string>",
"client_secret": "<string>",
"tenant_id": "<string>"
}
},
"config": {
"tenant_id": "<string>",
"api_type": "graph",
"site_url": "<string>",
"site_id": "<string>",
"drive_id": "<string>",
"folder_path": "<string>",
"token_exchange": {
"user_token_header": "X-User-Access-Token",
"user_assertion_scope": "<string>"
}
},
"sync": true
},
"workflow": {
"name": "<string>",
"steps": {
"parse": {
"options": {
"chunking": {
"chunk_mode": "variable",
"chunk_size": 123
}
},
"engine": "reducto",
"chunking_options": {
"strategy": "token_size",
"chunk_size": 512,
"chunk_overlap": 50,
"encoding_name": "cl100k_base"
},
"vector_store_metadata": {},
"advanced_options": {},
"experimental_options": {},
"priority": false
},
"chunk": {
"strategy": "token_size",
"chunk_size": 512,
"chunk_overlap": 50,
"encoding_name": "cl100k_base"
},
"vectorize": {
"engine": "sgp_vector_store",
"vector_store_metadata_schema": {},
"embedding_type": "base",
"embedding_model": "openai/text-embedding-3-small"
},
"index": {
"model": "openai/gpt-5.2",
"file_summarization_prompt": "<string>",
"folder_summarization_prompt": "<string>",
"strategy": "file_system",
"engine_type": "file_system"
}
}
}
}
'import requests
url = "https://api.example.com/v1/projects/{project_id}/data-sources"
payload = {
"data_sources_data_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connector": {
"name": "<string>",
"type": "sharepoint",
"credentials": {
"type": "client_credentials",
"creds": {
"client_id": "<string>",
"client_secret": "<string>",
"tenant_id": "<string>"
}
},
"config": {
"tenant_id": "<string>",
"api_type": "graph",
"site_url": "<string>",
"site_id": "<string>",
"drive_id": "<string>",
"folder_path": "<string>",
"token_exchange": {
"user_token_header": "X-User-Access-Token",
"user_assertion_scope": "<string>"
}
},
"sync": True
},
"workflow": {
"name": "<string>",
"steps": {
"parse": {
"options": { "chunking": {
"chunk_mode": "variable",
"chunk_size": 123
} },
"engine": "reducto",
"chunking_options": {
"strategy": "token_size",
"chunk_size": 512,
"chunk_overlap": 50,
"encoding_name": "cl100k_base"
},
"vector_store_metadata": {},
"advanced_options": {},
"experimental_options": {},
"priority": False
},
"chunk": {
"strategy": "token_size",
"chunk_size": 512,
"chunk_overlap": 50,
"encoding_name": "cl100k_base"
},
"vectorize": {
"engine": "sgp_vector_store",
"vector_store_metadata_schema": {},
"embedding_type": "base",
"embedding_model": "openai/text-embedding-3-small"
},
"index": {
"model": "openai/gpt-5.2",
"file_summarization_prompt": "<string>",
"folder_summarization_prompt": "<string>",
"strategy": "file_system",
"engine_type": "file_system"
}
}
}
}
headers = {
"x-api-key": "<api-key>",
"x-selected-account-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-selected-account-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data_sources_data_source_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
connector: {
name: '<string>',
type: 'sharepoint',
credentials: {
type: 'client_credentials',
creds: {client_id: '<string>', client_secret: '<string>', tenant_id: '<string>'}
},
config: {
tenant_id: '<string>',
api_type: 'graph',
site_url: '<string>',
site_id: '<string>',
drive_id: '<string>',
folder_path: '<string>',
token_exchange: {user_token_header: 'X-User-Access-Token', user_assertion_scope: '<string>'}
},
sync: true
},
workflow: {
name: '<string>',
steps: {
parse: {
options: {chunking: {chunk_mode: 'variable', chunk_size: 123}},
engine: 'reducto',
chunking_options: {
strategy: 'token_size',
chunk_size: 512,
chunk_overlap: 50,
encoding_name: 'cl100k_base'
},
vector_store_metadata: {},
advanced_options: {},
experimental_options: {},
priority: false
},
chunk: {
strategy: 'token_size',
chunk_size: 512,
chunk_overlap: 50,
encoding_name: 'cl100k_base'
},
vectorize: {
engine: 'sgp_vector_store',
vector_store_metadata_schema: {},
embedding_type: 'base',
embedding_model: 'openai/text-embedding-3-small'
},
index: {
model: 'openai/gpt-5.2',
file_summarization_prompt: '<string>',
folder_summarization_prompt: '<string>',
strategy: 'file_system',
engine_type: 'file_system'
}
}
}
})
};
fetch('https://api.example.com/v1/projects/{project_id}/data-sources', 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.example.com/v1/projects/{project_id}/data-sources",
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([
'data_sources_data_source_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'connector' => [
'name' => '<string>',
'type' => 'sharepoint',
'credentials' => [
'type' => 'client_credentials',
'creds' => [
'client_id' => '<string>',
'client_secret' => '<string>',
'tenant_id' => '<string>'
]
],
'config' => [
'tenant_id' => '<string>',
'api_type' => 'graph',
'site_url' => '<string>',
'site_id' => '<string>',
'drive_id' => '<string>',
'folder_path' => '<string>',
'token_exchange' => [
'user_token_header' => 'X-User-Access-Token',
'user_assertion_scope' => '<string>'
]
],
'sync' => true
],
'workflow' => [
'name' => '<string>',
'steps' => [
'parse' => [
'options' => [
'chunking' => [
'chunk_mode' => 'variable',
'chunk_size' => 123
]
],
'engine' => 'reducto',
'chunking_options' => [
'strategy' => 'token_size',
'chunk_size' => 512,
'chunk_overlap' => 50,
'encoding_name' => 'cl100k_base'
],
'vector_store_metadata' => [
],
'advanced_options' => [
],
'experimental_options' => [
],
'priority' => false
],
'chunk' => [
'strategy' => 'token_size',
'chunk_size' => 512,
'chunk_overlap' => 50,
'encoding_name' => 'cl100k_base'
],
'vectorize' => [
'engine' => 'sgp_vector_store',
'vector_store_metadata_schema' => [
],
'embedding_type' => 'base',
'embedding_model' => 'openai/text-embedding-3-small'
],
'index' => [
'model' => 'openai/gpt-5.2',
'file_summarization_prompt' => '<string>',
'folder_summarization_prompt' => '<string>',
'strategy' => 'file_system',
'engine_type' => 'file_system'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-selected-account-id: <api-key>"
],
]);
$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.example.com/v1/projects/{project_id}/data-sources"
payload := strings.NewReader("{\n \"data_sources_data_source_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"connector\": {\n \"name\": \"<string>\",\n \"type\": \"sharepoint\",\n \"credentials\": {\n \"type\": \"client_credentials\",\n \"creds\": {\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"tenant_id\": \"<string>\"\n }\n },\n \"config\": {\n \"tenant_id\": \"<string>\",\n \"api_type\": \"graph\",\n \"site_url\": \"<string>\",\n \"site_id\": \"<string>\",\n \"drive_id\": \"<string>\",\n \"folder_path\": \"<string>\",\n \"token_exchange\": {\n \"user_token_header\": \"X-User-Access-Token\",\n \"user_assertion_scope\": \"<string>\"\n }\n },\n \"sync\": true\n },\n \"workflow\": {\n \"name\": \"<string>\",\n \"steps\": {\n \"parse\": {\n \"options\": {\n \"chunking\": {\n \"chunk_mode\": \"variable\",\n \"chunk_size\": 123\n }\n },\n \"engine\": \"reducto\",\n \"chunking_options\": {\n \"strategy\": \"token_size\",\n \"chunk_size\": 512,\n \"chunk_overlap\": 50,\n \"encoding_name\": \"cl100k_base\"\n },\n \"vector_store_metadata\": {},\n \"advanced_options\": {},\n \"experimental_options\": {},\n \"priority\": false\n },\n \"chunk\": {\n \"strategy\": \"token_size\",\n \"chunk_size\": 512,\n \"chunk_overlap\": 50,\n \"encoding_name\": \"cl100k_base\"\n },\n \"vectorize\": {\n \"engine\": \"sgp_vector_store\",\n \"vector_store_metadata_schema\": {},\n \"embedding_type\": \"base\",\n \"embedding_model\": \"openai/text-embedding-3-small\"\n },\n \"index\": {\n \"model\": \"openai/gpt-5.2\",\n \"file_summarization_prompt\": \"<string>\",\n \"folder_summarization_prompt\": \"<string>\",\n \"strategy\": \"file_system\",\n \"engine_type\": \"file_system\"\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-selected-account-id", "<api-key>")
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.example.com/v1/projects/{project_id}/data-sources")
.header("x-api-key", "<api-key>")
.header("x-selected-account-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data_sources_data_source_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"connector\": {\n \"name\": \"<string>\",\n \"type\": \"sharepoint\",\n \"credentials\": {\n \"type\": \"client_credentials\",\n \"creds\": {\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"tenant_id\": \"<string>\"\n }\n },\n \"config\": {\n \"tenant_id\": \"<string>\",\n \"api_type\": \"graph\",\n \"site_url\": \"<string>\",\n \"site_id\": \"<string>\",\n \"drive_id\": \"<string>\",\n \"folder_path\": \"<string>\",\n \"token_exchange\": {\n \"user_token_header\": \"X-User-Access-Token\",\n \"user_assertion_scope\": \"<string>\"\n }\n },\n \"sync\": true\n },\n \"workflow\": {\n \"name\": \"<string>\",\n \"steps\": {\n \"parse\": {\n \"options\": {\n \"chunking\": {\n \"chunk_mode\": \"variable\",\n \"chunk_size\": 123\n }\n },\n \"engine\": \"reducto\",\n \"chunking_options\": {\n \"strategy\": \"token_size\",\n \"chunk_size\": 512,\n \"chunk_overlap\": 50,\n \"encoding_name\": \"cl100k_base\"\n },\n \"vector_store_metadata\": {},\n \"advanced_options\": {},\n \"experimental_options\": {},\n \"priority\": false\n },\n \"chunk\": {\n \"strategy\": \"token_size\",\n \"chunk_size\": 512,\n \"chunk_overlap\": 50,\n \"encoding_name\": \"cl100k_base\"\n },\n \"vectorize\": {\n \"engine\": \"sgp_vector_store\",\n \"vector_store_metadata_schema\": {},\n \"embedding_type\": \"base\",\n \"embedding_model\": \"openai/text-embedding-3-small\"\n },\n \"index\": {\n \"model\": \"openai/gpt-5.2\",\n \"file_summarization_prompt\": \"<string>\",\n \"folder_summarization_prompt\": \"<string>\",\n \"strategy\": \"file_system\",\n \"engine_type\": \"file_system\"\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/projects/{project_id}/data-sources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["x-selected-account-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data_sources_data_source_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"connector\": {\n \"name\": \"<string>\",\n \"type\": \"sharepoint\",\n \"credentials\": {\n \"type\": \"client_credentials\",\n \"creds\": {\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"tenant_id\": \"<string>\"\n }\n },\n \"config\": {\n \"tenant_id\": \"<string>\",\n \"api_type\": \"graph\",\n \"site_url\": \"<string>\",\n \"site_id\": \"<string>\",\n \"drive_id\": \"<string>\",\n \"folder_path\": \"<string>\",\n \"token_exchange\": {\n \"user_token_header\": \"X-User-Access-Token\",\n \"user_assertion_scope\": \"<string>\"\n }\n },\n \"sync\": true\n },\n \"workflow\": {\n \"name\": \"<string>\",\n \"steps\": {\n \"parse\": {\n \"options\": {\n \"chunking\": {\n \"chunk_mode\": \"variable\",\n \"chunk_size\": 123\n }\n },\n \"engine\": \"reducto\",\n \"chunking_options\": {\n \"strategy\": \"token_size\",\n \"chunk_size\": 512,\n \"chunk_overlap\": 50,\n \"encoding_name\": \"cl100k_base\"\n },\n \"vector_store_metadata\": {},\n \"advanced_options\": {},\n \"experimental_options\": {},\n \"priority\": false\n },\n \"chunk\": {\n \"strategy\": \"token_size\",\n \"chunk_size\": 512,\n \"chunk_overlap\": 50,\n \"encoding_name\": \"cl100k_base\"\n },\n \"vectorize\": {\n \"engine\": \"sgp_vector_store\",\n \"vector_store_metadata_schema\": {},\n \"embedding_type\": \"base\",\n \"embedding_model\": \"openai/text-embedding-3-small\"\n },\n \"index\": {\n \"model\": \"openai/gpt-5.2\",\n \"file_summarization_prompt\": \"<string>\",\n \"folder_summarization_prompt\": \"<string>\",\n \"strategy\": \"file_system\",\n \"engine_type\": \"file_system\"\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"project_id": "<string>",
"name": "<string>",
"provider_type": "<string>",
"data_sources_data_source_id": "<string>",
"data_sources_subscription_id": "<string>",
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "data_source",
"workflow_id": "<string>",
"workflow_status": "<string>",
"config_metadata": {},
"last_delta_cursor": "<string>",
"last_event_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Data sources
Link Project Data Source
Link an existing Data Sources connector and create DEX webhook subscription.
POST
/
v1
/
projects
/
{project_id}
/
data-sources
Link Project Data Source
curl --request POST \
--url https://api.example.com/v1/projects/{project_id}/data-sources \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-selected-account-id: <api-key>' \
--data '
{
"data_sources_data_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connector": {
"name": "<string>",
"type": "sharepoint",
"credentials": {
"type": "client_credentials",
"creds": {
"client_id": "<string>",
"client_secret": "<string>",
"tenant_id": "<string>"
}
},
"config": {
"tenant_id": "<string>",
"api_type": "graph",
"site_url": "<string>",
"site_id": "<string>",
"drive_id": "<string>",
"folder_path": "<string>",
"token_exchange": {
"user_token_header": "X-User-Access-Token",
"user_assertion_scope": "<string>"
}
},
"sync": true
},
"workflow": {
"name": "<string>",
"steps": {
"parse": {
"options": {
"chunking": {
"chunk_mode": "variable",
"chunk_size": 123
}
},
"engine": "reducto",
"chunking_options": {
"strategy": "token_size",
"chunk_size": 512,
"chunk_overlap": 50,
"encoding_name": "cl100k_base"
},
"vector_store_metadata": {},
"advanced_options": {},
"experimental_options": {},
"priority": false
},
"chunk": {
"strategy": "token_size",
"chunk_size": 512,
"chunk_overlap": 50,
"encoding_name": "cl100k_base"
},
"vectorize": {
"engine": "sgp_vector_store",
"vector_store_metadata_schema": {},
"embedding_type": "base",
"embedding_model": "openai/text-embedding-3-small"
},
"index": {
"model": "openai/gpt-5.2",
"file_summarization_prompt": "<string>",
"folder_summarization_prompt": "<string>",
"strategy": "file_system",
"engine_type": "file_system"
}
}
}
}
'import requests
url = "https://api.example.com/v1/projects/{project_id}/data-sources"
payload = {
"data_sources_data_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connector": {
"name": "<string>",
"type": "sharepoint",
"credentials": {
"type": "client_credentials",
"creds": {
"client_id": "<string>",
"client_secret": "<string>",
"tenant_id": "<string>"
}
},
"config": {
"tenant_id": "<string>",
"api_type": "graph",
"site_url": "<string>",
"site_id": "<string>",
"drive_id": "<string>",
"folder_path": "<string>",
"token_exchange": {
"user_token_header": "X-User-Access-Token",
"user_assertion_scope": "<string>"
}
},
"sync": True
},
"workflow": {
"name": "<string>",
"steps": {
"parse": {
"options": { "chunking": {
"chunk_mode": "variable",
"chunk_size": 123
} },
"engine": "reducto",
"chunking_options": {
"strategy": "token_size",
"chunk_size": 512,
"chunk_overlap": 50,
"encoding_name": "cl100k_base"
},
"vector_store_metadata": {},
"advanced_options": {},
"experimental_options": {},
"priority": False
},
"chunk": {
"strategy": "token_size",
"chunk_size": 512,
"chunk_overlap": 50,
"encoding_name": "cl100k_base"
},
"vectorize": {
"engine": "sgp_vector_store",
"vector_store_metadata_schema": {},
"embedding_type": "base",
"embedding_model": "openai/text-embedding-3-small"
},
"index": {
"model": "openai/gpt-5.2",
"file_summarization_prompt": "<string>",
"folder_summarization_prompt": "<string>",
"strategy": "file_system",
"engine_type": "file_system"
}
}
}
}
headers = {
"x-api-key": "<api-key>",
"x-selected-account-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-selected-account-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data_sources_data_source_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
connector: {
name: '<string>',
type: 'sharepoint',
credentials: {
type: 'client_credentials',
creds: {client_id: '<string>', client_secret: '<string>', tenant_id: '<string>'}
},
config: {
tenant_id: '<string>',
api_type: 'graph',
site_url: '<string>',
site_id: '<string>',
drive_id: '<string>',
folder_path: '<string>',
token_exchange: {user_token_header: 'X-User-Access-Token', user_assertion_scope: '<string>'}
},
sync: true
},
workflow: {
name: '<string>',
steps: {
parse: {
options: {chunking: {chunk_mode: 'variable', chunk_size: 123}},
engine: 'reducto',
chunking_options: {
strategy: 'token_size',
chunk_size: 512,
chunk_overlap: 50,
encoding_name: 'cl100k_base'
},
vector_store_metadata: {},
advanced_options: {},
experimental_options: {},
priority: false
},
chunk: {
strategy: 'token_size',
chunk_size: 512,
chunk_overlap: 50,
encoding_name: 'cl100k_base'
},
vectorize: {
engine: 'sgp_vector_store',
vector_store_metadata_schema: {},
embedding_type: 'base',
embedding_model: 'openai/text-embedding-3-small'
},
index: {
model: 'openai/gpt-5.2',
file_summarization_prompt: '<string>',
folder_summarization_prompt: '<string>',
strategy: 'file_system',
engine_type: 'file_system'
}
}
}
})
};
fetch('https://api.example.com/v1/projects/{project_id}/data-sources', 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.example.com/v1/projects/{project_id}/data-sources",
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([
'data_sources_data_source_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'connector' => [
'name' => '<string>',
'type' => 'sharepoint',
'credentials' => [
'type' => 'client_credentials',
'creds' => [
'client_id' => '<string>',
'client_secret' => '<string>',
'tenant_id' => '<string>'
]
],
'config' => [
'tenant_id' => '<string>',
'api_type' => 'graph',
'site_url' => '<string>',
'site_id' => '<string>',
'drive_id' => '<string>',
'folder_path' => '<string>',
'token_exchange' => [
'user_token_header' => 'X-User-Access-Token',
'user_assertion_scope' => '<string>'
]
],
'sync' => true
],
'workflow' => [
'name' => '<string>',
'steps' => [
'parse' => [
'options' => [
'chunking' => [
'chunk_mode' => 'variable',
'chunk_size' => 123
]
],
'engine' => 'reducto',
'chunking_options' => [
'strategy' => 'token_size',
'chunk_size' => 512,
'chunk_overlap' => 50,
'encoding_name' => 'cl100k_base'
],
'vector_store_metadata' => [
],
'advanced_options' => [
],
'experimental_options' => [
],
'priority' => false
],
'chunk' => [
'strategy' => 'token_size',
'chunk_size' => 512,
'chunk_overlap' => 50,
'encoding_name' => 'cl100k_base'
],
'vectorize' => [
'engine' => 'sgp_vector_store',
'vector_store_metadata_schema' => [
],
'embedding_type' => 'base',
'embedding_model' => 'openai/text-embedding-3-small'
],
'index' => [
'model' => 'openai/gpt-5.2',
'file_summarization_prompt' => '<string>',
'folder_summarization_prompt' => '<string>',
'strategy' => 'file_system',
'engine_type' => 'file_system'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-selected-account-id: <api-key>"
],
]);
$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.example.com/v1/projects/{project_id}/data-sources"
payload := strings.NewReader("{\n \"data_sources_data_source_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"connector\": {\n \"name\": \"<string>\",\n \"type\": \"sharepoint\",\n \"credentials\": {\n \"type\": \"client_credentials\",\n \"creds\": {\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"tenant_id\": \"<string>\"\n }\n },\n \"config\": {\n \"tenant_id\": \"<string>\",\n \"api_type\": \"graph\",\n \"site_url\": \"<string>\",\n \"site_id\": \"<string>\",\n \"drive_id\": \"<string>\",\n \"folder_path\": \"<string>\",\n \"token_exchange\": {\n \"user_token_header\": \"X-User-Access-Token\",\n \"user_assertion_scope\": \"<string>\"\n }\n },\n \"sync\": true\n },\n \"workflow\": {\n \"name\": \"<string>\",\n \"steps\": {\n \"parse\": {\n \"options\": {\n \"chunking\": {\n \"chunk_mode\": \"variable\",\n \"chunk_size\": 123\n }\n },\n \"engine\": \"reducto\",\n \"chunking_options\": {\n \"strategy\": \"token_size\",\n \"chunk_size\": 512,\n \"chunk_overlap\": 50,\n \"encoding_name\": \"cl100k_base\"\n },\n \"vector_store_metadata\": {},\n \"advanced_options\": {},\n \"experimental_options\": {},\n \"priority\": false\n },\n \"chunk\": {\n \"strategy\": \"token_size\",\n \"chunk_size\": 512,\n \"chunk_overlap\": 50,\n \"encoding_name\": \"cl100k_base\"\n },\n \"vectorize\": {\n \"engine\": \"sgp_vector_store\",\n \"vector_store_metadata_schema\": {},\n \"embedding_type\": \"base\",\n \"embedding_model\": \"openai/text-embedding-3-small\"\n },\n \"index\": {\n \"model\": \"openai/gpt-5.2\",\n \"file_summarization_prompt\": \"<string>\",\n \"folder_summarization_prompt\": \"<string>\",\n \"strategy\": \"file_system\",\n \"engine_type\": \"file_system\"\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-selected-account-id", "<api-key>")
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.example.com/v1/projects/{project_id}/data-sources")
.header("x-api-key", "<api-key>")
.header("x-selected-account-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data_sources_data_source_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"connector\": {\n \"name\": \"<string>\",\n \"type\": \"sharepoint\",\n \"credentials\": {\n \"type\": \"client_credentials\",\n \"creds\": {\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"tenant_id\": \"<string>\"\n }\n },\n \"config\": {\n \"tenant_id\": \"<string>\",\n \"api_type\": \"graph\",\n \"site_url\": \"<string>\",\n \"site_id\": \"<string>\",\n \"drive_id\": \"<string>\",\n \"folder_path\": \"<string>\",\n \"token_exchange\": {\n \"user_token_header\": \"X-User-Access-Token\",\n \"user_assertion_scope\": \"<string>\"\n }\n },\n \"sync\": true\n },\n \"workflow\": {\n \"name\": \"<string>\",\n \"steps\": {\n \"parse\": {\n \"options\": {\n \"chunking\": {\n \"chunk_mode\": \"variable\",\n \"chunk_size\": 123\n }\n },\n \"engine\": \"reducto\",\n \"chunking_options\": {\n \"strategy\": \"token_size\",\n \"chunk_size\": 512,\n \"chunk_overlap\": 50,\n \"encoding_name\": \"cl100k_base\"\n },\n \"vector_store_metadata\": {},\n \"advanced_options\": {},\n \"experimental_options\": {},\n \"priority\": false\n },\n \"chunk\": {\n \"strategy\": \"token_size\",\n \"chunk_size\": 512,\n \"chunk_overlap\": 50,\n \"encoding_name\": \"cl100k_base\"\n },\n \"vectorize\": {\n \"engine\": \"sgp_vector_store\",\n \"vector_store_metadata_schema\": {},\n \"embedding_type\": \"base\",\n \"embedding_model\": \"openai/text-embedding-3-small\"\n },\n \"index\": {\n \"model\": \"openai/gpt-5.2\",\n \"file_summarization_prompt\": \"<string>\",\n \"folder_summarization_prompt\": \"<string>\",\n \"strategy\": \"file_system\",\n \"engine_type\": \"file_system\"\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/projects/{project_id}/data-sources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["x-selected-account-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data_sources_data_source_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"connector\": {\n \"name\": \"<string>\",\n \"type\": \"sharepoint\",\n \"credentials\": {\n \"type\": \"client_credentials\",\n \"creds\": {\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"tenant_id\": \"<string>\"\n }\n },\n \"config\": {\n \"tenant_id\": \"<string>\",\n \"api_type\": \"graph\",\n \"site_url\": \"<string>\",\n \"site_id\": \"<string>\",\n \"drive_id\": \"<string>\",\n \"folder_path\": \"<string>\",\n \"token_exchange\": {\n \"user_token_header\": \"X-User-Access-Token\",\n \"user_assertion_scope\": \"<string>\"\n }\n },\n \"sync\": true\n },\n \"workflow\": {\n \"name\": \"<string>\",\n \"steps\": {\n \"parse\": {\n \"options\": {\n \"chunking\": {\n \"chunk_mode\": \"variable\",\n \"chunk_size\": 123\n }\n },\n \"engine\": \"reducto\",\n \"chunking_options\": {\n \"strategy\": \"token_size\",\n \"chunk_size\": 512,\n \"chunk_overlap\": 50,\n \"encoding_name\": \"cl100k_base\"\n },\n \"vector_store_metadata\": {},\n \"advanced_options\": {},\n \"experimental_options\": {},\n \"priority\": false\n },\n \"chunk\": {\n \"strategy\": \"token_size\",\n \"chunk_size\": 512,\n \"chunk_overlap\": 50,\n \"encoding_name\": \"cl100k_base\"\n },\n \"vectorize\": {\n \"engine\": \"sgp_vector_store\",\n \"vector_store_metadata_schema\": {},\n \"embedding_type\": \"base\",\n \"embedding_model\": \"openai/text-embedding-3-small\"\n },\n \"index\": {\n \"model\": \"openai/gpt-5.2\",\n \"file_summarization_prompt\": \"<string>\",\n \"folder_summarization_prompt\": \"<string>\",\n \"strategy\": \"file_system\",\n \"engine_type\": \"file_system\"\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"project_id": "<string>",
"name": "<string>",
"provider_type": "<string>",
"data_sources_data_source_id": "<string>",
"data_sources_subscription_id": "<string>",
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "data_source",
"workflow_id": "<string>",
"workflow_status": "<string>",
"config_metadata": {},
"last_delta_cursor": "<string>",
"last_event_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API key for authentication
Selected Account ID
Path Parameters
Body
application/json
Attach a Data Sources connector to a DEX project.
Provide exactly one of:
connector: create a new connector on the Data Sources service and link it (project-owned), ordata_sources_data_source_id: link an existing connector (reuse across projects).
Existing Data Sources service data source id to link.
Config for a new connector to create and link (project-owned).
- SharePointDataSourceCreate
- GoogleDriveDataSourceCreate
- ConfluenceDataSourceCreate
Show child attributes
Show child attributes
Workflow definition to trigger for datasource change events.
Show child attributes
Show child attributes
Response
Successful Response
ID of the entity
ID of the project
Provider discriminator (e.g. sharepoint); aligned with Data Sources values
Remote data source id in the Data Sources service
Active subscription id in the Data Sources service
Available options:
active, paused, disabled, deleted Allowed value:
"data_source"Workflow triggered by this linked data source.
Status of the workflow triggered by this linked data source.

