コース取得
curl --request GET \
--url https://api.utage-system.com/v1/members/{site_id}/courses/{course_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.utage-system.com/v1/members/{site_id}/courses/{course_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}', 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}",
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}"
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}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/members/{site_id}/courses/{course_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>",
"system_name": "<string>",
"type": "normal",
"course_url": "<string>",
"url": "<string>",
"href_type": "<string>",
"image_url": "<string>",
"button_text": "<string>",
"is_hide_progress": true,
"is_video_autoplay_setting": true,
"comment_setting_type": "individual",
"is_published": true,
"category_ids": [
"<string>"
],
"require_login": true,
"show_non_purchaser": true,
"url_for_non_purchaser": "<string>",
"use_limited_offer": true,
"limited_offers": [
{
"type": "bundle_enrolled_date",
"bundle_id": "<string>",
"day": 123,
"hour": 123,
"url": "<string>"
}
],
"has_target_persons": true,
"target_persons_date_from": "<string>",
"target_persons_date_to": "<string>",
"course_style": "open_all",
"release_type": "immediately",
"release_day": 123,
"release_month": 123,
"release_date": "<string>",
"release_hour": 123,
"action_before_release": "show",
"close_type": "none",
"close_day": 123,
"close_date": "<string>",
"close_hour": 123,
"cancel_type": "close",
"course_group_id": "<string>",
"order": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"code": "unauthorized",
"message": "APIキーが無効です"
}
}{
"error": {
"code": "not_found",
"message": "ページが見つかりません"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "レート制限を超過しました"
}
}コース
コース取得
コースの設定を取得します。基本設定、未購入者へのオファー設定(常時表示オファー・期間限定オファー)、自動化設定(受講対象者・受講スタイル・開放日・締め切り・受講停止時の動作)、コメント設定、コースカテゴリ(category_ids)、所属コースグループ(course_group_id)を含む全項目を返します。
コース取得
curl --request GET \
--url https://api.utage-system.com/v1/members/{site_id}/courses/{course_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.utage-system.com/v1/members/{site_id}/courses/{course_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}', 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}",
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}"
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}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/members/{site_id}/courses/{course_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>",
"system_name": "<string>",
"type": "normal",
"course_url": "<string>",
"url": "<string>",
"href_type": "<string>",
"image_url": "<string>",
"button_text": "<string>",
"is_hide_progress": true,
"is_video_autoplay_setting": true,
"comment_setting_type": "individual",
"is_published": true,
"category_ids": [
"<string>"
],
"require_login": true,
"show_non_purchaser": true,
"url_for_non_purchaser": "<string>",
"use_limited_offer": true,
"limited_offers": [
{
"type": "bundle_enrolled_date",
"bundle_id": "<string>",
"day": 123,
"hour": 123,
"url": "<string>"
}
],
"has_target_persons": true,
"target_persons_date_from": "<string>",
"target_persons_date_to": "<string>",
"course_style": "open_all",
"release_type": "immediately",
"release_day": 123,
"release_month": 123,
"release_date": "<string>",
"release_hour": 123,
"action_before_release": "show",
"close_type": "none",
"close_day": 123,
"close_date": "<string>",
"close_hour": 123,
"cancel_type": "close",
"course_group_id": "<string>",
"order": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"code": "unauthorized",
"message": "APIキーが無効です"
}
}{
"error": {
"code": "not_found",
"message": "ページが見つかりません"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "レート制限を超過しました"
}
}