Index Network Documentation
  • Overview
    • What is Index Network
    • Architecture
  • Getting Started
    • Quick start
    • Data Models
  • API Reference
    • Identity
      • Authentication
      • Profile
    • Semantic Index
      • Index
        • Creator Roles
        • Privacy
      • IndexItem
      • Embedding
    • Discovery Protocol
      • Completions
      • Private Conversations
      • Semantic Listener
      • Vector Search
  • Resources
    • Libraries
      • Node.js SDK
      • Python SDK
      • React SDK
      • Langchain
  • More
    • Contact
Powered by GitBook
On this page
Edit on GitHub
  1. API Reference
  2. Semantic Index

IndexItem

Last updated 12 months ago

Item represents a graph node within an Index. It serves as a structured way to organize and store data related to specific contexts.

Furthermore, any node within the ComposeDB ecosystem can be effectively indexed thanks to the Item schema. It provides a standardized approach to representing and managing various types of data, making it possible to seamlessly integrate and index diverse components.

Below is a description of the Item schema and its primary functions:

Item Schema

The Item schema consists of several key properties:

Property
Type
Description

indexId

StreamID

Identifier of the Index to which this item belongs.

index

Index

The actual Index object that this item is associated with, accessed through the indexId.

itemId

StreamID

Identifier of the item (node) represented in the Index.

node

Node

The actual Node object that this item represents, accessed through the itemId.

type

string

ComposeDB Model name of the indexed node. eg: WebPage

updatedAt

DateTime

The timestamp when the IndexItem was last updated, ensuring data accuracy.

deletedAt

DateTime

The timestamp when the IndexItem was deleted (if applicable).

indexedAt

DateTime

The timestamp of the Item's last index time.

List items in an index

get
Path parameters
indexIdstringRequired

Index ID

Query parameters
querystringOptional
cursorstringOptional
limitintegerOptionalDefault: 24
Responses
200
Successful operation
get
GET /api/indexes/{indexId}/items HTTP/1.1
Host: dev.index.network
Accept: */*
200

Successful operation

No content

Add item to index

post
Authorizations
Path parameters
indexIdstringRequired

Index ID

itemIdstringRequired

Item ID

Responses
201
Item added
post
POST /api/indexes/{indexId}/items/{itemId} HTTP/1.1
Host: dev.index.network
Authorization: Bearer DID_SESSION_SERIALIZED
Accept: */*
201

Item added

No content

Remove item from index

delete
Authorizations
Path parameters
indexIdstringRequired

Index ID

itemIdstringRequired

Item ID

Responses
200
Item removed
delete
DELETE /api/indexes/{indexId}/items/{itemId} HTTP/1.1
Host: dev.index.network
Authorization: Bearer DID_SESSION_SERIALIZED
Accept: */*
200

Item removed

No content

  • Item Schema
  • GETList items in an index
  • POSTAdd item to index
  • DELETERemove item from index