Content
Real-time ingestion
deprecated
Real-time ingestion.
POST
/
ingestion
/
v1
/
real_time_upload
Real-time ingestion
curl --request POST \
--url https://platform.ai.gloo.com/ingestion/v1/real_time_upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"content": "This is the full text content that needs to be processed and indexed for search. It is the only required field.",
"filename": "sample_document_name.txt",
"producer_id": "producer-123",
"publisher_id": "550e8400-e29b-41d4-a716-446655440000",
"tradition": "Catholic",
"evergreen": true,
"drm": [
"aspen",
"kallm"
],
"author": [
"Jane Doe",
"John Smith"
],
"isbn": "978-3-16-148410-0",
"item_title": "Main Document Title",
"item_subtitle": "An informative subtitle",
"item_image": "https://example.com/images/document-cover.jpg",
"item_url": "https://example.com/original-content",
"item_file": "https://example.com/downloads/document.pdf",
"item_summary": "A brief summary of the document's content and purpose.",
"item_number": "DOC-2023-001",
"item_extra": "Additional information about this item",
"item_tags": [
"documentation",
"api",
"tutorial",
"reference"
],
"h2_title": "Section Heading",
"h2_subtitle": "Section Subheading",
"h2_image": "https://example.com/images/section-image.jpg",
"h2_url": "https://example.com/section",
"h2_file": "https://example.com/downloads/section.pdf",
"h2_summary": "Summary of this specific section.",
"h2_number": "2.1",
"h2_extra": "Additional section metadata",
"h3_title": "Subsection Heading",
"h3_subtitle": "Subsection Subheading",
"h3_image": "https://example.com/images/subsection-image.jpg",
"h3_url": "https://example.com/subsection",
"h3_file": "https://example.com/downloads/subsection.pdf",
"h3_summary": "Summary of this specific subsection.",
"h3_number": "2.1.3",
"h3_extra": "Additional subsection metadata",
"type": "Article",
"duration": "15 minutes",
"pages": "12",
"publication_date": "2023-07-15",
"hosted_url": "https://cdn.example.com/hosted-content",
"pub_type": "technical"
}
EOFimport requests
url = "https://platform.ai.gloo.com/ingestion/v1/real_time_upload"
payload = {
"content": "This is the full text content that needs to be processed and indexed for search. It is the only required field.",
"filename": "sample_document_name.txt",
"producer_id": "producer-123",
"publisher_id": "550e8400-e29b-41d4-a716-446655440000",
"tradition": "Catholic",
"evergreen": True,
"drm": ["aspen", "kallm"],
"author": ["Jane Doe", "John Smith"],
"isbn": "978-3-16-148410-0",
"item_title": "Main Document Title",
"item_subtitle": "An informative subtitle",
"item_image": "https://example.com/images/document-cover.jpg",
"item_url": "https://example.com/original-content",
"item_file": "https://example.com/downloads/document.pdf",
"item_summary": "A brief summary of the document's content and purpose.",
"item_number": "DOC-2023-001",
"item_extra": "Additional information about this item",
"item_tags": ["documentation", "api", "tutorial", "reference"],
"h2_title": "Section Heading",
"h2_subtitle": "Section Subheading",
"h2_image": "https://example.com/images/section-image.jpg",
"h2_url": "https://example.com/section",
"h2_file": "https://example.com/downloads/section.pdf",
"h2_summary": "Summary of this specific section.",
"h2_number": "2.1",
"h2_extra": "Additional section metadata",
"h3_title": "Subsection Heading",
"h3_subtitle": "Subsection Subheading",
"h3_image": "https://example.com/images/subsection-image.jpg",
"h3_url": "https://example.com/subsection",
"h3_file": "https://example.com/downloads/subsection.pdf",
"h3_summary": "Summary of this specific subsection.",
"h3_number": "2.1.3",
"h3_extra": "Additional subsection metadata",
"type": "Article",
"duration": "15 minutes",
"pages": "12",
"publication_date": "2023-07-15",
"hosted_url": "https://cdn.example.com/hosted-content",
"pub_type": "technical"
}
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({
content: 'This is the full text content that needs to be processed and indexed for search. It is the only required field.',
filename: 'sample_document_name.txt',
producer_id: 'producer-123',
publisher_id: '550e8400-e29b-41d4-a716-446655440000',
tradition: 'Catholic',
evergreen: true,
drm: ['aspen', 'kallm'],
author: ['Jane Doe', 'John Smith'],
isbn: '978-3-16-148410-0',
item_title: 'Main Document Title',
item_subtitle: 'An informative subtitle',
item_image: 'https://example.com/images/document-cover.jpg',
item_url: 'https://example.com/original-content',
item_file: 'https://example.com/downloads/document.pdf',
item_summary: 'A brief summary of the document\'s content and purpose.',
item_number: 'DOC-2023-001',
item_extra: 'Additional information about this item',
item_tags: ['documentation', 'api', 'tutorial', 'reference'],
h2_title: 'Section Heading',
h2_subtitle: 'Section Subheading',
h2_image: 'https://example.com/images/section-image.jpg',
h2_url: 'https://example.com/section',
h2_file: 'https://example.com/downloads/section.pdf',
h2_summary: 'Summary of this specific section.',
h2_number: '2.1',
h2_extra: 'Additional section metadata',
h3_title: 'Subsection Heading',
h3_subtitle: 'Subsection Subheading',
h3_image: 'https://example.com/images/subsection-image.jpg',
h3_url: 'https://example.com/subsection',
h3_file: 'https://example.com/downloads/subsection.pdf',
h3_summary: 'Summary of this specific subsection.',
h3_number: '2.1.3',
h3_extra: 'Additional subsection metadata',
type: 'Article',
duration: '15 minutes',
pages: '12',
publication_date: '2023-07-15',
hosted_url: 'https://cdn.example.com/hosted-content',
pub_type: 'technical'
})
};
fetch('https://platform.ai.gloo.com/ingestion/v1/real_time_upload', 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://platform.ai.gloo.com/ingestion/v1/real_time_upload",
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([
'content' => 'This is the full text content that needs to be processed and indexed for search. It is the only required field.',
'filename' => 'sample_document_name.txt',
'producer_id' => 'producer-123',
'publisher_id' => '550e8400-e29b-41d4-a716-446655440000',
'tradition' => 'Catholic',
'evergreen' => true,
'drm' => [
'aspen',
'kallm'
],
'author' => [
'Jane Doe',
'John Smith'
],
'isbn' => '978-3-16-148410-0',
'item_title' => 'Main Document Title',
'item_subtitle' => 'An informative subtitle',
'item_image' => 'https://example.com/images/document-cover.jpg',
'item_url' => 'https://example.com/original-content',
'item_file' => 'https://example.com/downloads/document.pdf',
'item_summary' => 'A brief summary of the document\'s content and purpose.',
'item_number' => 'DOC-2023-001',
'item_extra' => 'Additional information about this item',
'item_tags' => [
'documentation',
'api',
'tutorial',
'reference'
],
'h2_title' => 'Section Heading',
'h2_subtitle' => 'Section Subheading',
'h2_image' => 'https://example.com/images/section-image.jpg',
'h2_url' => 'https://example.com/section',
'h2_file' => 'https://example.com/downloads/section.pdf',
'h2_summary' => 'Summary of this specific section.',
'h2_number' => '2.1',
'h2_extra' => 'Additional section metadata',
'h3_title' => 'Subsection Heading',
'h3_subtitle' => 'Subsection Subheading',
'h3_image' => 'https://example.com/images/subsection-image.jpg',
'h3_url' => 'https://example.com/subsection',
'h3_file' => 'https://example.com/downloads/subsection.pdf',
'h3_summary' => 'Summary of this specific subsection.',
'h3_number' => '2.1.3',
'h3_extra' => 'Additional subsection metadata',
'type' => 'Article',
'duration' => '15 minutes',
'pages' => '12',
'publication_date' => '2023-07-15',
'hosted_url' => 'https://cdn.example.com/hosted-content',
'pub_type' => 'technical'
]),
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://platform.ai.gloo.com/ingestion/v1/real_time_upload"
payload := strings.NewReader("{\n \"content\": \"This is the full text content that needs to be processed and indexed for search. It is the only required field.\",\n \"filename\": \"sample_document_name.txt\",\n \"producer_id\": \"producer-123\",\n \"publisher_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"tradition\": \"Catholic\",\n \"evergreen\": true,\n \"drm\": [\n \"aspen\",\n \"kallm\"\n ],\n \"author\": [\n \"Jane Doe\",\n \"John Smith\"\n ],\n \"isbn\": \"978-3-16-148410-0\",\n \"item_title\": \"Main Document Title\",\n \"item_subtitle\": \"An informative subtitle\",\n \"item_image\": \"https://example.com/images/document-cover.jpg\",\n \"item_url\": \"https://example.com/original-content\",\n \"item_file\": \"https://example.com/downloads/document.pdf\",\n \"item_summary\": \"A brief summary of the document's content and purpose.\",\n \"item_number\": \"DOC-2023-001\",\n \"item_extra\": \"Additional information about this item\",\n \"item_tags\": [\n \"documentation\",\n \"api\",\n \"tutorial\",\n \"reference\"\n ],\n \"h2_title\": \"Section Heading\",\n \"h2_subtitle\": \"Section Subheading\",\n \"h2_image\": \"https://example.com/images/section-image.jpg\",\n \"h2_url\": \"https://example.com/section\",\n \"h2_file\": \"https://example.com/downloads/section.pdf\",\n \"h2_summary\": \"Summary of this specific section.\",\n \"h2_number\": \"2.1\",\n \"h2_extra\": \"Additional section metadata\",\n \"h3_title\": \"Subsection Heading\",\n \"h3_subtitle\": \"Subsection Subheading\",\n \"h3_image\": \"https://example.com/images/subsection-image.jpg\",\n \"h3_url\": \"https://example.com/subsection\",\n \"h3_file\": \"https://example.com/downloads/subsection.pdf\",\n \"h3_summary\": \"Summary of this specific subsection.\",\n \"h3_number\": \"2.1.3\",\n \"h3_extra\": \"Additional subsection metadata\",\n \"type\": \"Article\",\n \"duration\": \"15 minutes\",\n \"pages\": \"12\",\n \"publication_date\": \"2023-07-15\",\n \"hosted_url\": \"https://cdn.example.com/hosted-content\",\n \"pub_type\": \"technical\"\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://platform.ai.gloo.com/ingestion/v1/real_time_upload")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"This is the full text content that needs to be processed and indexed for search. It is the only required field.\",\n \"filename\": \"sample_document_name.txt\",\n \"producer_id\": \"producer-123\",\n \"publisher_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"tradition\": \"Catholic\",\n \"evergreen\": true,\n \"drm\": [\n \"aspen\",\n \"kallm\"\n ],\n \"author\": [\n \"Jane Doe\",\n \"John Smith\"\n ],\n \"isbn\": \"978-3-16-148410-0\",\n \"item_title\": \"Main Document Title\",\n \"item_subtitle\": \"An informative subtitle\",\n \"item_image\": \"https://example.com/images/document-cover.jpg\",\n \"item_url\": \"https://example.com/original-content\",\n \"item_file\": \"https://example.com/downloads/document.pdf\",\n \"item_summary\": \"A brief summary of the document's content and purpose.\",\n \"item_number\": \"DOC-2023-001\",\n \"item_extra\": \"Additional information about this item\",\n \"item_tags\": [\n \"documentation\",\n \"api\",\n \"tutorial\",\n \"reference\"\n ],\n \"h2_title\": \"Section Heading\",\n \"h2_subtitle\": \"Section Subheading\",\n \"h2_image\": \"https://example.com/images/section-image.jpg\",\n \"h2_url\": \"https://example.com/section\",\n \"h2_file\": \"https://example.com/downloads/section.pdf\",\n \"h2_summary\": \"Summary of this specific section.\",\n \"h2_number\": \"2.1\",\n \"h2_extra\": \"Additional section metadata\",\n \"h3_title\": \"Subsection Heading\",\n \"h3_subtitle\": \"Subsection Subheading\",\n \"h3_image\": \"https://example.com/images/subsection-image.jpg\",\n \"h3_url\": \"https://example.com/subsection\",\n \"h3_file\": \"https://example.com/downloads/subsection.pdf\",\n \"h3_summary\": \"Summary of this specific subsection.\",\n \"h3_number\": \"2.1.3\",\n \"h3_extra\": \"Additional subsection metadata\",\n \"type\": \"Article\",\n \"duration\": \"15 minutes\",\n \"pages\": \"12\",\n \"publication_date\": \"2023-07-15\",\n \"hosted_url\": \"https://cdn.example.com/hosted-content\",\n \"pub_type\": \"technical\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.ai.gloo.com/ingestion/v1/real_time_upload")
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 \"content\": \"This is the full text content that needs to be processed and indexed for search. It is the only required field.\",\n \"filename\": \"sample_document_name.txt\",\n \"producer_id\": \"producer-123\",\n \"publisher_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"tradition\": \"Catholic\",\n \"evergreen\": true,\n \"drm\": [\n \"aspen\",\n \"kallm\"\n ],\n \"author\": [\n \"Jane Doe\",\n \"John Smith\"\n ],\n \"isbn\": \"978-3-16-148410-0\",\n \"item_title\": \"Main Document Title\",\n \"item_subtitle\": \"An informative subtitle\",\n \"item_image\": \"https://example.com/images/document-cover.jpg\",\n \"item_url\": \"https://example.com/original-content\",\n \"item_file\": \"https://example.com/downloads/document.pdf\",\n \"item_summary\": \"A brief summary of the document's content and purpose.\",\n \"item_number\": \"DOC-2023-001\",\n \"item_extra\": \"Additional information about this item\",\n \"item_tags\": [\n \"documentation\",\n \"api\",\n \"tutorial\",\n \"reference\"\n ],\n \"h2_title\": \"Section Heading\",\n \"h2_subtitle\": \"Section Subheading\",\n \"h2_image\": \"https://example.com/images/section-image.jpg\",\n \"h2_url\": \"https://example.com/section\",\n \"h2_file\": \"https://example.com/downloads/section.pdf\",\n \"h2_summary\": \"Summary of this specific section.\",\n \"h2_number\": \"2.1\",\n \"h2_extra\": \"Additional section metadata\",\n \"h3_title\": \"Subsection Heading\",\n \"h3_subtitle\": \"Subsection Subheading\",\n \"h3_image\": \"https://example.com/images/subsection-image.jpg\",\n \"h3_url\": \"https://example.com/subsection\",\n \"h3_file\": \"https://example.com/downloads/subsection.pdf\",\n \"h3_summary\": \"Summary of this specific subsection.\",\n \"h3_number\": \"2.1.3\",\n \"h3_extra\": \"Additional subsection metadata\",\n \"type\": \"Article\",\n \"duration\": \"15 minutes\",\n \"pages\": \"12\",\n \"publication_date\": \"2023-07-15\",\n \"hosted_url\": \"https://cdn.example.com/hosted-content\",\n \"pub_type\": \"technical\"\n}"
response = http.request(request)
puts response.read_bodyThis endpoint has been deprecated. Use the Direct File Upload API instead. The Upload Content guide covers the current way to ingest files. The deprecated Realtime Upload tutorial built a pipeline on this endpoint.
Authentication
The API requires an API key with access to the specified publisher. Your API key’s organization must have permission to access that publisher.You can only send content to a publisher that belongs to your organization, so double-check the
publisher_id in the request body.Authorizations
Bearer authentication header of the form Bearer <api-key>, where <api-key> is your API key.
Body
application/json
The request body should be a JSON object with the following structure:
Response
Content successfully uploaded and processed.
⌘I
Real-time ingestion
curl --request POST \
--url https://platform.ai.gloo.com/ingestion/v1/real_time_upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"content": "This is the full text content that needs to be processed and indexed for search. It is the only required field.",
"filename": "sample_document_name.txt",
"producer_id": "producer-123",
"publisher_id": "550e8400-e29b-41d4-a716-446655440000",
"tradition": "Catholic",
"evergreen": true,
"drm": [
"aspen",
"kallm"
],
"author": [
"Jane Doe",
"John Smith"
],
"isbn": "978-3-16-148410-0",
"item_title": "Main Document Title",
"item_subtitle": "An informative subtitle",
"item_image": "https://example.com/images/document-cover.jpg",
"item_url": "https://example.com/original-content",
"item_file": "https://example.com/downloads/document.pdf",
"item_summary": "A brief summary of the document's content and purpose.",
"item_number": "DOC-2023-001",
"item_extra": "Additional information about this item",
"item_tags": [
"documentation",
"api",
"tutorial",
"reference"
],
"h2_title": "Section Heading",
"h2_subtitle": "Section Subheading",
"h2_image": "https://example.com/images/section-image.jpg",
"h2_url": "https://example.com/section",
"h2_file": "https://example.com/downloads/section.pdf",
"h2_summary": "Summary of this specific section.",
"h2_number": "2.1",
"h2_extra": "Additional section metadata",
"h3_title": "Subsection Heading",
"h3_subtitle": "Subsection Subheading",
"h3_image": "https://example.com/images/subsection-image.jpg",
"h3_url": "https://example.com/subsection",
"h3_file": "https://example.com/downloads/subsection.pdf",
"h3_summary": "Summary of this specific subsection.",
"h3_number": "2.1.3",
"h3_extra": "Additional subsection metadata",
"type": "Article",
"duration": "15 minutes",
"pages": "12",
"publication_date": "2023-07-15",
"hosted_url": "https://cdn.example.com/hosted-content",
"pub_type": "technical"
}
EOFimport requests
url = "https://platform.ai.gloo.com/ingestion/v1/real_time_upload"
payload = {
"content": "This is the full text content that needs to be processed and indexed for search. It is the only required field.",
"filename": "sample_document_name.txt",
"producer_id": "producer-123",
"publisher_id": "550e8400-e29b-41d4-a716-446655440000",
"tradition": "Catholic",
"evergreen": True,
"drm": ["aspen", "kallm"],
"author": ["Jane Doe", "John Smith"],
"isbn": "978-3-16-148410-0",
"item_title": "Main Document Title",
"item_subtitle": "An informative subtitle",
"item_image": "https://example.com/images/document-cover.jpg",
"item_url": "https://example.com/original-content",
"item_file": "https://example.com/downloads/document.pdf",
"item_summary": "A brief summary of the document's content and purpose.",
"item_number": "DOC-2023-001",
"item_extra": "Additional information about this item",
"item_tags": ["documentation", "api", "tutorial", "reference"],
"h2_title": "Section Heading",
"h2_subtitle": "Section Subheading",
"h2_image": "https://example.com/images/section-image.jpg",
"h2_url": "https://example.com/section",
"h2_file": "https://example.com/downloads/section.pdf",
"h2_summary": "Summary of this specific section.",
"h2_number": "2.1",
"h2_extra": "Additional section metadata",
"h3_title": "Subsection Heading",
"h3_subtitle": "Subsection Subheading",
"h3_image": "https://example.com/images/subsection-image.jpg",
"h3_url": "https://example.com/subsection",
"h3_file": "https://example.com/downloads/subsection.pdf",
"h3_summary": "Summary of this specific subsection.",
"h3_number": "2.1.3",
"h3_extra": "Additional subsection metadata",
"type": "Article",
"duration": "15 minutes",
"pages": "12",
"publication_date": "2023-07-15",
"hosted_url": "https://cdn.example.com/hosted-content",
"pub_type": "technical"
}
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({
content: 'This is the full text content that needs to be processed and indexed for search. It is the only required field.',
filename: 'sample_document_name.txt',
producer_id: 'producer-123',
publisher_id: '550e8400-e29b-41d4-a716-446655440000',
tradition: 'Catholic',
evergreen: true,
drm: ['aspen', 'kallm'],
author: ['Jane Doe', 'John Smith'],
isbn: '978-3-16-148410-0',
item_title: 'Main Document Title',
item_subtitle: 'An informative subtitle',
item_image: 'https://example.com/images/document-cover.jpg',
item_url: 'https://example.com/original-content',
item_file: 'https://example.com/downloads/document.pdf',
item_summary: 'A brief summary of the document\'s content and purpose.',
item_number: 'DOC-2023-001',
item_extra: 'Additional information about this item',
item_tags: ['documentation', 'api', 'tutorial', 'reference'],
h2_title: 'Section Heading',
h2_subtitle: 'Section Subheading',
h2_image: 'https://example.com/images/section-image.jpg',
h2_url: 'https://example.com/section',
h2_file: 'https://example.com/downloads/section.pdf',
h2_summary: 'Summary of this specific section.',
h2_number: '2.1',
h2_extra: 'Additional section metadata',
h3_title: 'Subsection Heading',
h3_subtitle: 'Subsection Subheading',
h3_image: 'https://example.com/images/subsection-image.jpg',
h3_url: 'https://example.com/subsection',
h3_file: 'https://example.com/downloads/subsection.pdf',
h3_summary: 'Summary of this specific subsection.',
h3_number: '2.1.3',
h3_extra: 'Additional subsection metadata',
type: 'Article',
duration: '15 minutes',
pages: '12',
publication_date: '2023-07-15',
hosted_url: 'https://cdn.example.com/hosted-content',
pub_type: 'technical'
})
};
fetch('https://platform.ai.gloo.com/ingestion/v1/real_time_upload', 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://platform.ai.gloo.com/ingestion/v1/real_time_upload",
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([
'content' => 'This is the full text content that needs to be processed and indexed for search. It is the only required field.',
'filename' => 'sample_document_name.txt',
'producer_id' => 'producer-123',
'publisher_id' => '550e8400-e29b-41d4-a716-446655440000',
'tradition' => 'Catholic',
'evergreen' => true,
'drm' => [
'aspen',
'kallm'
],
'author' => [
'Jane Doe',
'John Smith'
],
'isbn' => '978-3-16-148410-0',
'item_title' => 'Main Document Title',
'item_subtitle' => 'An informative subtitle',
'item_image' => 'https://example.com/images/document-cover.jpg',
'item_url' => 'https://example.com/original-content',
'item_file' => 'https://example.com/downloads/document.pdf',
'item_summary' => 'A brief summary of the document\'s content and purpose.',
'item_number' => 'DOC-2023-001',
'item_extra' => 'Additional information about this item',
'item_tags' => [
'documentation',
'api',
'tutorial',
'reference'
],
'h2_title' => 'Section Heading',
'h2_subtitle' => 'Section Subheading',
'h2_image' => 'https://example.com/images/section-image.jpg',
'h2_url' => 'https://example.com/section',
'h2_file' => 'https://example.com/downloads/section.pdf',
'h2_summary' => 'Summary of this specific section.',
'h2_number' => '2.1',
'h2_extra' => 'Additional section metadata',
'h3_title' => 'Subsection Heading',
'h3_subtitle' => 'Subsection Subheading',
'h3_image' => 'https://example.com/images/subsection-image.jpg',
'h3_url' => 'https://example.com/subsection',
'h3_file' => 'https://example.com/downloads/subsection.pdf',
'h3_summary' => 'Summary of this specific subsection.',
'h3_number' => '2.1.3',
'h3_extra' => 'Additional subsection metadata',
'type' => 'Article',
'duration' => '15 minutes',
'pages' => '12',
'publication_date' => '2023-07-15',
'hosted_url' => 'https://cdn.example.com/hosted-content',
'pub_type' => 'technical'
]),
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://platform.ai.gloo.com/ingestion/v1/real_time_upload"
payload := strings.NewReader("{\n \"content\": \"This is the full text content that needs to be processed and indexed for search. It is the only required field.\",\n \"filename\": \"sample_document_name.txt\",\n \"producer_id\": \"producer-123\",\n \"publisher_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"tradition\": \"Catholic\",\n \"evergreen\": true,\n \"drm\": [\n \"aspen\",\n \"kallm\"\n ],\n \"author\": [\n \"Jane Doe\",\n \"John Smith\"\n ],\n \"isbn\": \"978-3-16-148410-0\",\n \"item_title\": \"Main Document Title\",\n \"item_subtitle\": \"An informative subtitle\",\n \"item_image\": \"https://example.com/images/document-cover.jpg\",\n \"item_url\": \"https://example.com/original-content\",\n \"item_file\": \"https://example.com/downloads/document.pdf\",\n \"item_summary\": \"A brief summary of the document's content and purpose.\",\n \"item_number\": \"DOC-2023-001\",\n \"item_extra\": \"Additional information about this item\",\n \"item_tags\": [\n \"documentation\",\n \"api\",\n \"tutorial\",\n \"reference\"\n ],\n \"h2_title\": \"Section Heading\",\n \"h2_subtitle\": \"Section Subheading\",\n \"h2_image\": \"https://example.com/images/section-image.jpg\",\n \"h2_url\": \"https://example.com/section\",\n \"h2_file\": \"https://example.com/downloads/section.pdf\",\n \"h2_summary\": \"Summary of this specific section.\",\n \"h2_number\": \"2.1\",\n \"h2_extra\": \"Additional section metadata\",\n \"h3_title\": \"Subsection Heading\",\n \"h3_subtitle\": \"Subsection Subheading\",\n \"h3_image\": \"https://example.com/images/subsection-image.jpg\",\n \"h3_url\": \"https://example.com/subsection\",\n \"h3_file\": \"https://example.com/downloads/subsection.pdf\",\n \"h3_summary\": \"Summary of this specific subsection.\",\n \"h3_number\": \"2.1.3\",\n \"h3_extra\": \"Additional subsection metadata\",\n \"type\": \"Article\",\n \"duration\": \"15 minutes\",\n \"pages\": \"12\",\n \"publication_date\": \"2023-07-15\",\n \"hosted_url\": \"https://cdn.example.com/hosted-content\",\n \"pub_type\": \"technical\"\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://platform.ai.gloo.com/ingestion/v1/real_time_upload")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"This is the full text content that needs to be processed and indexed for search. It is the only required field.\",\n \"filename\": \"sample_document_name.txt\",\n \"producer_id\": \"producer-123\",\n \"publisher_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"tradition\": \"Catholic\",\n \"evergreen\": true,\n \"drm\": [\n \"aspen\",\n \"kallm\"\n ],\n \"author\": [\n \"Jane Doe\",\n \"John Smith\"\n ],\n \"isbn\": \"978-3-16-148410-0\",\n \"item_title\": \"Main Document Title\",\n \"item_subtitle\": \"An informative subtitle\",\n \"item_image\": \"https://example.com/images/document-cover.jpg\",\n \"item_url\": \"https://example.com/original-content\",\n \"item_file\": \"https://example.com/downloads/document.pdf\",\n \"item_summary\": \"A brief summary of the document's content and purpose.\",\n \"item_number\": \"DOC-2023-001\",\n \"item_extra\": \"Additional information about this item\",\n \"item_tags\": [\n \"documentation\",\n \"api\",\n \"tutorial\",\n \"reference\"\n ],\n \"h2_title\": \"Section Heading\",\n \"h2_subtitle\": \"Section Subheading\",\n \"h2_image\": \"https://example.com/images/section-image.jpg\",\n \"h2_url\": \"https://example.com/section\",\n \"h2_file\": \"https://example.com/downloads/section.pdf\",\n \"h2_summary\": \"Summary of this specific section.\",\n \"h2_number\": \"2.1\",\n \"h2_extra\": \"Additional section metadata\",\n \"h3_title\": \"Subsection Heading\",\n \"h3_subtitle\": \"Subsection Subheading\",\n \"h3_image\": \"https://example.com/images/subsection-image.jpg\",\n \"h3_url\": \"https://example.com/subsection\",\n \"h3_file\": \"https://example.com/downloads/subsection.pdf\",\n \"h3_summary\": \"Summary of this specific subsection.\",\n \"h3_number\": \"2.1.3\",\n \"h3_extra\": \"Additional subsection metadata\",\n \"type\": \"Article\",\n \"duration\": \"15 minutes\",\n \"pages\": \"12\",\n \"publication_date\": \"2023-07-15\",\n \"hosted_url\": \"https://cdn.example.com/hosted-content\",\n \"pub_type\": \"technical\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.ai.gloo.com/ingestion/v1/real_time_upload")
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 \"content\": \"This is the full text content that needs to be processed and indexed for search. It is the only required field.\",\n \"filename\": \"sample_document_name.txt\",\n \"producer_id\": \"producer-123\",\n \"publisher_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"tradition\": \"Catholic\",\n \"evergreen\": true,\n \"drm\": [\n \"aspen\",\n \"kallm\"\n ],\n \"author\": [\n \"Jane Doe\",\n \"John Smith\"\n ],\n \"isbn\": \"978-3-16-148410-0\",\n \"item_title\": \"Main Document Title\",\n \"item_subtitle\": \"An informative subtitle\",\n \"item_image\": \"https://example.com/images/document-cover.jpg\",\n \"item_url\": \"https://example.com/original-content\",\n \"item_file\": \"https://example.com/downloads/document.pdf\",\n \"item_summary\": \"A brief summary of the document's content and purpose.\",\n \"item_number\": \"DOC-2023-001\",\n \"item_extra\": \"Additional information about this item\",\n \"item_tags\": [\n \"documentation\",\n \"api\",\n \"tutorial\",\n \"reference\"\n ],\n \"h2_title\": \"Section Heading\",\n \"h2_subtitle\": \"Section Subheading\",\n \"h2_image\": \"https://example.com/images/section-image.jpg\",\n \"h2_url\": \"https://example.com/section\",\n \"h2_file\": \"https://example.com/downloads/section.pdf\",\n \"h2_summary\": \"Summary of this specific section.\",\n \"h2_number\": \"2.1\",\n \"h2_extra\": \"Additional section metadata\",\n \"h3_title\": \"Subsection Heading\",\n \"h3_subtitle\": \"Subsection Subheading\",\n \"h3_image\": \"https://example.com/images/subsection-image.jpg\",\n \"h3_url\": \"https://example.com/subsection\",\n \"h3_file\": \"https://example.com/downloads/subsection.pdf\",\n \"h3_summary\": \"Summary of this specific subsection.\",\n \"h3_number\": \"2.1.3\",\n \"h3_extra\": \"Additional subsection metadata\",\n \"type\": \"Article\",\n \"duration\": \"15 minutes\",\n \"pages\": \"12\",\n \"publication_date\": \"2023-07-15\",\n \"hosted_url\": \"https://cdn.example.com/hosted-content\",\n \"pub_type\": \"technical\"\n}"
response = http.request(request)
puts response.read_body
