KnowledgeBase

Get a single knowledge document chunk location

GET
/knowledge-base/documents/{documentId}/chunks/{chunkIndex}

Authorization

SupabaseBearer
AuthorizationBearer <token>

Supabase user access token (Authorization: Bearer JWT)

In: header

Path Parameters

documentId*string
Formatuuid
chunkIndex*integer
Range0 <= value

Header Parameters

x-organization-id*string

Must match the organizationId path segment

Formatuuid
x-organization-role*string

Portal impersonation role (pair with x-organization-id)

Value in

  • "ORG_ADMIN"
  • "ORG_MEMBER"

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/knowledge-base/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/chunks/0" \  -H "x-organization-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "x-organization-role: ORG_ADMIN"
{  "chunkIndex": 0,  "location": {    "lineStart": 1,    "lineEnd": 1,    "pageNumber": 1,    "pageCount": 1,    "highlightRects": [      {        "pageNumber": 1,        "x1": 0,        "y1": 0,        "x2": 0,        "y2": 0      }    ]  }}
{  "message": "string"}
Empty
{  "message": "string"}
{  "message": "string"}