GET - Get Worksheet Explanations
Retrieves all questions with their explanations for a given worksheet.
The response includes worksheet metadata along with questions that have an explanation key added to each question object.
Prerequisites:
- The worksheet must exist.
- The question generation step must be completed.
- The explanation generation step must be completed.
How to Use:
- Call
GET /worksheet/v1/generate-explanations/{work_sheet_id}with the worksheet ID. - On success, you will receive worksheet metadata along with questions and their explanations.
- If the worksheet or any required step is missing, a
404error is returned. - If the generation steps are not yet completed, a
400error is returned with the current status. - If explanation generation failed, a
400error is returned with the failure message.
Path Parameters:
work_sheet_id(UUID, required): The unique ID of the worksheet.
Response Data:
id: Worksheet ID.board: Board details (id and name).grade: Grade details (id and name).section: Worksheet section.subject: Subject details (id and name).status: Current status of the explanation generation step.number_of_questions: Total number of questions in the worksheet.topic: Topic of the worksheet.documents: List of document URLs associated with the worksheet.audio: Audio URL if available.questions: Array of questions with explanations merged.
Response Codes:
200 OK: Questions with explanations returned successfully.400 Bad Request: Questions or explanations not yet generated, or generation failed.404 Not Found: Worksheet, questions, or explanations not found.500 Internal Server Error: Unexpected error occurred.
GET
/
worksheet
/
v1
/
generate-explanations
/
{work_sheet_id}
Get Worksheet Questions with Explanations
curl --request GET \
--url https://api-staging.crazygoldfish.com/worksheet/v1/generate-explanations/{work_sheet_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-staging.crazygoldfish.com/worksheet/v1/generate-explanations/{work_sheet_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-staging.crazygoldfish.com/worksheet/v1/generate-explanations/{work_sheet_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.crazygoldfish.com/worksheet/v1/generate-explanations/{work_sheet_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-staging.crazygoldfish.com/worksheet/v1/generate-explanations/{work_sheet_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-staging.crazygoldfish.com/worksheet/v1/generate-explanations/{work_sheet_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.crazygoldfish.com/worksheet/v1/generate-explanations/{work_sheet_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "d7494c99-0539-ce2-92e0c2ede6d1",
"board": {
"id": "087c80b0-ac25-40ee-8657-28b694882ba8",
"name": "CBSE"
},
"grade": {
"id": "65955148-e106-461b-a9a6-e0c3294f6734",
"name": "Grade 10"
},
"section": null,
"subject": {
"id": "abf49127-253c-4dc9-9bf5-eb66360e5592",
"name": "Mathematics"
},
"status": "Completed",
"number_of_questions": 10,
"topic": "Probability",
"documents": [],
"audio": null,
"questions": {
"mcq_single_answer": [
{
"question": "A bag contains 1 red ball, 1 blue ball, and 1 yellow ball. Kritika picks one ball without looking. What is the probability that she picks a red ball? Choose the ONE best answer.",
"options": [
"A. 1/3",
"B. 1/2",
"C. 1/4",
"D. 1/6"
],
"answer": "A",
"tags": {
"learning_objectives": "Calculate the probability of simple events in everyday scenarios (Application)",
"bloom": "Apply",
"difficulty": "Easy"
},
"explanations": [
{
"learning_objective": "Calculate the probability of simple events in everyday scenarios by determining favorable outcomes over total possible outcomes.",
"explanation": "The bag has three balls: red, blue, and yellow, each equally likely to be picked. Total possible outcomes = 3. Favorable outcome for picking a red ball = 1 (only one red ball). Probability = favorable outcomes ÷ total outcomes = 1 ÷ 3. Hence, option A (1/3) is correct. Options B (1/2), C (1/4), and D (1/6) are incorrect because they represent probabilities for different or impossible scenarios with this setup. This requires applying the probability formula, fitting Bloom's Apply level for Grade 10.",
"key_concepts": [
"Probability formula",
"Total possible outcomes",
"Favorable outcomes",
"Equally likely events"
],
"common_mistakes": "Students may incorrectly count the total number of balls or confuse the favorable outcomes, leading to wrong denominators or numerators. Some might pick half or quarter without accounting for total outcomes properly.",
"real_world_application": "This concept helps in predicting outcomes in random selection scenarios, like drawing a colored ball from a bag or choosing items randomly, fundamental in games, lotteries, and risk assessment."
}
]
},
{
"question": "A fair six-sided die is rolled once. What is the probability of getting a number greater than 4? Choose the ONE best answer.",
"options": [
"A. 1/3",
"B. 1/2",
"C. 2/3",
"D. 1/6"
],
"answer": "A",
"tags": {
"learning_objectives": "Calculate the probability of simple events in everyday scenarios (Application)",
"bloom": "Apply",
"difficulty": "Easy"
},
"explanations": [
{
"learning_objective": "Calculate the probability of an event by identifying favorable outcomes from possible outcomes in real-life scenarios.",
"explanation": "A six-sided die has outcomes 1 through 6. Numbers greater than 4 are 5 and 6, so favorable outcomes = 2. Total outcomes = 6. Probability = favorable outcomes ÷ total outcomes = 2 ÷ 6 = 1/3. Therefore, option A is correct. Option B (1/2) suggests 3 favorable outcomes, which is incorrect. Option C (2/3) is too high, implying 4 favorable outcomes, and D (1/6) implies only one favorable outcome, both incorrect here. This question applies simple counting and probability calculation.",
"key_concepts": [
"Sample space",
"Favorable outcomes",
"Probability calculation",
"Properties of a fair die"
],
"common_mistakes": "A common error is miscounting favorable numbers, such as including 4 or missing 5 and 6. Others may simplify fractions incorrectly or confuse total outcomes with favorable outcomes.",
"real_world_application": "Understanding die probabilities is essential in games and decision-making processes involving chance, helping to predict outcomes and make informed choices."
}
]
}
]
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier of the worksheet
Response
Worksheet questions with explanations retrieved successfully.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Get Worksheet Questions with Explanations
curl --request GET \
--url https://api-staging.crazygoldfish.com/worksheet/v1/generate-explanations/{work_sheet_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-staging.crazygoldfish.com/worksheet/v1/generate-explanations/{work_sheet_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-staging.crazygoldfish.com/worksheet/v1/generate-explanations/{work_sheet_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.crazygoldfish.com/worksheet/v1/generate-explanations/{work_sheet_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-staging.crazygoldfish.com/worksheet/v1/generate-explanations/{work_sheet_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-staging.crazygoldfish.com/worksheet/v1/generate-explanations/{work_sheet_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.crazygoldfish.com/worksheet/v1/generate-explanations/{work_sheet_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "d7494c99-0539-ce2-92e0c2ede6d1",
"board": {
"id": "087c80b0-ac25-40ee-8657-28b694882ba8",
"name": "CBSE"
},
"grade": {
"id": "65955148-e106-461b-a9a6-e0c3294f6734",
"name": "Grade 10"
},
"section": null,
"subject": {
"id": "abf49127-253c-4dc9-9bf5-eb66360e5592",
"name": "Mathematics"
},
"status": "Completed",
"number_of_questions": 10,
"topic": "Probability",
"documents": [],
"audio": null,
"questions": {
"mcq_single_answer": [
{
"question": "A bag contains 1 red ball, 1 blue ball, and 1 yellow ball. Kritika picks one ball without looking. What is the probability that she picks a red ball? Choose the ONE best answer.",
"options": [
"A. 1/3",
"B. 1/2",
"C. 1/4",
"D. 1/6"
],
"answer": "A",
"tags": {
"learning_objectives": "Calculate the probability of simple events in everyday scenarios (Application)",
"bloom": "Apply",
"difficulty": "Easy"
},
"explanations": [
{
"learning_objective": "Calculate the probability of simple events in everyday scenarios by determining favorable outcomes over total possible outcomes.",
"explanation": "The bag has three balls: red, blue, and yellow, each equally likely to be picked. Total possible outcomes = 3. Favorable outcome for picking a red ball = 1 (only one red ball). Probability = favorable outcomes ÷ total outcomes = 1 ÷ 3. Hence, option A (1/3) is correct. Options B (1/2), C (1/4), and D (1/6) are incorrect because they represent probabilities for different or impossible scenarios with this setup. This requires applying the probability formula, fitting Bloom's Apply level for Grade 10.",
"key_concepts": [
"Probability formula",
"Total possible outcomes",
"Favorable outcomes",
"Equally likely events"
],
"common_mistakes": "Students may incorrectly count the total number of balls or confuse the favorable outcomes, leading to wrong denominators or numerators. Some might pick half or quarter without accounting for total outcomes properly.",
"real_world_application": "This concept helps in predicting outcomes in random selection scenarios, like drawing a colored ball from a bag or choosing items randomly, fundamental in games, lotteries, and risk assessment."
}
]
},
{
"question": "A fair six-sided die is rolled once. What is the probability of getting a number greater than 4? Choose the ONE best answer.",
"options": [
"A. 1/3",
"B. 1/2",
"C. 2/3",
"D. 1/6"
],
"answer": "A",
"tags": {
"learning_objectives": "Calculate the probability of simple events in everyday scenarios (Application)",
"bloom": "Apply",
"difficulty": "Easy"
},
"explanations": [
{
"learning_objective": "Calculate the probability of an event by identifying favorable outcomes from possible outcomes in real-life scenarios.",
"explanation": "A six-sided die has outcomes 1 through 6. Numbers greater than 4 are 5 and 6, so favorable outcomes = 2. Total outcomes = 6. Probability = favorable outcomes ÷ total outcomes = 2 ÷ 6 = 1/3. Therefore, option A is correct. Option B (1/2) suggests 3 favorable outcomes, which is incorrect. Option C (2/3) is too high, implying 4 favorable outcomes, and D (1/6) implies only one favorable outcome, both incorrect here. This question applies simple counting and probability calculation.",
"key_concepts": [
"Sample space",
"Favorable outcomes",
"Probability calculation",
"Properties of a fair die"
],
"common_mistakes": "A common error is miscounting favorable numbers, such as including 4 or missing 5 and 6. Others may simplify fractions incorrectly or confuse total outcomes with favorable outcomes.",
"real_world_application": "Understanding die probabilities is essential in games and decision-making processes involving chance, helping to predict outcomes and make informed choices."
}
]
}
]
}
}
}