会員サイト更新
curl --request PATCH \
--url https://api.utage-system.com/v1/members/{site_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"memo": "<string>",
"copyright": "<string>",
"temporary_password": "<string>",
"days_to_password_change": 182,
"js_head": "<string>",
"js_body_top": "<string>",
"js_body": "<string>",
"use_bookmark": true,
"is_no_index": true,
"show_link_to_community": true,
"login_background": "<string>",
"login_background_center": "<string>",
"login_use_logo": true,
"login_logo_url": "<string>",
"login_footer_use_menu": true,
"login_footer_menu_items": [
{
"type": "page",
"text": "<string>",
"page_id": "<string>",
"url": "<string>"
}
],
"use_description": true,
"description": "<string>",
"use_news": true,
"show_course_search": true,
"show_course_category": true,
"course_name_font_size": "<string>",
"course_background": "<string>",
"course_header_background": "<string>",
"course_header_color": "<string>",
"course_header_use_logo": true,
"course_header_logo_url": "<string>",
"course_header_use_menu": true,
"course_header_menu_items": [
{
"type": "page",
"text": "<string>",
"page_id": "<string>",
"url": "<string>"
}
],
"course_footer_background": "<string>",
"course_footer_color": "<string>",
"course_footer_use_menu": true,
"course_footer_menu_items": [
{
"type": "page",
"text": "<string>",
"page_id": "<string>",
"url": "<string>"
}
],
"lesson_show_all_lessons": true,
"show_lesson_search": true
}
'import requests
url = "https://api.utage-system.com/v1/members/{site_id}"
payload = {
"name": "<string>",
"memo": "<string>",
"copyright": "<string>",
"temporary_password": "<string>",
"days_to_password_change": 182,
"js_head": "<string>",
"js_body_top": "<string>",
"js_body": "<string>",
"use_bookmark": True,
"is_no_index": True,
"show_link_to_community": True,
"login_background": "<string>",
"login_background_center": "<string>",
"login_use_logo": True,
"login_logo_url": "<string>",
"login_footer_use_menu": True,
"login_footer_menu_items": [
{
"type": "page",
"text": "<string>",
"page_id": "<string>",
"url": "<string>"
}
],
"use_description": True,
"description": "<string>",
"use_news": True,
"show_course_search": True,
"show_course_category": True,
"course_name_font_size": "<string>",
"course_background": "<string>",
"course_header_background": "<string>",
"course_header_color": "<string>",
"course_header_use_logo": True,
"course_header_logo_url": "<string>",
"course_header_use_menu": True,
"course_header_menu_items": [
{
"type": "page",
"text": "<string>",
"page_id": "<string>",
"url": "<string>"
}
],
"course_footer_background": "<string>",
"course_footer_color": "<string>",
"course_footer_use_menu": True,
"course_footer_menu_items": [
{
"type": "page",
"text": "<string>",
"page_id": "<string>",
"url": "<string>"
}
],
"lesson_show_all_lessons": True,
"show_lesson_search": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
memo: '<string>',
copyright: '<string>',
temporary_password: '<string>',
days_to_password_change: 182,
js_head: '<string>',
js_body_top: '<string>',
js_body: '<string>',
use_bookmark: true,
is_no_index: true,
show_link_to_community: true,
login_background: '<string>',
login_background_center: '<string>',
login_use_logo: true,
login_logo_url: '<string>',
login_footer_use_menu: true,
login_footer_menu_items: [{type: 'page', text: '<string>', page_id: '<string>', url: '<string>'}],
use_description: true,
description: '<string>',
use_news: true,
show_course_search: true,
show_course_category: true,
course_name_font_size: '<string>',
course_background: '<string>',
course_header_background: '<string>',
course_header_color: '<string>',
course_header_use_logo: true,
course_header_logo_url: '<string>',
course_header_use_menu: true,
course_header_menu_items: [{type: 'page', text: '<string>', page_id: '<string>', url: '<string>'}],
course_footer_background: '<string>',
course_footer_color: '<string>',
course_footer_use_menu: true,
course_footer_menu_items: [{type: 'page', text: '<string>', page_id: '<string>', url: '<string>'}],
lesson_show_all_lessons: true,
show_lesson_search: true
})
};
fetch('https://api.utage-system.com/v1/members/{site_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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'memo' => '<string>',
'copyright' => '<string>',
'temporary_password' => '<string>',
'days_to_password_change' => 182,
'js_head' => '<string>',
'js_body_top' => '<string>',
'js_body' => '<string>',
'use_bookmark' => true,
'is_no_index' => true,
'show_link_to_community' => true,
'login_background' => '<string>',
'login_background_center' => '<string>',
'login_use_logo' => true,
'login_logo_url' => '<string>',
'login_footer_use_menu' => true,
'login_footer_menu_items' => [
[
'type' => 'page',
'text' => '<string>',
'page_id' => '<string>',
'url' => '<string>'
]
],
'use_description' => true,
'description' => '<string>',
'use_news' => true,
'show_course_search' => true,
'show_course_category' => true,
'course_name_font_size' => '<string>',
'course_background' => '<string>',
'course_header_background' => '<string>',
'course_header_color' => '<string>',
'course_header_use_logo' => true,
'course_header_logo_url' => '<string>',
'course_header_use_menu' => true,
'course_header_menu_items' => [
[
'type' => 'page',
'text' => '<string>',
'page_id' => '<string>',
'url' => '<string>'
]
],
'course_footer_background' => '<string>',
'course_footer_color' => '<string>',
'course_footer_use_menu' => true,
'course_footer_menu_items' => [
[
'type' => 'page',
'text' => '<string>',
'page_id' => '<string>',
'url' => '<string>'
]
],
'lesson_show_all_lessons' => true,
'show_lesson_search' => true
]),
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://api.utage-system.com/v1/members/{site_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"memo\": \"<string>\",\n \"copyright\": \"<string>\",\n \"temporary_password\": \"<string>\",\n \"days_to_password_change\": 182,\n \"js_head\": \"<string>\",\n \"js_body_top\": \"<string>\",\n \"js_body\": \"<string>\",\n \"use_bookmark\": true,\n \"is_no_index\": true,\n \"show_link_to_community\": true,\n \"login_background\": \"<string>\",\n \"login_background_center\": \"<string>\",\n \"login_use_logo\": true,\n \"login_logo_url\": \"<string>\",\n \"login_footer_use_menu\": true,\n \"login_footer_menu_items\": [\n {\n \"type\": \"page\",\n \"text\": \"<string>\",\n \"page_id\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"use_description\": true,\n \"description\": \"<string>\",\n \"use_news\": true,\n \"show_course_search\": true,\n \"show_course_category\": true,\n \"course_name_font_size\": \"<string>\",\n \"course_background\": \"<string>\",\n \"course_header_background\": \"<string>\",\n \"course_header_color\": \"<string>\",\n \"course_header_use_logo\": true,\n \"course_header_logo_url\": \"<string>\",\n \"course_header_use_menu\": true,\n \"course_header_menu_items\": [\n {\n \"type\": \"page\",\n \"text\": \"<string>\",\n \"page_id\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"course_footer_background\": \"<string>\",\n \"course_footer_color\": \"<string>\",\n \"course_footer_use_menu\": true,\n \"course_footer_menu_items\": [\n {\n \"type\": \"page\",\n \"text\": \"<string>\",\n \"page_id\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"lesson_show_all_lessons\": true,\n \"show_lesson_search\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.utage-system.com/v1/members/{site_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"memo\": \"<string>\",\n \"copyright\": \"<string>\",\n \"temporary_password\": \"<string>\",\n \"days_to_password_change\": 182,\n \"js_head\": \"<string>\",\n \"js_body_top\": \"<string>\",\n \"js_body\": \"<string>\",\n \"use_bookmark\": true,\n \"is_no_index\": true,\n \"show_link_to_community\": true,\n \"login_background\": \"<string>\",\n \"login_background_center\": \"<string>\",\n \"login_use_logo\": true,\n \"login_logo_url\": \"<string>\",\n \"login_footer_use_menu\": true,\n \"login_footer_menu_items\": [\n {\n \"type\": \"page\",\n \"text\": \"<string>\",\n \"page_id\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"use_description\": true,\n \"description\": \"<string>\",\n \"use_news\": true,\n \"show_course_search\": true,\n \"show_course_category\": true,\n \"course_name_font_size\": \"<string>\",\n \"course_background\": \"<string>\",\n \"course_header_background\": \"<string>\",\n \"course_header_color\": \"<string>\",\n \"course_header_use_logo\": true,\n \"course_header_logo_url\": \"<string>\",\n \"course_header_use_menu\": true,\n \"course_header_menu_items\": [\n {\n \"type\": \"page\",\n \"text\": \"<string>\",\n \"page_id\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"course_footer_background\": \"<string>\",\n \"course_footer_color\": \"<string>\",\n \"course_footer_use_menu\": true,\n \"course_footer_menu_items\": [\n {\n \"type\": \"page\",\n \"text\": \"<string>\",\n \"page_id\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"lesson_show_all_lessons\": true,\n \"show_lesson_search\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/members/{site_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"memo\": \"<string>\",\n \"copyright\": \"<string>\",\n \"temporary_password\": \"<string>\",\n \"days_to_password_change\": 182,\n \"js_head\": \"<string>\",\n \"js_body_top\": \"<string>\",\n \"js_body\": \"<string>\",\n \"use_bookmark\": true,\n \"is_no_index\": true,\n \"show_link_to_community\": true,\n \"login_background\": \"<string>\",\n \"login_background_center\": \"<string>\",\n \"login_use_logo\": true,\n \"login_logo_url\": \"<string>\",\n \"login_footer_use_menu\": true,\n \"login_footer_menu_items\": [\n {\n \"type\": \"page\",\n \"text\": \"<string>\",\n \"page_id\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"use_description\": true,\n \"description\": \"<string>\",\n \"use_news\": true,\n \"show_course_search\": true,\n \"show_course_category\": true,\n \"course_name_font_size\": \"<string>\",\n \"course_background\": \"<string>\",\n \"course_header_background\": \"<string>\",\n \"course_header_color\": \"<string>\",\n \"course_header_use_logo\": true,\n \"course_header_logo_url\": \"<string>\",\n \"course_header_use_menu\": true,\n \"course_header_menu_items\": [\n {\n \"type\": \"page\",\n \"text\": \"<string>\",\n \"page_id\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"course_footer_background\": \"<string>\",\n \"course_footer_color\": \"<string>\",\n \"course_footer_use_menu\": true,\n \"course_footer_menu_items\": [\n {\n \"type\": \"page\",\n \"text\": \"<string>\",\n \"page_id\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"lesson_show_all_lessons\": true,\n \"show_lesson_search\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"memo": "<string>",
"copyright": "<string>",
"temporary_password": "<string>",
"days_to_password_change": 123,
"js_head": "<string>",
"js_body_top": "<string>",
"js_body": "<string>",
"login_type": "require",
"use_bookmark": true,
"is_no_index": true,
"show_link_to_community": true,
"login_background": "<string>",
"login_background_center": "<string>",
"login_use_logo": true,
"login_logo_url": "<string>",
"login_footer_use_menu": true,
"login_footer_menu_items": [
{
"type": "page",
"page_id": "<string>",
"url": "<string>",
"text": "<string>"
}
],
"use_description": true,
"description": "<string>",
"use_news": true,
"show_course_search": true,
"show_course_category": true,
"search_type": "all",
"course_display_type": "all",
"course_name_font_size": "<string>",
"course_background": "<string>",
"course_header_background": "<string>",
"course_header_color": "<string>",
"course_header_use_logo": true,
"course_header_logo_url": "<string>",
"course_header_use_menu": true,
"course_header_menu_items": [
{
"type": "page",
"page_id": "<string>",
"url": "<string>",
"text": "<string>"
}
],
"course_footer_background": "<string>",
"course_footer_color": "<string>",
"course_footer_use_menu": true,
"course_footer_menu_items": [
{
"type": "page",
"page_id": "<string>",
"url": "<string>",
"text": "<string>"
}
],
"lesson_complete_type": "stay",
"lesson_show_all_lessons": true,
"show_lesson_search": true,
"order": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"code": "bad_request",
"message": "show_link_to_communityはコミュニティ機能が有効な場合のみ変更できます"
}
}{
"error": {
"code": "unauthorized",
"message": "APIキーが無効です"
}
}{
"error": {
"code": "not_found",
"message": "ページが見つかりません"
}
}{
"error": {
"code": "validation_error",
"message": "入力内容に誤りがあります",
"details": {
"login_background": "login_backgroundは#RRGGBB形式で指定してください"
}
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "レート制限を超過しました"
}
}サイト
会員サイト更新
会員サイトの設定を更新します。指定したフィールドだけを更新する部分更新で、含めなかったフィールドは現在の値を維持します。基本設定(サイト設定「基本設定」)と、ログインページ・コースページ・レッスンページ(ページ設定)の項目を 1 つのリクエストで更新できます。
会員サイト取得の応答をそのまま送り返しても状態は変わりません。ただし、リンク先の固定ページが削除されたメニュー項目(type が page で page_id が null)が含まれる場合は、その項目を直すか除いてください(そのまま送ると 422 になります)。
- メニュー項目(
login_footer_menu_items/course_header_menu_items/course_footer_menu_items)は指定した内容で全件置き換えます。対応する〜_use_menuに false を指定すると、登録済みのメニュー項目は全て削除されます。更新後に〜_use_menuが false になる状態でメニュー項目を 1 件以上指定すると 422 です - 色(
#RRGGBB)とcourse_name_font_sizeの形式は、値を変更する場合だけ検証します(現在の値をそのまま送り返すことはできます) days_to_password_changeに null を指定すると、パスワード変更が未完了の受講生への変更要求も解除されますshow_link_to_communityは、コミュニティ機能が有効な会員サイトでのみ変更できます(無効なサイトで現在と異なる値を指定すると 400bad_request)
会員サイト更新
curl --request PATCH \
--url https://api.utage-system.com/v1/members/{site_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"memo": "<string>",
"copyright": "<string>",
"temporary_password": "<string>",
"days_to_password_change": 182,
"js_head": "<string>",
"js_body_top": "<string>",
"js_body": "<string>",
"use_bookmark": true,
"is_no_index": true,
"show_link_to_community": true,
"login_background": "<string>",
"login_background_center": "<string>",
"login_use_logo": true,
"login_logo_url": "<string>",
"login_footer_use_menu": true,
"login_footer_menu_items": [
{
"type": "page",
"text": "<string>",
"page_id": "<string>",
"url": "<string>"
}
],
"use_description": true,
"description": "<string>",
"use_news": true,
"show_course_search": true,
"show_course_category": true,
"course_name_font_size": "<string>",
"course_background": "<string>",
"course_header_background": "<string>",
"course_header_color": "<string>",
"course_header_use_logo": true,
"course_header_logo_url": "<string>",
"course_header_use_menu": true,
"course_header_menu_items": [
{
"type": "page",
"text": "<string>",
"page_id": "<string>",
"url": "<string>"
}
],
"course_footer_background": "<string>",
"course_footer_color": "<string>",
"course_footer_use_menu": true,
"course_footer_menu_items": [
{
"type": "page",
"text": "<string>",
"page_id": "<string>",
"url": "<string>"
}
],
"lesson_show_all_lessons": true,
"show_lesson_search": true
}
'import requests
url = "https://api.utage-system.com/v1/members/{site_id}"
payload = {
"name": "<string>",
"memo": "<string>",
"copyright": "<string>",
"temporary_password": "<string>",
"days_to_password_change": 182,
"js_head": "<string>",
"js_body_top": "<string>",
"js_body": "<string>",
"use_bookmark": True,
"is_no_index": True,
"show_link_to_community": True,
"login_background": "<string>",
"login_background_center": "<string>",
"login_use_logo": True,
"login_logo_url": "<string>",
"login_footer_use_menu": True,
"login_footer_menu_items": [
{
"type": "page",
"text": "<string>",
"page_id": "<string>",
"url": "<string>"
}
],
"use_description": True,
"description": "<string>",
"use_news": True,
"show_course_search": True,
"show_course_category": True,
"course_name_font_size": "<string>",
"course_background": "<string>",
"course_header_background": "<string>",
"course_header_color": "<string>",
"course_header_use_logo": True,
"course_header_logo_url": "<string>",
"course_header_use_menu": True,
"course_header_menu_items": [
{
"type": "page",
"text": "<string>",
"page_id": "<string>",
"url": "<string>"
}
],
"course_footer_background": "<string>",
"course_footer_color": "<string>",
"course_footer_use_menu": True,
"course_footer_menu_items": [
{
"type": "page",
"text": "<string>",
"page_id": "<string>",
"url": "<string>"
}
],
"lesson_show_all_lessons": True,
"show_lesson_search": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
memo: '<string>',
copyright: '<string>',
temporary_password: '<string>',
days_to_password_change: 182,
js_head: '<string>',
js_body_top: '<string>',
js_body: '<string>',
use_bookmark: true,
is_no_index: true,
show_link_to_community: true,
login_background: '<string>',
login_background_center: '<string>',
login_use_logo: true,
login_logo_url: '<string>',
login_footer_use_menu: true,
login_footer_menu_items: [{type: 'page', text: '<string>', page_id: '<string>', url: '<string>'}],
use_description: true,
description: '<string>',
use_news: true,
show_course_search: true,
show_course_category: true,
course_name_font_size: '<string>',
course_background: '<string>',
course_header_background: '<string>',
course_header_color: '<string>',
course_header_use_logo: true,
course_header_logo_url: '<string>',
course_header_use_menu: true,
course_header_menu_items: [{type: 'page', text: '<string>', page_id: '<string>', url: '<string>'}],
course_footer_background: '<string>',
course_footer_color: '<string>',
course_footer_use_menu: true,
course_footer_menu_items: [{type: 'page', text: '<string>', page_id: '<string>', url: '<string>'}],
lesson_show_all_lessons: true,
show_lesson_search: true
})
};
fetch('https://api.utage-system.com/v1/members/{site_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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'memo' => '<string>',
'copyright' => '<string>',
'temporary_password' => '<string>',
'days_to_password_change' => 182,
'js_head' => '<string>',
'js_body_top' => '<string>',
'js_body' => '<string>',
'use_bookmark' => true,
'is_no_index' => true,
'show_link_to_community' => true,
'login_background' => '<string>',
'login_background_center' => '<string>',
'login_use_logo' => true,
'login_logo_url' => '<string>',
'login_footer_use_menu' => true,
'login_footer_menu_items' => [
[
'type' => 'page',
'text' => '<string>',
'page_id' => '<string>',
'url' => '<string>'
]
],
'use_description' => true,
'description' => '<string>',
'use_news' => true,
'show_course_search' => true,
'show_course_category' => true,
'course_name_font_size' => '<string>',
'course_background' => '<string>',
'course_header_background' => '<string>',
'course_header_color' => '<string>',
'course_header_use_logo' => true,
'course_header_logo_url' => '<string>',
'course_header_use_menu' => true,
'course_header_menu_items' => [
[
'type' => 'page',
'text' => '<string>',
'page_id' => '<string>',
'url' => '<string>'
]
],
'course_footer_background' => '<string>',
'course_footer_color' => '<string>',
'course_footer_use_menu' => true,
'course_footer_menu_items' => [
[
'type' => 'page',
'text' => '<string>',
'page_id' => '<string>',
'url' => '<string>'
]
],
'lesson_show_all_lessons' => true,
'show_lesson_search' => true
]),
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://api.utage-system.com/v1/members/{site_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"memo\": \"<string>\",\n \"copyright\": \"<string>\",\n \"temporary_password\": \"<string>\",\n \"days_to_password_change\": 182,\n \"js_head\": \"<string>\",\n \"js_body_top\": \"<string>\",\n \"js_body\": \"<string>\",\n \"use_bookmark\": true,\n \"is_no_index\": true,\n \"show_link_to_community\": true,\n \"login_background\": \"<string>\",\n \"login_background_center\": \"<string>\",\n \"login_use_logo\": true,\n \"login_logo_url\": \"<string>\",\n \"login_footer_use_menu\": true,\n \"login_footer_menu_items\": [\n {\n \"type\": \"page\",\n \"text\": \"<string>\",\n \"page_id\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"use_description\": true,\n \"description\": \"<string>\",\n \"use_news\": true,\n \"show_course_search\": true,\n \"show_course_category\": true,\n \"course_name_font_size\": \"<string>\",\n \"course_background\": \"<string>\",\n \"course_header_background\": \"<string>\",\n \"course_header_color\": \"<string>\",\n \"course_header_use_logo\": true,\n \"course_header_logo_url\": \"<string>\",\n \"course_header_use_menu\": true,\n \"course_header_menu_items\": [\n {\n \"type\": \"page\",\n \"text\": \"<string>\",\n \"page_id\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"course_footer_background\": \"<string>\",\n \"course_footer_color\": \"<string>\",\n \"course_footer_use_menu\": true,\n \"course_footer_menu_items\": [\n {\n \"type\": \"page\",\n \"text\": \"<string>\",\n \"page_id\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"lesson_show_all_lessons\": true,\n \"show_lesson_search\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.utage-system.com/v1/members/{site_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"memo\": \"<string>\",\n \"copyright\": \"<string>\",\n \"temporary_password\": \"<string>\",\n \"days_to_password_change\": 182,\n \"js_head\": \"<string>\",\n \"js_body_top\": \"<string>\",\n \"js_body\": \"<string>\",\n \"use_bookmark\": true,\n \"is_no_index\": true,\n \"show_link_to_community\": true,\n \"login_background\": \"<string>\",\n \"login_background_center\": \"<string>\",\n \"login_use_logo\": true,\n \"login_logo_url\": \"<string>\",\n \"login_footer_use_menu\": true,\n \"login_footer_menu_items\": [\n {\n \"type\": \"page\",\n \"text\": \"<string>\",\n \"page_id\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"use_description\": true,\n \"description\": \"<string>\",\n \"use_news\": true,\n \"show_course_search\": true,\n \"show_course_category\": true,\n \"course_name_font_size\": \"<string>\",\n \"course_background\": \"<string>\",\n \"course_header_background\": \"<string>\",\n \"course_header_color\": \"<string>\",\n \"course_header_use_logo\": true,\n \"course_header_logo_url\": \"<string>\",\n \"course_header_use_menu\": true,\n \"course_header_menu_items\": [\n {\n \"type\": \"page\",\n \"text\": \"<string>\",\n \"page_id\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"course_footer_background\": \"<string>\",\n \"course_footer_color\": \"<string>\",\n \"course_footer_use_menu\": true,\n \"course_footer_menu_items\": [\n {\n \"type\": \"page\",\n \"text\": \"<string>\",\n \"page_id\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"lesson_show_all_lessons\": true,\n \"show_lesson_search\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/members/{site_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"memo\": \"<string>\",\n \"copyright\": \"<string>\",\n \"temporary_password\": \"<string>\",\n \"days_to_password_change\": 182,\n \"js_head\": \"<string>\",\n \"js_body_top\": \"<string>\",\n \"js_body\": \"<string>\",\n \"use_bookmark\": true,\n \"is_no_index\": true,\n \"show_link_to_community\": true,\n \"login_background\": \"<string>\",\n \"login_background_center\": \"<string>\",\n \"login_use_logo\": true,\n \"login_logo_url\": \"<string>\",\n \"login_footer_use_menu\": true,\n \"login_footer_menu_items\": [\n {\n \"type\": \"page\",\n \"text\": \"<string>\",\n \"page_id\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"use_description\": true,\n \"description\": \"<string>\",\n \"use_news\": true,\n \"show_course_search\": true,\n \"show_course_category\": true,\n \"course_name_font_size\": \"<string>\",\n \"course_background\": \"<string>\",\n \"course_header_background\": \"<string>\",\n \"course_header_color\": \"<string>\",\n \"course_header_use_logo\": true,\n \"course_header_logo_url\": \"<string>\",\n \"course_header_use_menu\": true,\n \"course_header_menu_items\": [\n {\n \"type\": \"page\",\n \"text\": \"<string>\",\n \"page_id\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"course_footer_background\": \"<string>\",\n \"course_footer_color\": \"<string>\",\n \"course_footer_use_menu\": true,\n \"course_footer_menu_items\": [\n {\n \"type\": \"page\",\n \"text\": \"<string>\",\n \"page_id\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"lesson_show_all_lessons\": true,\n \"show_lesson_search\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"memo": "<string>",
"copyright": "<string>",
"temporary_password": "<string>",
"days_to_password_change": 123,
"js_head": "<string>",
"js_body_top": "<string>",
"js_body": "<string>",
"login_type": "require",
"use_bookmark": true,
"is_no_index": true,
"show_link_to_community": true,
"login_background": "<string>",
"login_background_center": "<string>",
"login_use_logo": true,
"login_logo_url": "<string>",
"login_footer_use_menu": true,
"login_footer_menu_items": [
{
"type": "page",
"page_id": "<string>",
"url": "<string>",
"text": "<string>"
}
],
"use_description": true,
"description": "<string>",
"use_news": true,
"show_course_search": true,
"show_course_category": true,
"search_type": "all",
"course_display_type": "all",
"course_name_font_size": "<string>",
"course_background": "<string>",
"course_header_background": "<string>",
"course_header_color": "<string>",
"course_header_use_logo": true,
"course_header_logo_url": "<string>",
"course_header_use_menu": true,
"course_header_menu_items": [
{
"type": "page",
"page_id": "<string>",
"url": "<string>",
"text": "<string>"
}
],
"course_footer_background": "<string>",
"course_footer_color": "<string>",
"course_footer_use_menu": true,
"course_footer_menu_items": [
{
"type": "page",
"page_id": "<string>",
"url": "<string>",
"text": "<string>"
}
],
"lesson_complete_type": "stay",
"lesson_show_all_lessons": true,
"show_lesson_search": true,
"order": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"code": "bad_request",
"message": "show_link_to_communityはコミュニティ機能が有効な場合のみ変更できます"
}
}{
"error": {
"code": "unauthorized",
"message": "APIキーが無効です"
}
}{
"error": {
"code": "not_found",
"message": "ページが見つかりません"
}
}{
"error": {
"code": "validation_error",
"message": "入力内容に誤りがあります",
"details": {
"login_background": "login_backgroundは#RRGGBB形式で指定してください"
}
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "レート制限を超過しました"
}
}PATCH
https://api.utage-system.com/v1/members/{site_id}
Body
application/json
会員サイトの更新内容。指定したフィールドだけを更新します