Lesson Plans
Declare a lesson version (Curriculum Fixing)
TimeBack fetches every part of the lesson (practice questions from the QTI bank, article and video pages with their checkpoint and media files from the page store), builds the receipt, diffs it against the last declared version and, with dryRun false, writes version n+1 — or answers unchanged and writes nothing. Version 1 is the baseline and re-assigns nobody. From version 2, changed is what re-assign eligibility reads. The declarer is the calling credential. Idempotent: the same content declared twice writes once.
POST
/
powerpath
/
lessons
/
{lessonId}
/
versions
Declare a lesson version (Curriculum Fixing)
curl --request POST \
--url https://api.alpha-1edtech.ai/powerpath/lessons/{lessonId}/versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "<string>",
"dryRun": true,
"limit": 500
}
'import requests
url = "https://api.alpha-1edtech.ai/powerpath/lessons/{lessonId}/versions"
payload = {
"reason": "<string>",
"dryRun": True,
"limit": 500
}
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({reason: '<string>', dryRun: true, limit: 500})
};
fetch('https://api.alpha-1edtech.ai/powerpath/lessons/{lessonId}/versions', 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.alpha-1edtech.ai/powerpath/lessons/{lessonId}/versions",
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([
'reason' => '<string>',
'dryRun' => true,
'limit' => 500
]),
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.alpha-1edtech.ai/powerpath/lessons/{lessonId}/versions"
payload := strings.NewReader("{\n \"reason\": \"<string>\",\n \"dryRun\": true,\n \"limit\": 500\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.alpha-1edtech.ai/powerpath/lessons/{lessonId}/versions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"<string>\",\n \"dryRun\": true,\n \"limit\": 500\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alpha-1edtech.ai/powerpath/lessons/{lessonId}/versions")
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 \"reason\": \"<string>\",\n \"dryRun\": true,\n \"limit\": 500\n}"
response = http.request(request)
puts response.read_body{
"lessonId": "<string>",
"dryRun": true,
"version": 123,
"baseline": true,
"unchanged": true,
"written": true,
"changed": {
"items": [
"<string>"
],
"article": true,
"video": true,
"checkpoints": [
"<string>"
]
},
"receipt": {
"takenAt": "<string>",
"resourceIds": [
"<string>"
],
"parts": [
{
"kind": "practice-set",
"componentResourceId": "<string>",
"resourceId": "<string>",
"test": "<string>",
"items": [
{
"identifier": "<string>",
"sha256": "<string>",
"updatedAt": "<string>",
"version": 123,
"updatedBy": "<string>"
}
],
"changed": true
}
]
},
"previous": {
"id": "<string>",
"version": 123,
"declaredAt": "<string>",
"declaredByClientId": "<string>",
"run": {
"eligible": 1,
"reassigned": 1,
"failed": 1,
"remaining": 1,
"ranAt": "<string>",
"reassignedTotal": 1
}
},
"declaredByClientId": "<string>",
"declaredAt": "<string>",
"population": {
"lessons": 1,
"plans": 1,
"counts": {
"eligible": 1,
"completedNotMastered": 1,
"mastered": 1,
"notAttempted": 1,
"missesUntouched": 1,
"alreadyReassigned": 1,
"operatorSkipped": 1
},
"byCourse": [
{
"courseId": "<string>",
"plans": 1,
"eligible": 1,
"completedNotMastered": 1
}
],
"items": [
{
"id": "<string>",
"firstAnswers": 1,
"correctFirstAnswers": 1,
"firstTimePassRate": 123
}
]
},
"run": {
"eligible": 1,
"reassigned": 1,
"failed": 1,
"remaining": 1,
"ranAt": "<string>",
"reassignedTotal": 1
}
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "unauthorisedrequest"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "forbidden"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "unknownobject"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "internal_server_error"
}
]
},
"imsx_error_details": [
{}
]
}Authorizations
Body
application/json
Response
The declaration or preview
⌘I
Declare a lesson version (Curriculum Fixing)
curl --request POST \
--url https://api.alpha-1edtech.ai/powerpath/lessons/{lessonId}/versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "<string>",
"dryRun": true,
"limit": 500
}
'import requests
url = "https://api.alpha-1edtech.ai/powerpath/lessons/{lessonId}/versions"
payload = {
"reason": "<string>",
"dryRun": True,
"limit": 500
}
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({reason: '<string>', dryRun: true, limit: 500})
};
fetch('https://api.alpha-1edtech.ai/powerpath/lessons/{lessonId}/versions', 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.alpha-1edtech.ai/powerpath/lessons/{lessonId}/versions",
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([
'reason' => '<string>',
'dryRun' => true,
'limit' => 500
]),
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.alpha-1edtech.ai/powerpath/lessons/{lessonId}/versions"
payload := strings.NewReader("{\n \"reason\": \"<string>\",\n \"dryRun\": true,\n \"limit\": 500\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.alpha-1edtech.ai/powerpath/lessons/{lessonId}/versions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"<string>\",\n \"dryRun\": true,\n \"limit\": 500\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alpha-1edtech.ai/powerpath/lessons/{lessonId}/versions")
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 \"reason\": \"<string>\",\n \"dryRun\": true,\n \"limit\": 500\n}"
response = http.request(request)
puts response.read_body{
"lessonId": "<string>",
"dryRun": true,
"version": 123,
"baseline": true,
"unchanged": true,
"written": true,
"changed": {
"items": [
"<string>"
],
"article": true,
"video": true,
"checkpoints": [
"<string>"
]
},
"receipt": {
"takenAt": "<string>",
"resourceIds": [
"<string>"
],
"parts": [
{
"kind": "practice-set",
"componentResourceId": "<string>",
"resourceId": "<string>",
"test": "<string>",
"items": [
{
"identifier": "<string>",
"sha256": "<string>",
"updatedAt": "<string>",
"version": 123,
"updatedBy": "<string>"
}
],
"changed": true
}
]
},
"previous": {
"id": "<string>",
"version": 123,
"declaredAt": "<string>",
"declaredByClientId": "<string>",
"run": {
"eligible": 1,
"reassigned": 1,
"failed": 1,
"remaining": 1,
"ranAt": "<string>",
"reassignedTotal": 1
}
},
"declaredByClientId": "<string>",
"declaredAt": "<string>",
"population": {
"lessons": 1,
"plans": 1,
"counts": {
"eligible": 1,
"completedNotMastered": 1,
"mastered": 1,
"notAttempted": 1,
"missesUntouched": 1,
"alreadyReassigned": 1,
"operatorSkipped": 1
},
"byCourse": [
{
"courseId": "<string>",
"plans": 1,
"eligible": 1,
"completedNotMastered": 1
}
],
"items": [
{
"id": "<string>",
"firstAnswers": 1,
"correctFirstAnswers": 1,
"firstTimePassRate": 123
}
]
},
"run": {
"eligible": 1,
"reassigned": 1,
"failed": 1,
"remaining": 1,
"ranAt": "<string>",
"reassignedTotal": 1
}
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "unauthorisedrequest"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "forbidden"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "unknownobject"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "internal_server_error"
}
]
},
"imsx_error_details": [
{}
]
}