Document Object
This object represents a document in your semantic index.
Endpoints¶
| Endpoint | Details |
|---|---|
| POST /v20241104/documents | Add a document to your semantic index. |
| GET /v20241104/documents/{id} | Retrieve the document with the specified ID. |
| POST /v20241104/documents/{id} | Update the document with the specified ID in the semantic index. |
| DELETE /v20241104/documents/{id} | Delete the document with the specified ID from your semantic index. |
| POST /v20241104/documents/browse | Browse the documents in the semantic index. |
| GET /v20241104/documents/metadata-schema | Retrieve the metadata schema for your documents. |
Document object¶
-
Attributes
id string
Unique ID of the document.
object string
String representing the type of object.
For documents, this will have the value of
document. This is set by Gainly, and you cannot change it.
content nullable string
Content of the document.
created_at string
ISO 8601 formatted string that indicates the creation time of the document.
language string (enum)
Language code (of a supported language) that indicates the language of the document.
metadata object
JSON object containing arbitrary key-value pairs that indicate document attributes.
source_uri nullable string
Source URI of the document. Typically a unique address/location/identifier (within your app) for the document.
tenant_id string
For multi-tenant applications: Tenant ID this document belongs to.
title string
Title of the document.
updated_at string
ISO 8601 formatted string that indicates the last modification time of the document.
-
Document Object
{ "id": "PbOrIZIBzlg4zQqVFxxE", "object": "document", "title": "My awesome document", "content": "This document has great content. Can be really long, but is short here.", "tenant_id": "tenant123", "language": "en", "metadata": { "department": [ "Engineering", "Software Development" ], "region": "Midwest" } "source_uri": "/doc/7-my-awesome-document", "created_at": "2023-10-05T14:48:02Z", "updated_at": "2023-10-05T14:48:02Z" }