Ingest Connector Document
curl --request POST \
--url https://api.tensorpro.ai/api/v1/connectors/{connector_type}/ingest \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"credentials": {},
"external_id": "<string>",
"session_id": "<string>",
"domain": "technical"
}
'import requests
url = "https://api.tensorpro.ai/api/v1/connectors/{connector_type}/ingest"
payload = {
"credentials": {},
"external_id": "<string>",
"session_id": "<string>",
"domain": "technical"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
credentials: {},
external_id: '<string>',
session_id: '<string>',
domain: 'technical'
})
};
fetch('https://api.tensorpro.ai/api/v1/connectors/{connector_type}/ingest', 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.tensorpro.ai/api/v1/connectors/{connector_type}/ingest",
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([
'credentials' => [
],
'external_id' => '<string>',
'session_id' => '<string>',
'domain' => 'technical'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.tensorpro.ai/api/v1/connectors/{connector_type}/ingest"
payload := strings.NewReader("{\n \"credentials\": {},\n \"external_id\": \"<string>\",\n \"session_id\": \"<string>\",\n \"domain\": \"technical\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.tensorpro.ai/api/v1/connectors/{connector_type}/ingest")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"credentials\": {},\n \"external_id\": \"<string>\",\n \"session_id\": \"<string>\",\n \"domain\": \"technical\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tensorpro.ai/api/v1/connectors/{connector_type}/ingest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"credentials\": {},\n \"external_id\": \"<string>\",\n \"session_id\": \"<string>\",\n \"domain\": \"technical\"\n}"
response = http.request(request)
puts response.read_body{
"chunks_stored": 123,
"connector_type": "<string>",
"title": "<string>",
"user_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Connectors
Ingest Connector Document
Fetch a single document via the connector and ingest it.
Mirrors :func:edn.app.api.document.ingest_document’s write path:
text is chunked and each chunk becomes a DOCUMENT_VERIFIED
memory record. PDF documents are run through pypdf first (the
connector returns the raw bytes via metadata so this endpoint can
reuse the existing extractor).
POST
/
api
/
v1
/
connectors
/
{connector_type}
/
ingest
Ingest Connector Document
curl --request POST \
--url https://api.tensorpro.ai/api/v1/connectors/{connector_type}/ingest \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"credentials": {},
"external_id": "<string>",
"session_id": "<string>",
"domain": "technical"
}
'import requests
url = "https://api.tensorpro.ai/api/v1/connectors/{connector_type}/ingest"
payload = {
"credentials": {},
"external_id": "<string>",
"session_id": "<string>",
"domain": "technical"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
credentials: {},
external_id: '<string>',
session_id: '<string>',
domain: 'technical'
})
};
fetch('https://api.tensorpro.ai/api/v1/connectors/{connector_type}/ingest', 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.tensorpro.ai/api/v1/connectors/{connector_type}/ingest",
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([
'credentials' => [
],
'external_id' => '<string>',
'session_id' => '<string>',
'domain' => 'technical'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.tensorpro.ai/api/v1/connectors/{connector_type}/ingest"
payload := strings.NewReader("{\n \"credentials\": {},\n \"external_id\": \"<string>\",\n \"session_id\": \"<string>\",\n \"domain\": \"technical\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.tensorpro.ai/api/v1/connectors/{connector_type}/ingest")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"credentials\": {},\n \"external_id\": \"<string>\",\n \"session_id\": \"<string>\",\n \"domain\": \"technical\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tensorpro.ai/api/v1/connectors/{connector_type}/ingest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"credentials\": {},\n \"external_id\": \"<string>\",\n \"session_id\": \"<string>\",\n \"domain\": \"technical\"\n}"
response = http.request(request)
puts response.read_body{
"chunks_stored": 123,
"connector_type": "<string>",
"title": "<string>",
"user_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
EDN API key presented as 'Bearer ' in the Authorization header. Create and manage keys from the Console.
Path Parameters
Body
application/json
⌘I
