Pinter
ENID
Documents
Lihat sebagai Markdown

Semantic Search over Knowledge Documents

POST/api/knowledge/documents/hub-query

Overview

Embeds the query and searches the Qdrant chunks of processed documents the caller may view. Results are ordered by cosine similarity (no reranker).

Authentication & Headers

  • Auth: Bearer Token
  • Required Header: API-Version: 1

Parameters & Request Body Fields

  • query (string, required): Natural language question.
  • top_k (integer, optional, default: 5, max: 20): Maximum returned chunks.
  • threshold (number, optional, default: 0.35): Minimum similarity.
  • filters.document_ids (array, optional): Restrict the search to these documents.

Body permintaan

application/json

{}

Respons

200 Matching chunks

400 Bad Request - The request parameters or headers are invalid (e.g. unsupported API-Version).

401 Unauthorized - Missing, invalid, or expired JWT Bearer token.

403 Forbidden - Insufficient role permissions or resource access denied by RBAC policy.

404 Not Found - The requested resource ID was not found.

422 Empty query or invalid top_k/threshold

detailobject[]
detail[].locstring | integer[]wajib
detail[].msgstringwajib
detail[].typestringwajib
detail[].inputobject
detail[].ctxobject
{
  "detail": [
    {
      "loc": [
        null
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

503 Search backend temporarily unavailable

Contoh

curl -X POST "$PINTER_URL/api/knowledge/documents/hub-query" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'