Skip to main content

API Reference

The J'APPRENDS API provides endpoints for querying the vector index.

Endpoints

POST /query

Accepts a query via a POST request with a JSON body.

Request Body:

{
"query_text": "string",
"num_neighbors": 10
}

Response Body:

{
"matches": [
{
"id": "string",
"distance": 0,
"question": "string",
"answer": "string"
}
]
}

GET /query

Accepts a query via a GET request with URL parameters.

Query Parameters:

  • query_text (string, required): The text to search for.
  • num_neighbors (integer, optional, default: 10): The number of neighbors to return.

Example:

/query?query_text=How%20do%20you%20say%20hello%20in%20French%3F&num_neighbors=5

Response Body:

The same as the POST request.