レッスン詳細取得
curl --request GET \
--url https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}/lessons/{lesson_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}/lessons/{lesson_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}/lessons/{lesson_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://api.utage-system.com/v1/members/{site_id}/courses/{course_id}/lessons/{lesson_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://api.utage-system.com/v1/members/{site_id}/courses/{course_id}/lessons/{lesson_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://api.utage-system.com/v1/members/{site_id}/courses/{course_id}/lessons/{lesson_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}/lessons/{lesson_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{
"data": {
"id": "<string>",
"name": "<string>",
"lesson_group_id": "<string>",
"type": "html",
"lesson_url": "<string>",
"is_published": true,
"show_title": true,
"width": 123,
"background_color": "<string>",
"use_comment": true,
"is_comment_override": true,
"comment_text": "<string>",
"comment_show_type": "<string>",
"hide_comment_posted_at": true,
"comment_default_value": "<string>",
"js_head": "<string>",
"js_body_top": "<string>",
"js_body": "<string>",
"css": "<string>",
"release_type": "<string>",
"release_day": 123,
"release_month": 123,
"release_date": "<string>",
"release_hour": 123,
"action_before_release": "show",
"has_target_persons": true,
"target_persons_date_from": "<string>",
"target_persons_date_to": "<string>",
"elements": [
{
"type": "<string>",
"element_id": 123,
"children": [
{}
]
}
],
"order": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"code": "bad_request",
"message": "リッチテキスト形式のレッスンはAPIで取得・更新・削除できません(一覧の取得と並び替えは可能)"
}
}{
"error": {
"code": "unauthorized",
"message": "APIキーが無効です"
}
}{
"error": {
"code": "not_found",
"message": "レッスンが見つかりません"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "レート制限を超過しました"
}
}レッスン
レッスン詳細取得
レッスンの詳細を取得します。要素の階層構造(elements。各要素に element_id 付き)と、ステータス・開放日・コメント・受講対象者・デザイン・カスタムJS/CSS の設定を含みます。
応答の data をそのまま PATCH に送るとレッスンの状態は変わりません。更新前はこのエンドポイントで現在値を取得してください。
「リッチテキスト」(type=rich_text)のレッスンは取得できず 400(bad_request)になります(一覧の取得と並び替えは可能)。
レッスン詳細取得
curl --request GET \
--url https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}/lessons/{lesson_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}/lessons/{lesson_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}/lessons/{lesson_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://api.utage-system.com/v1/members/{site_id}/courses/{course_id}/lessons/{lesson_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://api.utage-system.com/v1/members/{site_id}/courses/{course_id}/lessons/{lesson_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://api.utage-system.com/v1/members/{site_id}/courses/{course_id}/lessons/{lesson_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}/lessons/{lesson_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{
"data": {
"id": "<string>",
"name": "<string>",
"lesson_group_id": "<string>",
"type": "html",
"lesson_url": "<string>",
"is_published": true,
"show_title": true,
"width": 123,
"background_color": "<string>",
"use_comment": true,
"is_comment_override": true,
"comment_text": "<string>",
"comment_show_type": "<string>",
"hide_comment_posted_at": true,
"comment_default_value": "<string>",
"js_head": "<string>",
"js_body_top": "<string>",
"js_body": "<string>",
"css": "<string>",
"release_type": "<string>",
"release_day": 123,
"release_month": 123,
"release_date": "<string>",
"release_hour": 123,
"action_before_release": "show",
"has_target_persons": true,
"target_persons_date_from": "<string>",
"target_persons_date_to": "<string>",
"elements": [
{
"type": "<string>",
"element_id": 123,
"children": [
{}
]
}
],
"order": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"code": "bad_request",
"message": "リッチテキスト形式のレッスンはAPIで取得・更新・削除できません(一覧の取得と並び替えは可能)"
}
}{
"error": {
"code": "unauthorized",
"message": "APIキーが無効です"
}
}{
"error": {
"code": "not_found",
"message": "レッスンが見つかりません"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "レート制限を超過しました"
}
}GET
https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}/lessons/{lesson_id}