Questioner API Documentation
This document provides the necessary details to interact with the Questioner API endpoints. The API allows users to retrieve information about questions in the questioner, including various filtering options.
Base URL
https://hungerstationsa.boolanga.com/api/v2
Endpoints
GET /questioner
Retrieve information about questions in the questioner. This endpoint allows filtering by country ID to narrow down the results based on the provided parameters.
Query Parameters
Parameter | Type | Description |
---|---|---|
country_id | bigint | (optional) Filter by country ID. |
Response
The response will be a JSON array of question details. Each object in the array contains the following fields:
Field | Description |
---|---|
question_id | (bigint) ID of the question. |
question | (text) The question text. |
question_type | (text) The type of the question (e.g., MULTIPLE_CHOICE:SINGLE). |
answers | (array) Array of possible answers for the question. |
Example Request
GET /questioner?country_id=1
[ { "question_id": 4, "question": "Is the Rider Apperance in Compliance?", "question_type": "MULTIPLE_CHOICE:SINGLE", "answers": [ { "jump": "4", "name": "Yes - the rider has the complete uniform", "skip": [""], "score": "1", "name_ar": "Yes - the rider has the complete uniform" }, { "jump": "2", "name": "No - rider is missing one or more items in the uniform", "skip": [""], "score": "0", "name_ar": "No - rider is missing one or more items in the uniform" }, { "jump": "3", "name": "Uniform is complete but dirty", "skip": [""], "score": "0", "name_ar": "Uniform is complete but dirty" } ] }]
Notes
The parameter names are case-sensitive. If no parameters are provided, the endpoint returns all question details.
Example
Scenario: Filtering by Country ID To retrieve questions for the country with ID 1:
GET /questioner?country_id=1
Response
[ { "question_id": 4, "question": "Is the Rider Apperance in Compliance?", "question_type": "MULTIPLE_CHOICE:SINGLE", "answers": [ { "jump": "4", "name": "Yes - the rider has the complete uniform", "skip": [""], "score": "1", "name_ar": "Yes - the rider has the complete uniform" }, { "jump": "2", "name": "No - rider is missing one or more items in the uniform", "skip": [""], "score": "0", "name_ar": "No - rider is missing one or more items in the uniform" }, { "jump": "3", "name": "Uniform is complete but dirty", "skip": [""], "score": "0", "name_ar": "Uniform is complete but dirty" } ] }]