curl --request POST \
--url https://api.example.com/api/documents/imports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"id": "<string>",
"name": "<string>",
"container": false,
"path": ""
}
],
"catalog": true,
"enrich": false,
"ocr": false
}
'import requests
url = "https://api.example.com/api/documents/imports"
payload = {
"items": [
{
"id": "<string>",
"name": "<string>",
"container": False,
"path": ""
}
],
"catalog": True,
"enrich": False,
"ocr": False
}
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({
items: [{id: '<string>', name: '<string>', container: false, path: ''}],
catalog: true,
enrich: false,
ocr: false
})
};
fetch('https://api.example.com/api/documents/imports', 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/api/documents/imports",
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([
'items' => [
[
'id' => '<string>',
'name' => '<string>',
'container' => false,
'path' => ''
]
],
'catalog' => true,
'enrich' => false,
'ocr' => false
]),
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://api.example.com/api/documents/imports"
payload := strings.NewReader("{\n \"items\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"container\": false,\n \"path\": \"\"\n }\n ],\n \"catalog\": true,\n \"enrich\": false,\n \"ocr\": false\n}")
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://api.example.com/api/documents/imports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"container\": false,\n \"path\": \"\"\n }\n ],\n \"catalog\": true,\n \"enrich\": false,\n \"ocr\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/documents/imports")
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 = "{\n \"items\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"container\": false,\n \"path\": \"\"\n }\n ],\n \"catalog\": true,\n \"enrich\": false,\n \"ocr\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "notion",
"status": "queued",
"total": 123,
"imported": 123,
"skipped": 123,
"failed": 123,
"created_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"options": {},
"finished_at": "2023-11-07T05:31:56Z",
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"name": "<string>",
"path": "<string>",
"status": "queued",
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error": "<string>",
"web_url": "<string>"
}
]
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}Import what you picked
Start an import in the background. Poll GET /documents/imports/{id}.
curl --request POST \
--url https://api.example.com/api/documents/imports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"id": "<string>",
"name": "<string>",
"container": false,
"path": ""
}
],
"catalog": true,
"enrich": false,
"ocr": false
}
'import requests
url = "https://api.example.com/api/documents/imports"
payload = {
"items": [
{
"id": "<string>",
"name": "<string>",
"container": False,
"path": ""
}
],
"catalog": True,
"enrich": False,
"ocr": False
}
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({
items: [{id: '<string>', name: '<string>', container: false, path: ''}],
catalog: true,
enrich: false,
ocr: false
})
};
fetch('https://api.example.com/api/documents/imports', 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/api/documents/imports",
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([
'items' => [
[
'id' => '<string>',
'name' => '<string>',
'container' => false,
'path' => ''
]
],
'catalog' => true,
'enrich' => false,
'ocr' => false
]),
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://api.example.com/api/documents/imports"
payload := strings.NewReader("{\n \"items\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"container\": false,\n \"path\": \"\"\n }\n ],\n \"catalog\": true,\n \"enrich\": false,\n \"ocr\": false\n}")
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://api.example.com/api/documents/imports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"container\": false,\n \"path\": \"\"\n }\n ],\n \"catalog\": true,\n \"enrich\": false,\n \"ocr\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/documents/imports")
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 = "{\n \"items\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"container\": false,\n \"path\": \"\"\n }\n ],\n \"catalog\": true,\n \"enrich\": false,\n \"ocr\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "notion",
"status": "queued",
"total": 123,
"imported": 123,
"skipped": 123,
"failed": 123,
"created_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"options": {},
"finished_at": "2023-11-07T05:31:56Z",
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"name": "<string>",
"path": "<string>",
"status": "queued",
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error": "<string>",
"web_url": "<string>"
}
]
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
Start an import.
notion, sharepoint, google_drive, onedrive, confluence 1 - 500 elementsShow child attributes
Show child attributes
DataHub document type for every imported document.
Runbook, FAQ, Insight, Definition, Decision Add the documents to the shared catalogue (DataHub), as uploads are: anyone who can search it can read their text. Off keeps them private to you.
Have the enrichment crew suggest a summary, tags, terms and a domain. Off by default: any catalogue document can be classified later from its page.
Read scanned PDFs with OCR (slower). Without it a scanned PDF is imported without text.
Response
Successful Response
An import and, on its own page, its items.
notion, sharepoint, google_drive, onedrive, confluence queued, running, completed, failed Files and pages found (folders expanded).
New documents, and replaced ones.
Why the whole import stopped.
Show child attributes
Show child attributes
Was this page helpful?

