Criar Aulas
curl --request POST \
--url https://kong.api.toolzz.com.br/api/content/course/{course_id}/create_class \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"description": "<string>",
"duration": 123,
"tag": [
{}
],
"progress_criteria": [
{}
],
"show_title": 123,
"enable_lesson_view": 123,
"scheduled_date": "<string>"
}
'import requests
url = "https://kong.api.toolzz.com.br/api/content/course/{course_id}/create_class"
payload = {
"title": "<string>",
"description": "<string>",
"duration": 123,
"tag": [{}],
"progress_criteria": [{}],
"show_title": 123,
"enable_lesson_view": 123,
"scheduled_date": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
description: '<string>',
duration: 123,
tag: [{}],
progress_criteria: [{}],
show_title: 123,
enable_lesson_view: 123,
scheduled_date: '<string>'
})
};
fetch('https://kong.api.toolzz.com.br/api/content/course/{course_id}/create_class', 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://kong.api.toolzz.com.br/api/content/course/{course_id}/create_class",
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([
'title' => '<string>',
'description' => '<string>',
'duration' => 123,
'tag' => [
[
]
],
'progress_criteria' => [
[
]
],
'show_title' => 123,
'enable_lesson_view' => 123,
'scheduled_date' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://kong.api.toolzz.com.br/api/content/course/{course_id}/create_class"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"duration\": 123,\n \"tag\": [\n {}\n ],\n \"progress_criteria\": [\n {}\n ],\n \"show_title\": 123,\n \"enable_lesson_view\": 123,\n \"scheduled_date\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://kong.api.toolzz.com.br/api/content/course/{course_id}/create_class")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"duration\": 123,\n \"tag\": [\n {}\n ],\n \"progress_criteria\": [\n {}\n ],\n \"show_title\": 123,\n \"enable_lesson_view\": 123,\n \"scheduled_date\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://kong.api.toolzz.com.br/api/content/course/{course_id}/create_class")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"duration\": 123,\n \"tag\": [\n {}\n ],\n \"progress_criteria\": [\n {}\n ],\n \"show_title\": 123,\n \"enable_lesson_view\": 123,\n \"scheduled_date\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"curso_id": "<string>",
"id": "<string>",
"user_id": "<string>",
"titulo": "<string>",
"descricao": "<string>",
"enable_lesson_view": 123,
"duracao": 123,
"liberacao": "<string>",
"requisito": "<string>",
"requisito_id": 123,
"tags": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"ordem": 123,
"title_visibility": 123,
"description_visibility": 123
}
}Aulas
Criar Aulas
Este endpoint permite a criação de aulas em um curso no Toolzz LMS.
POST
/
api
/
content
/
course
/
{course_id}
/
create_class
Criar Aulas
curl --request POST \
--url https://kong.api.toolzz.com.br/api/content/course/{course_id}/create_class \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"description": "<string>",
"duration": 123,
"tag": [
{}
],
"progress_criteria": [
{}
],
"show_title": 123,
"enable_lesson_view": 123,
"scheduled_date": "<string>"
}
'import requests
url = "https://kong.api.toolzz.com.br/api/content/course/{course_id}/create_class"
payload = {
"title": "<string>",
"description": "<string>",
"duration": 123,
"tag": [{}],
"progress_criteria": [{}],
"show_title": 123,
"enable_lesson_view": 123,
"scheduled_date": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
description: '<string>',
duration: 123,
tag: [{}],
progress_criteria: [{}],
show_title: 123,
enable_lesson_view: 123,
scheduled_date: '<string>'
})
};
fetch('https://kong.api.toolzz.com.br/api/content/course/{course_id}/create_class', 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://kong.api.toolzz.com.br/api/content/course/{course_id}/create_class",
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([
'title' => '<string>',
'description' => '<string>',
'duration' => 123,
'tag' => [
[
]
],
'progress_criteria' => [
[
]
],
'show_title' => 123,
'enable_lesson_view' => 123,
'scheduled_date' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://kong.api.toolzz.com.br/api/content/course/{course_id}/create_class"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"duration\": 123,\n \"tag\": [\n {}\n ],\n \"progress_criteria\": [\n {}\n ],\n \"show_title\": 123,\n \"enable_lesson_view\": 123,\n \"scheduled_date\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://kong.api.toolzz.com.br/api/content/course/{course_id}/create_class")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"duration\": 123,\n \"tag\": [\n {}\n ],\n \"progress_criteria\": [\n {}\n ],\n \"show_title\": 123,\n \"enable_lesson_view\": 123,\n \"scheduled_date\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://kong.api.toolzz.com.br/api/content/course/{course_id}/create_class")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"duration\": 123,\n \"tag\": [\n {}\n ],\n \"progress_criteria\": [\n {}\n ],\n \"show_title\": 123,\n \"enable_lesson_view\": 123,\n \"scheduled_date\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"curso_id": "<string>",
"id": "<string>",
"user_id": "<string>",
"titulo": "<string>",
"descricao": "<string>",
"enable_lesson_view": 123,
"duracao": 123,
"liberacao": "<string>",
"requisito": "<string>",
"requisito_id": 123,
"tags": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"ordem": 123,
"title_visibility": 123,
"description_visibility": 123
}
}Parâmetros
int
required
ID do curso no qual a nova aula será registrada.
string
required
Título da aula. Máximo de 150 caracteres.
string
required
Descrição do conteúdo da aula. Máximo de 255 caracteres.
int
Tempo de duração total da aula. Máximo de 4 caracteres.
array
Classificação usada para agrupar a aula. Cada tag pode ter no máximo 150 caracteres.
array
Lista de IDs de aulas necessárias para liberar a aula atual. Opcional, pode vir como null. As aulas indicadas devem pertencer ao mesmo curso do course_id., Caso um ou mais IDs sejam inválidos, os mesmos são ignorados e apenas os ID’s válidos são registrados.
int
Define se a aula pode ser acessada por usuários visitantes.Para ser 1, a instituição deve possuir a feature “pacote de views para visitantes”.
Padrão: 0.
int
Define se a aula pode ser acessada por usuários visitantes.Para ser 1, a instituição deve possuir a feature “pacote de views para visitantes”.
Padrão: 0.
date
Data para futura liberação da aula.Formato esperado:
YYYY-MM-DD HH:MM.
Caso seja null, a aula será considerada sem data de agendamento.Antes de utilizar este endpoint certifique-se de possuir o seguinte parâmetro disponível:
- Token de autenticação: Necessário enviar um token de autenticação no cabeçalho da requisição.
Descrição da Resposta
Abaixo está um exemplo da resposta retornada por este endpoint.object
List of configurations.
Show properties
Show properties
string
Unique identifier for the course.
string
Unique identifier for the configuration.
string
ID of the associated user.
string
Title of the course.
string
Description of the course.
number
Enable lesson view status.
number
Duration of the course.
Date
Release date and time for the course.
string
Prerequisite for the course.
number
ID of the prerequisite.
string
Tags associated with the course.
Date
Date and time when the course was created.
Date
Date and time when the course was last updated.
number
Order or priority of the course.
number
Visibility status of the title.
number
Visibility status of the description.

