Retrieve a question by id
Retrieve a question by id
Query Parameters
- id number required
The id of the question
- 200
Returns a question.
- application/json
- Schema
- Example (from schema)
Schema
- id number required
Unique identifier for the question
user object
id number requiredUnique identifier for the user
username string requiredUsername of the user
role string requiredRole of the user (e.g., admin, user)
- questionText string required
Text content of the question
category object
id numberUnique identifier for the category
name stringName of the category
description stringDescription of the category
questionType object
id number requiredUnique identifier for the question type
name string requiredName of the question type
- question_image string required
Image associated with the question, if any
- explanation string required
Explanation or answer to the question
- difficulty_level string required
Difficulty level of the question
- verified number required
Verification status of the question
- flagged number required
Flag status of the question
- votes number required
Number of votes the question has received
- numberOfAnswers number required
Number of answers the question has received
- userVote string required
Possible values: [
up
,down
,null
]Vote status by the current user
- created_at date-time required
Date when the question was created
- updated_at date-time required
Date when the question was last updated
{
"id": 0,
"user": {
"id": 0,
"username": "string",
"role": "string"
},
"questionText": "string",
"category": {
"id": 0,
"name": "string",
"description": "string"
},
"questionType": {
"id": 0,
"name": "string"
},
"question_image": "string",
"explanation": "string",
"difficulty_level": "string",
"verified": 0,
"flagged": 0,
"votes": 0,
"numberOfAnswers": 0,
"userVote": "up",
"created_at": "2024-07-21T21:27:58.755Z",
"updated_at": "2024-07-21T21:27:58.755Z"
}