Skip to main content
GET
/
v1
/
chunks
/
{chunk_id}
/
neighbors
Get Chunk Neighbors Handler
curl --request GET \
  --url http://localhost:8000/v1/chunks/{chunk_id}/neighbors
{
  "items": [
    {
      "part_type": "SECTION",
      "path_part_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "parent_path_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "metadata_obj_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "depth": 123,
      "materialized_path": "<string>",
      "system_managed": true,
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "page_number": 123
    }
  ],
  "anchor_index": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.knowledgestack.ai/llms.txt

Use this file to discover all available pages before exploring further.

Headers

authorization
string | null

Path Parameters

chunk_id
string<uuid>
required

Query Parameters

prev
integer
default:1

Number of preceding siblings to include

Required range: 0 <= x <= 20
next
integer
default:1

Number of succeeding siblings to include

Required range: 0 <= x <= 20
chunks_only
boolean
default:false

When true, stop traversal at non-CHUNK siblings (default: false)

Cookies

ks_uat
string | null

Response

Successful Response

Response for chunk neighbor traversal.

Returns items in the same SectionOrChunkItem discriminated union format used by the document version contents endpoint.

items
(SectionContentItem · object | ChunkContentItem · object)[]
required

Ordered siblings: preceding → anchor → succeeding

Response model for a section item in document version contents.

anchor_index
integer
required

Index of the anchor chunk in items