Real-time ingestion
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_bodyAuthentication
The API requires a JWT token with specific claims to authorize access. The token must be associated with a Client ID that has access to the specified publisher. The system validates that the organization associated with your Client ID has permission to access the publisher specified in your request.JWT Token Requirements
Your JWT must include the following claims:- A
subclaim containing your API Client ID. - A
scopeclaim that includesapi/access.
publisher_id field in the request body for accuracy.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The request body should be a JSON object with the following structure:
UUID of the publisher associated with the content. This must be associated with your organization.
The actual text content to be ingested and chunked.
Custom filename for this content.
Content type (e.g., article, blog, tutorial).
Title of the content item.
Subtitle of the content item.
Brief summary of the content.
URL to image associated with the content.
URL to the original content.
URL to a file associated with the content.
Identifying number for the content item.
Additional information about the content item.
Tags associated with the content (can be array or comma-separated string).
Author(s) of the content (can be array or comma-separated string).
ISBN if content is from a book.
Date when the content was published (recommended format: YYYY-MM-DD).
ID of the content producer.
Religious tradition (if applicable).
Publication type.
URL where the content is hosted.
Number of pages (for documents).
Duration (for audio/video content).
Title for level 2 heading/section.
Subtitle for level 2 heading/section.
Image URL for level 2 heading/section.
URL for level 2 heading/section.
File URL for level 2 heading/section.
Summary for level 2 heading/section.
Number for level 2 heading/section.
Additional info for level 2 heading/section.
Title for level 3 heading/section.
Subtitle for level 3 heading/section.
Image URL for level 3 heading/section.
URL for level 3 heading/section.
File URL for level 3 heading/section.
Summary for level 3 heading/section.
Response
Content successfully uploaded and processed.
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
