Get a course draft
curl --request GET \
--url https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId} \
--header 'x-access-token: <api-key>'import requests
url = "https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}"
headers = {"x-access-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-access-token': '<api-key>'}};
fetch('https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}', 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://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-access-token: <api-key>"
],
]);
$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://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-access-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}")
.header("x-access-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-access-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"payload": {
"draft": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"title": "<string>",
"media_item_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"progress": {
"step": "<string>",
"done": 123,
"total": 123
},
"error": "<string>",
"lesson_count": 123,
"applied_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"bundle": {
"lessons": [
{}
],
"courses": [
{}
],
"certifications": [
{}
]
},
"diff": {},
"warnings": [
{
"lesson": 123,
"message": "<string>"
}
],
"media": {},
"apply_result": {}
}
}
}Org — Learning
Get a course draft
While generating: status and progress. When ready: the bundle (lessons, the course, the certification), the diff publishing would make, warnings (questions left out because the clip doesn’t answer them) and media — per clip, its status and a short-lived playable url. Requires read:learning. Also at GET /v1/learning/drafts/{draftId}.
GET
/
v1
/
organization
/
{orgId}
/
learning
/
drafts
/
{draftId}
Get a course draft
curl --request GET \
--url https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId} \
--header 'x-access-token: <api-key>'import requests
url = "https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}"
headers = {"x-access-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-access-token': '<api-key>'}};
fetch('https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}', 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://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-access-token: <api-key>"
],
]);
$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://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-access-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}")
.header("x-access-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-access-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"payload": {
"draft": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"title": "<string>",
"media_item_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"progress": {
"step": "<string>",
"done": 123,
"total": 123
},
"error": "<string>",
"lesson_count": 123,
"applied_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"bundle": {
"lessons": [
{}
],
"courses": [
{}
],
"certifications": [
{}
]
},
"diff": {},
"warnings": [
{
"lesson": 123,
"message": "<string>"
}
],
"media": {},
"apply_result": {}
}
}
}Authorizations
ApiKeyBearerToken
Organization API token. Generate from Organization Settings → API Tokens.
Path Parameters
Your organization ID. Any other organization returns 404.
Response
OK
Show child attributes
Show child attributes

