IndexItem

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

Last updated