Get Lesson Details
curl --request GET \
--url https://schoolmaker.co/api/v1/lessons/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://schoolmaker.co/api/v1/lessons/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://schoolmaker.co/api/v1/lessons/{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://schoolmaker.co/api/v1/lessons/{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://schoolmaker.co/api/v1/lessons/{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://schoolmaker.co/api/v1/lessons/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://schoolmaker.co/api/v1/lessons/{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{
"id": "lesson_id",
"section_id": "section_id",
"name": "Introduction",
"position": 1,
"lesson_type": "text",
"drip_delay": 0,
"is_published": false,
"is_progression_locked": false,
"description": "",
"body": "<div class=\"lexxy-content\"><h1>Welcome</h1></div>",
"settings_embed_wistia": null,
"settings_embed_vimeo": null,
"settings_embed_youtube": null,
"settings_embed_loom": null,
"settings_embed_code": null,
"embed_code": null,
"transcripts": [],
"media": {
"pdf_url": null,
"audio_url": null,
"video_poster_url": null,
"video_status": null,
"video_id": null,
"video_error": null,
"video_progress": null
}
}{
"error": "Access denied"
}{
"error": "Access denied"
}{
"error": "Record not found"
}{
"error": "Invalid arguments: /attributes/drip_delay integer"
}Lessons
Get Lesson Details
Retrieves a lesson’s content, settings, transcripts and media. Transcripts are read-only.
GET
/
lessons
/
{id}
Get Lesson Details
curl --request GET \
--url https://schoolmaker.co/api/v1/lessons/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://schoolmaker.co/api/v1/lessons/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://schoolmaker.co/api/v1/lessons/{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://schoolmaker.co/api/v1/lessons/{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://schoolmaker.co/api/v1/lessons/{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://schoolmaker.co/api/v1/lessons/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://schoolmaker.co/api/v1/lessons/{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{
"id": "lesson_id",
"section_id": "section_id",
"name": "Introduction",
"position": 1,
"lesson_type": "text",
"drip_delay": 0,
"is_published": false,
"is_progression_locked": false,
"description": "",
"body": "<div class=\"lexxy-content\"><h1>Welcome</h1></div>",
"settings_embed_wistia": null,
"settings_embed_vimeo": null,
"settings_embed_youtube": null,
"settings_embed_loom": null,
"settings_embed_code": null,
"embed_code": null,
"transcripts": [],
"media": {
"pdf_url": null,
"audio_url": null,
"video_poster_url": null,
"video_status": null,
"video_id": null,
"video_error": null,
"video_progress": null
}
}{
"error": "Access denied"
}{
"error": "Access denied"
}{
"error": "Record not found"
}{
"error": "Invalid arguments: /attributes/drip_delay integer"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Lesson ID.
Response
Successful request.
Available options:
video, text, pdf, embed, audio Rendered HTML.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?