POST - Create Worksheet Question Configuration
Finalizes the worksheet metadata by submitting subject matter and learning standards for a given worksheet.
This step ensures that the worksheet proceeds to the question configuration phase.
How to Use:
- Call
POST /worksheet/v1/question-config/{work_sheet_id}with a valid worksheet ID. - Provide the finalized metadata in the request body (
subject_matterandlearning_standards). - If successful, the worksheet question configuration process will be initiated asynchronously.
- If the worksheet is not found, or if its steps are invalid, a corresponding error is returned.
Path Parameters:
work_sheet_id(UUID, required): The unique ID of the worksheet.
POST
/
worksheet
/
v1
/
question-config
/
{work_sheet_id}
Create Worksheet Question Configuration
curl --request POST \
--url https://api-staging.crazygoldfish.com/worksheet/v1/question-config/{work_sheet_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subject_matter": {
"topics_to_be_covered": {
"topic": {
"ai_recommendations": [
"Explain the concept of magnetic poles and their properties with examples.",
"Describe the behavior of a compass needle near a bar magnet and explain why it gets deflected."
],
"additional_recommendations": [
"Include an activity-based question related to creating an electromagnet using a solenoid and steel rod."
]
}
},
"prerequisite_knowledge": {
"prerequisite": {
"ai_recommendations": [
"Understand the concept of magnetism including magnetic poles and their properties."
],
"additional_recommendations": [
"Review the concept of magnetic fields and field lines."
]
}
},
"key_concepts_and_subconcepts": {
"concepts": {
"ai_recommendations": [
"Magnetic Poles and Their Properties",
"Visualization of Magnetic Field Lines"
],
"additional_recommendations": [
"Comparison of attraction and repulsion between poles"
]
}
}
},
"learning_standards": {
"competencies": {
"competency_list": [
{
"name": "C-8.1",
"description": "Develops accurate and appropriate models..."
},
{
"name": "C-8.2",
"description": "Designs and implements a plan for scientific inquiry..."
}
]
},
"learning_outcomes": {
"outcomes": {
"ai_recommendations": [
"Relates phenomena with causes and effects (e.g., compass deflection)."
],
"additional_recommendations": [
"Draws labeled diagrams of magnetic field lines."
]
}
},
"smart_learning_objectives": {
"objects": {
"ai_recommendations": [
"Students will analyze the deflection of a compass needle (Analyze)."
],
"additional_recommendations": [
"Students will sketch ray diagrams and magnetic field lines (Apply)."
]
}
}
}
}
'import requests
url = "https://api-staging.crazygoldfish.com/worksheet/v1/question-config/{work_sheet_id}"
payload = {
"subject_matter": {
"topics_to_be_covered": { "topic": {
"ai_recommendations": ["Explain the concept of magnetic poles and their properties with examples.", "Describe the behavior of a compass needle near a bar magnet and explain why it gets deflected."],
"additional_recommendations": ["Include an activity-based question related to creating an electromagnet using a solenoid and steel rod."]
} },
"prerequisite_knowledge": { "prerequisite": {
"ai_recommendations": ["Understand the concept of magnetism including magnetic poles and their properties."],
"additional_recommendations": ["Review the concept of magnetic fields and field lines."]
} },
"key_concepts_and_subconcepts": { "concepts": {
"ai_recommendations": ["Magnetic Poles and Their Properties", "Visualization of Magnetic Field Lines"],
"additional_recommendations": ["Comparison of attraction and repulsion between poles"]
} }
},
"learning_standards": {
"competencies": { "competency_list": [
{
"name": "C-8.1",
"description": "Develops accurate and appropriate models..."
},
{
"name": "C-8.2",
"description": "Designs and implements a plan for scientific inquiry..."
}
] },
"learning_outcomes": { "outcomes": {
"ai_recommendations": ["Relates phenomena with causes and effects (e.g., compass deflection)."],
"additional_recommendations": ["Draws labeled diagrams of magnetic field lines."]
} },
"smart_learning_objectives": { "objects": {
"ai_recommendations": ["Students will analyze the deflection of a compass needle (Analyze)."],
"additional_recommendations": ["Students will sketch ray diagrams and magnetic field lines (Apply)."]
} }
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subject_matter: {
topics_to_be_covered: {
topic: {
ai_recommendations: [
'Explain the concept of magnetic poles and their properties with examples.',
'Describe the behavior of a compass needle near a bar magnet and explain why it gets deflected.'
],
additional_recommendations: [
'Include an activity-based question related to creating an electromagnet using a solenoid and steel rod.'
]
}
},
prerequisite_knowledge: {
prerequisite: {
ai_recommendations: [
'Understand the concept of magnetism including magnetic poles and their properties.'
],
additional_recommendations: ['Review the concept of magnetic fields and field lines.']
}
},
key_concepts_and_subconcepts: {
concepts: {
ai_recommendations: ['Magnetic Poles and Their Properties', 'Visualization of Magnetic Field Lines'],
additional_recommendations: ['Comparison of attraction and repulsion between poles']
}
}
},
learning_standards: {
competencies: {
competency_list: [
{name: 'C-8.1', description: 'Develops accurate and appropriate models...'},
{
name: 'C-8.2',
description: 'Designs and implements a plan for scientific inquiry...'
}
]
},
learning_outcomes: {
outcomes: {
ai_recommendations: ['Relates phenomena with causes and effects (e.g., compass deflection).'],
additional_recommendations: ['Draws labeled diagrams of magnetic field lines.']
}
},
smart_learning_objectives: {
objects: {
ai_recommendations: ['Students will analyze the deflection of a compass needle (Analyze).'],
additional_recommendations: ['Students will sketch ray diagrams and magnetic field lines (Apply).']
}
}
}
})
};
fetch('https://api-staging.crazygoldfish.com/worksheet/v1/question-config/{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/question-config/{work_sheet_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subject_matter' => [
'topics_to_be_covered' => [
'topic' => [
'ai_recommendations' => [
'Explain the concept of magnetic poles and their properties with examples.',
'Describe the behavior of a compass needle near a bar magnet and explain why it gets deflected.'
],
'additional_recommendations' => [
'Include an activity-based question related to creating an electromagnet using a solenoid and steel rod.'
]
]
],
'prerequisite_knowledge' => [
'prerequisite' => [
'ai_recommendations' => [
'Understand the concept of magnetism including magnetic poles and their properties.'
],
'additional_recommendations' => [
'Review the concept of magnetic fields and field lines.'
]
]
],
'key_concepts_and_subconcepts' => [
'concepts' => [
'ai_recommendations' => [
'Magnetic Poles and Their Properties',
'Visualization of Magnetic Field Lines'
],
'additional_recommendations' => [
'Comparison of attraction and repulsion between poles'
]
]
]
],
'learning_standards' => [
'competencies' => [
'competency_list' => [
[
'name' => 'C-8.1',
'description' => 'Develops accurate and appropriate models...'
],
[
'name' => 'C-8.2',
'description' => 'Designs and implements a plan for scientific inquiry...'
]
]
],
'learning_outcomes' => [
'outcomes' => [
'ai_recommendations' => [
'Relates phenomena with causes and effects (e.g., compass deflection).'
],
'additional_recommendations' => [
'Draws labeled diagrams of magnetic field lines.'
]
]
],
'smart_learning_objectives' => [
'objects' => [
'ai_recommendations' => [
'Students will analyze the deflection of a compass needle (Analyze).'
],
'additional_recommendations' => [
'Students will sketch ray diagrams and magnetic field lines (Apply).'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-staging.crazygoldfish.com/worksheet/v1/question-config/{work_sheet_id}"
payload := strings.NewReader("{\n \"subject_matter\": {\n \"topics_to_be_covered\": {\n \"topic\": {\n \"ai_recommendations\": [\n \"Explain the concept of magnetic poles and their properties with examples.\",\n \"Describe the behavior of a compass needle near a bar magnet and explain why it gets deflected.\"\n ],\n \"additional_recommendations\": [\n \"Include an activity-based question related to creating an electromagnet using a solenoid and steel rod.\"\n ]\n }\n },\n \"prerequisite_knowledge\": {\n \"prerequisite\": {\n \"ai_recommendations\": [\n \"Understand the concept of magnetism including magnetic poles and their properties.\"\n ],\n \"additional_recommendations\": [\n \"Review the concept of magnetic fields and field lines.\"\n ]\n }\n },\n \"key_concepts_and_subconcepts\": {\n \"concepts\": {\n \"ai_recommendations\": [\n \"Magnetic Poles and Their Properties\",\n \"Visualization of Magnetic Field Lines\"\n ],\n \"additional_recommendations\": [\n \"Comparison of attraction and repulsion between poles\"\n ]\n }\n }\n },\n \"learning_standards\": {\n \"competencies\": {\n \"competency_list\": [\n {\n \"name\": \"C-8.1\",\n \"description\": \"Develops accurate and appropriate models...\"\n },\n {\n \"name\": \"C-8.2\",\n \"description\": \"Designs and implements a plan for scientific inquiry...\"\n }\n ]\n },\n \"learning_outcomes\": {\n \"outcomes\": {\n \"ai_recommendations\": [\n \"Relates phenomena with causes and effects (e.g., compass deflection).\"\n ],\n \"additional_recommendations\": [\n \"Draws labeled diagrams of magnetic field lines.\"\n ]\n }\n },\n \"smart_learning_objectives\": {\n \"objects\": {\n \"ai_recommendations\": [\n \"Students will analyze the deflection of a compass needle (Analyze).\"\n ],\n \"additional_recommendations\": [\n \"Students will sketch ray diagrams and magnetic field lines (Apply).\"\n ]\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-staging.crazygoldfish.com/worksheet/v1/question-config/{work_sheet_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subject_matter\": {\n \"topics_to_be_covered\": {\n \"topic\": {\n \"ai_recommendations\": [\n \"Explain the concept of magnetic poles and their properties with examples.\",\n \"Describe the behavior of a compass needle near a bar magnet and explain why it gets deflected.\"\n ],\n \"additional_recommendations\": [\n \"Include an activity-based question related to creating an electromagnet using a solenoid and steel rod.\"\n ]\n }\n },\n \"prerequisite_knowledge\": {\n \"prerequisite\": {\n \"ai_recommendations\": [\n \"Understand the concept of magnetism including magnetic poles and their properties.\"\n ],\n \"additional_recommendations\": [\n \"Review the concept of magnetic fields and field lines.\"\n ]\n }\n },\n \"key_concepts_and_subconcepts\": {\n \"concepts\": {\n \"ai_recommendations\": [\n \"Magnetic Poles and Their Properties\",\n \"Visualization of Magnetic Field Lines\"\n ],\n \"additional_recommendations\": [\n \"Comparison of attraction and repulsion between poles\"\n ]\n }\n }\n },\n \"learning_standards\": {\n \"competencies\": {\n \"competency_list\": [\n {\n \"name\": \"C-8.1\",\n \"description\": \"Develops accurate and appropriate models...\"\n },\n {\n \"name\": \"C-8.2\",\n \"description\": \"Designs and implements a plan for scientific inquiry...\"\n }\n ]\n },\n \"learning_outcomes\": {\n \"outcomes\": {\n \"ai_recommendations\": [\n \"Relates phenomena with causes and effects (e.g., compass deflection).\"\n ],\n \"additional_recommendations\": [\n \"Draws labeled diagrams of magnetic field lines.\"\n ]\n }\n },\n \"smart_learning_objectives\": {\n \"objects\": {\n \"ai_recommendations\": [\n \"Students will analyze the deflection of a compass needle (Analyze).\"\n ],\n \"additional_recommendations\": [\n \"Students will sketch ray diagrams and magnetic field lines (Apply).\"\n ]\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.crazygoldfish.com/worksheet/v1/question-config/{work_sheet_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subject_matter\": {\n \"topics_to_be_covered\": {\n \"topic\": {\n \"ai_recommendations\": [\n \"Explain the concept of magnetic poles and their properties with examples.\",\n \"Describe the behavior of a compass needle near a bar magnet and explain why it gets deflected.\"\n ],\n \"additional_recommendations\": [\n \"Include an activity-based question related to creating an electromagnet using a solenoid and steel rod.\"\n ]\n }\n },\n \"prerequisite_knowledge\": {\n \"prerequisite\": {\n \"ai_recommendations\": [\n \"Understand the concept of magnetism including magnetic poles and their properties.\"\n ],\n \"additional_recommendations\": [\n \"Review the concept of magnetic fields and field lines.\"\n ]\n }\n },\n \"key_concepts_and_subconcepts\": {\n \"concepts\": {\n \"ai_recommendations\": [\n \"Magnetic Poles and Their Properties\",\n \"Visualization of Magnetic Field Lines\"\n ],\n \"additional_recommendations\": [\n \"Comparison of attraction and repulsion between poles\"\n ]\n }\n }\n },\n \"learning_standards\": {\n \"competencies\": {\n \"competency_list\": [\n {\n \"name\": \"C-8.1\",\n \"description\": \"Develops accurate and appropriate models...\"\n },\n {\n \"name\": \"C-8.2\",\n \"description\": \"Designs and implements a plan for scientific inquiry...\"\n }\n ]\n },\n \"learning_outcomes\": {\n \"outcomes\": {\n \"ai_recommendations\": [\n \"Relates phenomena with causes and effects (e.g., compass deflection).\"\n ],\n \"additional_recommendations\": [\n \"Draws labeled diagrams of magnetic field lines.\"\n ]\n }\n },\n \"smart_learning_objectives\": {\n \"objects\": {\n \"ai_recommendations\": [\n \"Students will analyze the deflection of a compass needle (Analyze).\"\n ],\n \"additional_recommendations\": [\n \"Students will sketch ray diagrams and magnetic field lines (Apply).\"\n ]\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"id": "152764ca-1685-427c-aba7-4b92dcc0d60f",
"msg": "Worksheet question configuration initiated successfully."
}
]
}{
"detail": [
{
"msg": "Worksheet question configuration already In Progress."
}
]
}{
"detail": [
{
"msg": "Worksheet not found."
}
]
}{
"detail": [
{
"msg": "Unexpected server error."
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier of the worksheet
Body
application/json
Response
Worksheet question configuration initiated successfully.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Create Worksheet Question Configuration
curl --request POST \
--url https://api-staging.crazygoldfish.com/worksheet/v1/question-config/{work_sheet_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subject_matter": {
"topics_to_be_covered": {
"topic": {
"ai_recommendations": [
"Explain the concept of magnetic poles and their properties with examples.",
"Describe the behavior of a compass needle near a bar magnet and explain why it gets deflected."
],
"additional_recommendations": [
"Include an activity-based question related to creating an electromagnet using a solenoid and steel rod."
]
}
},
"prerequisite_knowledge": {
"prerequisite": {
"ai_recommendations": [
"Understand the concept of magnetism including magnetic poles and their properties."
],
"additional_recommendations": [
"Review the concept of magnetic fields and field lines."
]
}
},
"key_concepts_and_subconcepts": {
"concepts": {
"ai_recommendations": [
"Magnetic Poles and Their Properties",
"Visualization of Magnetic Field Lines"
],
"additional_recommendations": [
"Comparison of attraction and repulsion between poles"
]
}
}
},
"learning_standards": {
"competencies": {
"competency_list": [
{
"name": "C-8.1",
"description": "Develops accurate and appropriate models..."
},
{
"name": "C-8.2",
"description": "Designs and implements a plan for scientific inquiry..."
}
]
},
"learning_outcomes": {
"outcomes": {
"ai_recommendations": [
"Relates phenomena with causes and effects (e.g., compass deflection)."
],
"additional_recommendations": [
"Draws labeled diagrams of magnetic field lines."
]
}
},
"smart_learning_objectives": {
"objects": {
"ai_recommendations": [
"Students will analyze the deflection of a compass needle (Analyze)."
],
"additional_recommendations": [
"Students will sketch ray diagrams and magnetic field lines (Apply)."
]
}
}
}
}
'import requests
url = "https://api-staging.crazygoldfish.com/worksheet/v1/question-config/{work_sheet_id}"
payload = {
"subject_matter": {
"topics_to_be_covered": { "topic": {
"ai_recommendations": ["Explain the concept of magnetic poles and their properties with examples.", "Describe the behavior of a compass needle near a bar magnet and explain why it gets deflected."],
"additional_recommendations": ["Include an activity-based question related to creating an electromagnet using a solenoid and steel rod."]
} },
"prerequisite_knowledge": { "prerequisite": {
"ai_recommendations": ["Understand the concept of magnetism including magnetic poles and their properties."],
"additional_recommendations": ["Review the concept of magnetic fields and field lines."]
} },
"key_concepts_and_subconcepts": { "concepts": {
"ai_recommendations": ["Magnetic Poles and Their Properties", "Visualization of Magnetic Field Lines"],
"additional_recommendations": ["Comparison of attraction and repulsion between poles"]
} }
},
"learning_standards": {
"competencies": { "competency_list": [
{
"name": "C-8.1",
"description": "Develops accurate and appropriate models..."
},
{
"name": "C-8.2",
"description": "Designs and implements a plan for scientific inquiry..."
}
] },
"learning_outcomes": { "outcomes": {
"ai_recommendations": ["Relates phenomena with causes and effects (e.g., compass deflection)."],
"additional_recommendations": ["Draws labeled diagrams of magnetic field lines."]
} },
"smart_learning_objectives": { "objects": {
"ai_recommendations": ["Students will analyze the deflection of a compass needle (Analyze)."],
"additional_recommendations": ["Students will sketch ray diagrams and magnetic field lines (Apply)."]
} }
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subject_matter: {
topics_to_be_covered: {
topic: {
ai_recommendations: [
'Explain the concept of magnetic poles and their properties with examples.',
'Describe the behavior of a compass needle near a bar magnet and explain why it gets deflected.'
],
additional_recommendations: [
'Include an activity-based question related to creating an electromagnet using a solenoid and steel rod.'
]
}
},
prerequisite_knowledge: {
prerequisite: {
ai_recommendations: [
'Understand the concept of magnetism including magnetic poles and their properties.'
],
additional_recommendations: ['Review the concept of magnetic fields and field lines.']
}
},
key_concepts_and_subconcepts: {
concepts: {
ai_recommendations: ['Magnetic Poles and Their Properties', 'Visualization of Magnetic Field Lines'],
additional_recommendations: ['Comparison of attraction and repulsion between poles']
}
}
},
learning_standards: {
competencies: {
competency_list: [
{name: 'C-8.1', description: 'Develops accurate and appropriate models...'},
{
name: 'C-8.2',
description: 'Designs and implements a plan for scientific inquiry...'
}
]
},
learning_outcomes: {
outcomes: {
ai_recommendations: ['Relates phenomena with causes and effects (e.g., compass deflection).'],
additional_recommendations: ['Draws labeled diagrams of magnetic field lines.']
}
},
smart_learning_objectives: {
objects: {
ai_recommendations: ['Students will analyze the deflection of a compass needle (Analyze).'],
additional_recommendations: ['Students will sketch ray diagrams and magnetic field lines (Apply).']
}
}
}
})
};
fetch('https://api-staging.crazygoldfish.com/worksheet/v1/question-config/{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/question-config/{work_sheet_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subject_matter' => [
'topics_to_be_covered' => [
'topic' => [
'ai_recommendations' => [
'Explain the concept of magnetic poles and their properties with examples.',
'Describe the behavior of a compass needle near a bar magnet and explain why it gets deflected.'
],
'additional_recommendations' => [
'Include an activity-based question related to creating an electromagnet using a solenoid and steel rod.'
]
]
],
'prerequisite_knowledge' => [
'prerequisite' => [
'ai_recommendations' => [
'Understand the concept of magnetism including magnetic poles and their properties.'
],
'additional_recommendations' => [
'Review the concept of magnetic fields and field lines.'
]
]
],
'key_concepts_and_subconcepts' => [
'concepts' => [
'ai_recommendations' => [
'Magnetic Poles and Their Properties',
'Visualization of Magnetic Field Lines'
],
'additional_recommendations' => [
'Comparison of attraction and repulsion between poles'
]
]
]
],
'learning_standards' => [
'competencies' => [
'competency_list' => [
[
'name' => 'C-8.1',
'description' => 'Develops accurate and appropriate models...'
],
[
'name' => 'C-8.2',
'description' => 'Designs and implements a plan for scientific inquiry...'
]
]
],
'learning_outcomes' => [
'outcomes' => [
'ai_recommendations' => [
'Relates phenomena with causes and effects (e.g., compass deflection).'
],
'additional_recommendations' => [
'Draws labeled diagrams of magnetic field lines.'
]
]
],
'smart_learning_objectives' => [
'objects' => [
'ai_recommendations' => [
'Students will analyze the deflection of a compass needle (Analyze).'
],
'additional_recommendations' => [
'Students will sketch ray diagrams and magnetic field lines (Apply).'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-staging.crazygoldfish.com/worksheet/v1/question-config/{work_sheet_id}"
payload := strings.NewReader("{\n \"subject_matter\": {\n \"topics_to_be_covered\": {\n \"topic\": {\n \"ai_recommendations\": [\n \"Explain the concept of magnetic poles and their properties with examples.\",\n \"Describe the behavior of a compass needle near a bar magnet and explain why it gets deflected.\"\n ],\n \"additional_recommendations\": [\n \"Include an activity-based question related to creating an electromagnet using a solenoid and steel rod.\"\n ]\n }\n },\n \"prerequisite_knowledge\": {\n \"prerequisite\": {\n \"ai_recommendations\": [\n \"Understand the concept of magnetism including magnetic poles and their properties.\"\n ],\n \"additional_recommendations\": [\n \"Review the concept of magnetic fields and field lines.\"\n ]\n }\n },\n \"key_concepts_and_subconcepts\": {\n \"concepts\": {\n \"ai_recommendations\": [\n \"Magnetic Poles and Their Properties\",\n \"Visualization of Magnetic Field Lines\"\n ],\n \"additional_recommendations\": [\n \"Comparison of attraction and repulsion between poles\"\n ]\n }\n }\n },\n \"learning_standards\": {\n \"competencies\": {\n \"competency_list\": [\n {\n \"name\": \"C-8.1\",\n \"description\": \"Develops accurate and appropriate models...\"\n },\n {\n \"name\": \"C-8.2\",\n \"description\": \"Designs and implements a plan for scientific inquiry...\"\n }\n ]\n },\n \"learning_outcomes\": {\n \"outcomes\": {\n \"ai_recommendations\": [\n \"Relates phenomena with causes and effects (e.g., compass deflection).\"\n ],\n \"additional_recommendations\": [\n \"Draws labeled diagrams of magnetic field lines.\"\n ]\n }\n },\n \"smart_learning_objectives\": {\n \"objects\": {\n \"ai_recommendations\": [\n \"Students will analyze the deflection of a compass needle (Analyze).\"\n ],\n \"additional_recommendations\": [\n \"Students will sketch ray diagrams and magnetic field lines (Apply).\"\n ]\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-staging.crazygoldfish.com/worksheet/v1/question-config/{work_sheet_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subject_matter\": {\n \"topics_to_be_covered\": {\n \"topic\": {\n \"ai_recommendations\": [\n \"Explain the concept of magnetic poles and their properties with examples.\",\n \"Describe the behavior of a compass needle near a bar magnet and explain why it gets deflected.\"\n ],\n \"additional_recommendations\": [\n \"Include an activity-based question related to creating an electromagnet using a solenoid and steel rod.\"\n ]\n }\n },\n \"prerequisite_knowledge\": {\n \"prerequisite\": {\n \"ai_recommendations\": [\n \"Understand the concept of magnetism including magnetic poles and their properties.\"\n ],\n \"additional_recommendations\": [\n \"Review the concept of magnetic fields and field lines.\"\n ]\n }\n },\n \"key_concepts_and_subconcepts\": {\n \"concepts\": {\n \"ai_recommendations\": [\n \"Magnetic Poles and Their Properties\",\n \"Visualization of Magnetic Field Lines\"\n ],\n \"additional_recommendations\": [\n \"Comparison of attraction and repulsion between poles\"\n ]\n }\n }\n },\n \"learning_standards\": {\n \"competencies\": {\n \"competency_list\": [\n {\n \"name\": \"C-8.1\",\n \"description\": \"Develops accurate and appropriate models...\"\n },\n {\n \"name\": \"C-8.2\",\n \"description\": \"Designs and implements a plan for scientific inquiry...\"\n }\n ]\n },\n \"learning_outcomes\": {\n \"outcomes\": {\n \"ai_recommendations\": [\n \"Relates phenomena with causes and effects (e.g., compass deflection).\"\n ],\n \"additional_recommendations\": [\n \"Draws labeled diagrams of magnetic field lines.\"\n ]\n }\n },\n \"smart_learning_objectives\": {\n \"objects\": {\n \"ai_recommendations\": [\n \"Students will analyze the deflection of a compass needle (Analyze).\"\n ],\n \"additional_recommendations\": [\n \"Students will sketch ray diagrams and magnetic field lines (Apply).\"\n ]\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.crazygoldfish.com/worksheet/v1/question-config/{work_sheet_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subject_matter\": {\n \"topics_to_be_covered\": {\n \"topic\": {\n \"ai_recommendations\": [\n \"Explain the concept of magnetic poles and their properties with examples.\",\n \"Describe the behavior of a compass needle near a bar magnet and explain why it gets deflected.\"\n ],\n \"additional_recommendations\": [\n \"Include an activity-based question related to creating an electromagnet using a solenoid and steel rod.\"\n ]\n }\n },\n \"prerequisite_knowledge\": {\n \"prerequisite\": {\n \"ai_recommendations\": [\n \"Understand the concept of magnetism including magnetic poles and their properties.\"\n ],\n \"additional_recommendations\": [\n \"Review the concept of magnetic fields and field lines.\"\n ]\n }\n },\n \"key_concepts_and_subconcepts\": {\n \"concepts\": {\n \"ai_recommendations\": [\n \"Magnetic Poles and Their Properties\",\n \"Visualization of Magnetic Field Lines\"\n ],\n \"additional_recommendations\": [\n \"Comparison of attraction and repulsion between poles\"\n ]\n }\n }\n },\n \"learning_standards\": {\n \"competencies\": {\n \"competency_list\": [\n {\n \"name\": \"C-8.1\",\n \"description\": \"Develops accurate and appropriate models...\"\n },\n {\n \"name\": \"C-8.2\",\n \"description\": \"Designs and implements a plan for scientific inquiry...\"\n }\n ]\n },\n \"learning_outcomes\": {\n \"outcomes\": {\n \"ai_recommendations\": [\n \"Relates phenomena with causes and effects (e.g., compass deflection).\"\n ],\n \"additional_recommendations\": [\n \"Draws labeled diagrams of magnetic field lines.\"\n ]\n }\n },\n \"smart_learning_objectives\": {\n \"objects\": {\n \"ai_recommendations\": [\n \"Students will analyze the deflection of a compass needle (Analyze).\"\n ],\n \"additional_recommendations\": [\n \"Students will sketch ray diagrams and magnetic field lines (Apply).\"\n ]\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"id": "152764ca-1685-427c-aba7-4b92dcc0d60f",
"msg": "Worksheet question configuration initiated successfully."
}
]
}{
"detail": [
{
"msg": "Worksheet question configuration already In Progress."
}
]
}{
"detail": [
{
"msg": "Worksheet not found."
}
]
}{
"detail": [
{
"msg": "Unexpected server error."
}
]
}