Retrieve the answer (relevant snippets) for a submitted question

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Description

After submitting a natural‐language query via POST /dataset/{dataset_id}/question, use this endpoint to fetch the retrieved document snippets. These snippets represent the “answer” in the sense of relevant context—you can then render them or process them further.


HTTP Request

GET /dataset/{dataset_id}/question/{question_id}


Authentication

In your REST client (Postman/Insomnia), select Basic Auth and enter your Username and Password.

The client will automatically generate the Authorization: Basic … header for you. Do not add that header manually.



Request Headers

HeaderExampleRequiredNotes
Acceptapplication/jsonEnsures a JSON response.

Path Parameters

LocationNameTypeRequiredDescription
Pathdataset_idstringUUID of the dataset you queried (e.g. c8004e22-87f7-441f-8302-80c934841196).
Pathquestion_idstringUUID returned by the preceding POST /question request (e.g. 73a1f41a-0754-48cb-8b6d-4d9c25a6fc0b).

Example Request (cURL)

curl -u admin:mypassword \
     https://api.autodriveddf.example/dataset/c8004e22-87f7-441f-8302-80c934841196/question/73a1f41a-0754-48cb-8b6d-4d9c25a6fc0b

Success Response 200 OK

{
  "dataset_id": "c8004e22-87f7-441f-8302-80c934841196",
  "question_id": "73a1f41a-0754-48cb-8b6d-4d9c25a6fc0b",
  "question_text": "How do I configure the data pipeline?",
  "relevant_documents": [
    {
      "page_content": "##### Starting the process\nThis will only work if everything is configured properly…",
      "metadata": { "source": "quickstart_meltano.md" }
    },
    {
      "page_content": "# platform-docs\nThis repository centralizes Platform team documentation…",
      "metadata": { "source": "README.md" }
    },
    {
      "page_content": "\"Hugo Souza 0293\" incident summary showing normal/abnormal data app cues…",
      "metadata": { "source": "Incident_Report.txt" }
    }
  ]
}

Field Descriptions

  • dataset_id (string): UUID of the dataset searched.
  • question_id (string): UUID of the question instance.
  • question_text (string): Echo of the original question you sent.
  • relevant_documents (array): List of the top‐ranked snippets. Each object includes:
    page_content (string): Excerpt text from a source document.
    metadata.source (string): Filename or identifier of the originating document.

Error Responses

CodeReasonWhen it happensExample Body
401UnauthorizedMissing or invalid Basic Auth credentials
404Not Founddataset_id or question_id does not exist or is not associated{ "detail": "Question ID not found." }
400Bad RequestSupplied IDs aren’t valid UUIDs{ "detail": "Invalid UUID format." }
500Internal Server ErrorUnexpected error retrieving snippets{ "detail": "Unexpected server error." }

Next Steps

  • Render the returned snippets in your UI or pipeline.
  • If you need an actual AI‐generated answer instead of raw snippets, use the /ai_question flow (POST → GET).
  • You can ask follow‐up questions by submitting a new POST to /dataset/{dataset_id}/question.
Path Params
string
required
string
required
Responses

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json