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

Index

Last updated 12 months ago

The Index model is a fundamental component of the Index Network, designed to facilitate context management and enable semantic interoperability within your system. It serves as a structured way to organize and store data related to specific contexts. Below is a description of the Index schema and its primary functions:

To create an index, you should first mint a LIT Programmable Key Pair (PKP).

Index Schema

The Index schema consists of several key properties:

Property
Type
Description

title

String

The title or name associated with the Index, providing context identification.

signerFunction

CID

IPFS CID that stores the Lit Action function

signerPublicKey

String

Public key of the minted LIT Programmable Key Pair

updatedAt

DateTime

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

deletedAt

DateTime

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

controllerDID

DID (Identifier)

The Decentralized Identifier (DID) of the controller for access control.

Endpoints

This section provides details about the available API endpoints.

Mint a new PKP on Testnet

Get index by ID

get
Path parameters
idstringRequired

Index ID

Responses
200
Successful operation
get
GET /api/indexes/{id} HTTP/1.1
Host: dev.index.network
Accept: */*
200

Successful operation

No content

Delete index

delete
Authorizations
Path parameters
idstringRequired

Index ID

Responses
200
Index deleted
delete
DELETE /api/indexes/{id} HTTP/1.1
Host: dev.index.network
Authorization: Bearer DID_SESSION_SERIALIZED
Accept: */*
200

Index deleted

No content

  • Index Schema
  • Endpoints
  • POSTCreate index
  • GETGet index by ID
  • PATCHUpdate index
  • DELETEDelete index

Create index

post
Authorizations
Body
titlestringOptional
signerPublicKeystringOptional
signerFunctionstringOptional
Responses
201
Index created
post
POST /api/indexes HTTP/1.1
Host: dev.index.network
Authorization: Bearer DID_SESSION_SERIALIZED
Content-Type: application/json
Accept: */*
Content-Length: 65

{
  "title": "text",
  "signerPublicKey": "text",
  "signerFunction": "text"
}
201

Index created

No content

Update index

patch
Authorizations
Path parameters
idstringRequired

Index ID

Body
titlestringOptional
signerFunctionstringOptional
Responses
200
Index updated
patch
PATCH /api/indexes/{id} HTTP/1.1
Host: dev.index.network
Authorization: Bearer DID_SESSION_SERIALIZED
Content-Type: application/json
Accept: */*
Content-Length: 40

{
  "title": "text",
  "signerFunction": "text"
}
200

Index updated

No content