session
Post apiv1templates
POST
/
api
/
v1
/
templates
cURL
curl --request POST \
--url https://tessera.edstratumlabs.ai/api/v1/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"owner": {
"kind": "institution"
},
"modules": [
{
"key": "<string>",
"title": "<string>",
"objective": "<string>",
"lessons": [
{
"key": "<string>",
"title": "<string>",
"minutes": 120,
"blocks": [
{
"key": "<string>",
"label": "<string>",
"content": {
"type": "heading",
"level": 2,
"text": "<string>"
}
}
]
}
]
}
],
"tutorDefaults": {},
"accessFloor": 50,
"description": "<string>"
}
'import requests
url = "https://tessera.edstratumlabs.ai/api/v1/templates"
payload = {
"name": "<string>",
"owner": { "kind": "institution" },
"modules": [
{
"key": "<string>",
"title": "<string>",
"objective": "<string>",
"lessons": [
{
"key": "<string>",
"title": "<string>",
"minutes": 120,
"blocks": [
{
"key": "<string>",
"label": "<string>",
"content": {
"type": "heading",
"level": 2,
"text": "<string>"
}
}
]
}
]
}
],
"tutorDefaults": {},
"accessFloor": 50,
"description": "<string>"
}
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({
name: '<string>',
owner: {kind: 'institution'},
modules: [
{
key: '<string>',
title: '<string>',
objective: '<string>',
lessons: [
{
key: '<string>',
title: '<string>',
minutes: 120,
blocks: [
{
key: '<string>',
label: '<string>',
content: {type: 'heading', level: 2, text: '<string>'}
}
]
}
]
}
],
tutorDefaults: {},
accessFloor: 50,
description: '<string>'
})
};
fetch('https://tessera.edstratumlabs.ai/api/v1/templates', 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://tessera.edstratumlabs.ai/api/v1/templates",
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([
'name' => '<string>',
'owner' => [
'kind' => 'institution'
],
'modules' => [
[
'key' => '<string>',
'title' => '<string>',
'objective' => '<string>',
'lessons' => [
[
'key' => '<string>',
'title' => '<string>',
'minutes' => 120,
'blocks' => [
[
'key' => '<string>',
'label' => '<string>',
'content' => [
'type' => 'heading',
'level' => 2,
'text' => '<string>'
]
]
]
]
]
]
],
'tutorDefaults' => [
],
'accessFloor' => 50,
'description' => '<string>'
]),
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://tessera.edstratumlabs.ai/api/v1/templates"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"owner\": {\n \"kind\": \"institution\"\n },\n \"modules\": [\n {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"objective\": \"<string>\",\n \"lessons\": [\n {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"minutes\": 120,\n \"blocks\": [\n {\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"content\": {\n \"type\": \"heading\",\n \"level\": 2,\n \"text\": \"<string>\"\n }\n }\n ]\n }\n ]\n }\n ],\n \"tutorDefaults\": {},\n \"accessFloor\": 50,\n \"description\": \"<string>\"\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://tessera.edstratumlabs.ai/api/v1/templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"owner\": {\n \"kind\": \"institution\"\n },\n \"modules\": [\n {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"objective\": \"<string>\",\n \"lessons\": [\n {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"minutes\": 120,\n \"blocks\": [\n {\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"content\": {\n \"type\": \"heading\",\n \"level\": 2,\n \"text\": \"<string>\"\n }\n }\n ]\n }\n ]\n }\n ],\n \"tutorDefaults\": {},\n \"accessFloor\": 50,\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tessera.edstratumlabs.ai/api/v1/templates")
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 \"name\": \"<string>\",\n \"owner\": {\n \"kind\": \"institution\"\n },\n \"modules\": [\n {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"objective\": \"<string>\",\n \"lessons\": [\n {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"minutes\": 120,\n \"blocks\": [\n {\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"content\": {\n \"type\": \"heading\",\n \"level\": 2,\n \"text\": \"<string>\"\n }\n }\n ]\n }\n ]\n }\n ],\n \"tutorDefaults\": {},\n \"accessFloor\": 50,\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"owner": {
"kind": "institution"
},
"modules": [
{
"key": "<string>",
"title": "<string>",
"placement": "start",
"objective": "<string>",
"lessons": [
{
"key": "<string>",
"title": "<string>",
"minutes": 120,
"blocks": [
{
"key": "<string>",
"label": "<string>",
"content": {
"type": "heading",
"level": 2,
"text": "<string>"
}
}
]
}
]
}
],
"tutorDefaults": {
"lesson": "off",
"assignment": "off"
},
"accessFloor": 50,
"updatedBy": "<string>",
"updatedAt": "<string>"
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": "<unknown>"
}
}Authorizations
Scoped tsk_… API token or Access JWT
Body
application/json
Response
Success
Minimum string length:
1Minimum string length:
1- Option 1
- Option 2
Show child attributes
Show child attributes
Maximum array length:
20Show child attributes
Show child attributes
Show child attributes
Show child attributes
Required range:
0 <= x <= 100Minimum string length:
1Minimum string length:
1⌘I
cURL
curl --request POST \
--url https://tessera.edstratumlabs.ai/api/v1/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"owner": {
"kind": "institution"
},
"modules": [
{
"key": "<string>",
"title": "<string>",
"objective": "<string>",
"lessons": [
{
"key": "<string>",
"title": "<string>",
"minutes": 120,
"blocks": [
{
"key": "<string>",
"label": "<string>",
"content": {
"type": "heading",
"level": 2,
"text": "<string>"
}
}
]
}
]
}
],
"tutorDefaults": {},
"accessFloor": 50,
"description": "<string>"
}
'import requests
url = "https://tessera.edstratumlabs.ai/api/v1/templates"
payload = {
"name": "<string>",
"owner": { "kind": "institution" },
"modules": [
{
"key": "<string>",
"title": "<string>",
"objective": "<string>",
"lessons": [
{
"key": "<string>",
"title": "<string>",
"minutes": 120,
"blocks": [
{
"key": "<string>",
"label": "<string>",
"content": {
"type": "heading",
"level": 2,
"text": "<string>"
}
}
]
}
]
}
],
"tutorDefaults": {},
"accessFloor": 50,
"description": "<string>"
}
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({
name: '<string>',
owner: {kind: 'institution'},
modules: [
{
key: '<string>',
title: '<string>',
objective: '<string>',
lessons: [
{
key: '<string>',
title: '<string>',
minutes: 120,
blocks: [
{
key: '<string>',
label: '<string>',
content: {type: 'heading', level: 2, text: '<string>'}
}
]
}
]
}
],
tutorDefaults: {},
accessFloor: 50,
description: '<string>'
})
};
fetch('https://tessera.edstratumlabs.ai/api/v1/templates', 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://tessera.edstratumlabs.ai/api/v1/templates",
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([
'name' => '<string>',
'owner' => [
'kind' => 'institution'
],
'modules' => [
[
'key' => '<string>',
'title' => '<string>',
'objective' => '<string>',
'lessons' => [
[
'key' => '<string>',
'title' => '<string>',
'minutes' => 120,
'blocks' => [
[
'key' => '<string>',
'label' => '<string>',
'content' => [
'type' => 'heading',
'level' => 2,
'text' => '<string>'
]
]
]
]
]
]
],
'tutorDefaults' => [
],
'accessFloor' => 50,
'description' => '<string>'
]),
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://tessera.edstratumlabs.ai/api/v1/templates"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"owner\": {\n \"kind\": \"institution\"\n },\n \"modules\": [\n {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"objective\": \"<string>\",\n \"lessons\": [\n {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"minutes\": 120,\n \"blocks\": [\n {\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"content\": {\n \"type\": \"heading\",\n \"level\": 2,\n \"text\": \"<string>\"\n }\n }\n ]\n }\n ]\n }\n ],\n \"tutorDefaults\": {},\n \"accessFloor\": 50,\n \"description\": \"<string>\"\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://tessera.edstratumlabs.ai/api/v1/templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"owner\": {\n \"kind\": \"institution\"\n },\n \"modules\": [\n {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"objective\": \"<string>\",\n \"lessons\": [\n {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"minutes\": 120,\n \"blocks\": [\n {\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"content\": {\n \"type\": \"heading\",\n \"level\": 2,\n \"text\": \"<string>\"\n }\n }\n ]\n }\n ]\n }\n ],\n \"tutorDefaults\": {},\n \"accessFloor\": 50,\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tessera.edstratumlabs.ai/api/v1/templates")
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 \"name\": \"<string>\",\n \"owner\": {\n \"kind\": \"institution\"\n },\n \"modules\": [\n {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"objective\": \"<string>\",\n \"lessons\": [\n {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"minutes\": 120,\n \"blocks\": [\n {\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"content\": {\n \"type\": \"heading\",\n \"level\": 2,\n \"text\": \"<string>\"\n }\n }\n ]\n }\n ]\n }\n ],\n \"tutorDefaults\": {},\n \"accessFloor\": 50,\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"owner": {
"kind": "institution"
},
"modules": [
{
"key": "<string>",
"title": "<string>",
"placement": "start",
"objective": "<string>",
"lessons": [
{
"key": "<string>",
"title": "<string>",
"minutes": 120,
"blocks": [
{
"key": "<string>",
"label": "<string>",
"content": {
"type": "heading",
"level": 2,
"text": "<string>"
}
}
]
}
]
}
],
"tutorDefaults": {
"lesson": "off",
"assignment": "off"
},
"accessFloor": 50,
"updatedBy": "<string>",
"updatedAt": "<string>"
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": "<unknown>"
}
}