NAV
cURL PHP

Introduction

C2inc マルチHPシステム 各種機能API

以下のデータについての操作を提供します。

APIの権限区分けについて

管理用と公開用に機能が分かれており、/manage/publicのエンドポイントで区分けされます。

管理用は認証ヘッダにユーザ識別子を含みますが、公開用は認証が不要な代わりにリクエスト時にユーザ識別子が必須です。

これらとは別に特権管理用に/adminを持つ機能もあります。

特権管理用エンドポイントはユーザ識別子を持たずに全データをまとめてリクエスト出来ますが、同一LAN上からのみリクエストが可能です。

Authentication

認証

To authorize, use this code:

curl -X POST "http://example.com/manage/auth/token" \
    -H "Content-Type: application/json" \
    -d '{
        "uid": "5000",
        "pw": "your_password"
    }'
$ch = curl_init();

$data = [
    'uid' => 5000,
    'pw' => 'your_password'
];

$headers = [
    'Accept: application/json'
];

$options = [
    CURLOPT_URL => 'api_endpoint_here',
    CURLOPT_POST => true,
    CURLOPT_TIMEOUT => 60,
    CURLOPT_RETURNTRANFER => true,
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_POSTFIELDS => http_build_query($data)
];

curl_setopt_array($ch, $options);

$response = curl_exec($ch);
curl_close($ch);

The above command returns JSON structured like this:

{
    "access_token": "<jwt>",
    "refresh_token": "<refresh_token>"
}

Make sure to replace <jwt> with your API key.

初回認証としてID/PWを用いてTokenを取得します。

Tokenの有効期限は15分です。

以降は取得されるaccess_tokenを用いてリクエストを行います。

refresh_tokenはJWTではなくランダムトークンです。

認証用APIサーバでのみ検証可能で再発行時にのみ利用できます。

HTTP Request

POST
/manage/auth/token

Request Header

Authorization: Bearer <jwt>

Token再発行

curl -X POST "http://example.com/manage/auth/token/refresh" \
    -H "Authorization: Bearer <refresh_token>"
curl_init();

The above command returns JSON structured like this:

{
    "access_token": "<jwt>",
    "refresh_token": "<refresh_token>"
}

Make sure to replace <jwt> with your API key.

refresh_tokenを用いてトークンを再発行します。

HTTP Request

POST
/manage/auth/token/refresh

Request Header

Authorization: Bearer <refresh_token>

Token検証

curl -X HEAD "http://example.com/manage/auth/token/valid" \
    -H "Authorization: Bearer <jwt>"
curl_init();

The above command returns no body

access_tokenの検証を行います。

検証結果はHTTPレスポンスステータスコードで返されます。

HTTP Request

HEAD
/manage/auth/token/valid

Request Header

Authorization: Beaere <jwt>

HP Common

基本設定として、HPタイトルや説明文に関する設定などを行います

これらはSEOを目的としたMeta上のもので実際のHPに表示されません

HP表示上の設定は後述HP Topにて行います

Properties

Attribute Type Description  
uid integer ユーザ識別子 read only
title string HPタイトル
description string HP説明文
copyright string コピーライト

基本設定取得

curl "http://example.com/manage/hp/common" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "title": "Site Title",
    "description": "The description",
    "copyright": "C2 Co., Ltd."
}

基本設定を取得します

HTTP Request

GET
/manage/hp/common

Query Parameters

Parameter Type Default Description

基本設定登録

curl -X PUT "http://example.com/manage/hp/common" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "title": "changed"
    }'

The above command returns JSON structured like this:

{
    "title": "changed",
    "description": "The description",
    "copyright": "C2 Co., Ltd."
}

基本設定を変更します

HTTP Request

PUT
/manage/hp/common

Query Parameters

Parameter Type Default Description
title string HPタイトル
description string HP説明文
copyright string コピーライト

HP Top

HPデザインのTOPに関わる設定を行います

Properties

TOP画像

Attribute Type Description  
uid integer ユーザ識別子 read only
alt string alt属性
status integer 表示ステータス

紹介文

Attribute Type Description  
uid integer ユーザ識別子 read only
body string 説明文
status integer 表示ステータス
align string 表示位置

ロゴ画像

Attribute Type Description  
uid integer ユーザ識別子 read only
alt string alt属性
status integer 表示ステータス
align string 表示位置

タイトル

Attribute Type Description  
uid integer ユーザ識別子 read only
title string タイトル
status integer 表示ステータス
align string 表示位置
font_single string 英数字フォント
font_multi string 日本語フォント
size integer サイズ(px)

TOP画像設定取得

curl "http://example.com/manage/hp/top-image" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "alt": "top image",
    "status": 1
}

設定中のHPのTOP画像に関する設定を取得します

HTTP Request

GET
/manage/hp/top-image

Query Parameters

Parameter Type Default Description  

TOP画像設定登録

curl -X PUT "http://example.com/manage/hp/top-image" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "alt": "image"
    }'

The above command returns JSON structured like this:

{
    "alt": "image",
    "status": 1
}

HPのTOP画像に関する設定を更新します

HTTP Request

PUT
/manage/hp/top-image

Query Parameters

Parameter Type Default Description  
alt string alt属性
status inteher 1 表示ステータス Required

紹介文取得

curl "http://example.com/manage/hp/description" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "body": "紹介文",
    "status": 1,
    "align": "left"
}

設定中のHP紹介文を取得します

HTTP Request

GET
/manage/hp/description

Query Parameters

Parameter Type Default Description  

紹介文登録

curl -X PUT "http://example.com/manage/hp/decription" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "status": 0
    }'

The above command returns JSON structured like this:

{
    "body": "紹介文",
    "status": 0,
    "align": "left"
}

HP紹介文を登録します

HTTP Request

PUT
/manage/hp/description

Query Parameters

Parameter Type Default Description  
body string 紹介文
status integer 1 表示ステータス Required
align string left 表示位置 Required

ロゴ画像設定取得

curl "http://example.com/manage/hp/logo-image" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "alt": "logo",
    "status": 1,
    "align": "center"
}

HPのロゴ画像の設定を取得します

HTTP Request

GET
/manage/hp/logo-image

Query Parameters

Parameter Type Default Description  

ロゴ画像設定登録

curl -X PUT "http://example.com/manage/hp/logo-image" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "status": 2
    }'

The above command returns JSON structured like this:

{
    "alt": "logo",
    "status": 2,
    "align": "center"
}

HPのロゴ画像の設定を更新します

HTTP Request

PUT
/manage/hp/logo-image

Query Parameters

Parameter Type Default Description  
alt string alt属性
status integer 1 表示ステータス Required
align string left 表示位置 Required

タイトル取得

curl "http://example.com/manage/hp/title" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "title": "サイトタイトル",
    "status": 1,
    "align": "left",
    "font_single": null,
    "font_multi": null,
    "size": null
}

表示用のHPタイトルを取得します

HTTP Request

GET
/manage/hp/title

Query Parameters

Parameter Type Default Description  

タイトル登録

curl -X PUT "http://example.com/manage/hp/title" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "title": "サイトタイトル",
        "status": 1,
        "align": "center"
    }'

The above command returns JSON structured like this:

{
    "title": "サイトタイトル",
    "status": 1,
    "align": "center",
    "font_single": null,
    "font_multi": null,
    "size": null
}

表示用のHPタイトルを登録します

HTTP Request

PUT
/manage/hp/title

Query Parameters

Parameter Type Default Description  
title string HPタイトル
status integer 1 表示ステータス Required
align string left 表示位置 Required

HP Design

HPデザイン周りの設定を行います

Properties

背景設定

Attribute Type Description  
uid integer ユーザ識別子 read only
status integer 表示ステータス
misc string 表示設定

status

色設定

Attribute Type Description  
uid integer ユーザ識別子 read only
chars string 文字色コード
link string リンク色コード
main string メイン色コード
sub stgin サブ色コード
footer string フッター文字色コード
copyright string コピーライト文字色コード

フォント設定

Attribute Type Description  
uid integer ユーザ識別子 read only
single string シングルバイトフォント
multi string マルチバイトフォント
size integer フォントサイズ

カスタマイズcss

Attribute Type Description  
uid integer ユーザ識別子 read only
body string css
status integer 利用ステータス

背景設定取得

curl "http://example.com/manage/hp/background" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "status": 1,
    "misc": {
        ...
    }
}

背景設定を取得します

HTTP Request

GET
/manage/hp/background

Query Parameters

Parameter Type Default Description  

背景設定登録

curl -X PUT "http://example.com/manage/hp/background" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "misc": {
            ...
        }
    }'

The above command returns JSON structured like this:

{
    "status": 1,
    "misc": {
        ...
    }
}

背景設定を登録します

HTTP Request

PUT
/manage/hp/background

Query Parameters

Parameter Type Default Description  
status integer 1 表示ステータス Required
misc string {} 表示設定

色設定取得

curl "http://example.com/manage/hp/color" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "chars": "#000000",
    "link": "#0000ff",
    "main": "#ffffff",
    "sub": "#999999",
    "footer": "#000000",
    "copyright": "#000000"
}

色の設定を取得します

HTTP Request

GET
/manage/hp/color

Query Parameters

Parameter Type Default Description  

色設定登録

curl -X PUT "http://example.com/manage/hp/color" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "chars": "#ff0000"
    }'

The above command returns JSON structured like this:

{
    "chars": "#ff0000",
    "link": "#0000ff",
    "main": "#ffffff",
    "sub": "#999999",
    "footer": "#000000",
    "copyright": "#000000"
}

HPの色設定を更新します

HTTP Request

PUT
/manage/hp/color

Query Parameters

Parameter Type Default Description
chars string 文字色コード
link string リンク色コード
main string メイン色コード
sub string サブ色コード
footer string フッター文字色コード
copyright string コピーライト文字色コード

フォント設定取得

curl "http://example.com/manage/hp/font" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "single": "Comic Sans MS",
    "multi": "HGS行書体",
    "size": 14
}

フォント設定を取得します

HTTP Request

GET
/manage/hp/font

Query Parameters

Parameter Type Default Description  

フォント設定登録

curl -X PUT "http://example.com/manage/hp/font" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "size": 16
    }'

The above command returns JSON structured like this:

{
    "single": "Comic Sans MS",
    "multi": "HGS行書体",
    "size": 16
}

フォント設定を更新します

HTTP Request

PUT
/manage/hp/font

Query Parameters

Parameter Type Default Description
single string シングルバイトフォント
multi string マルチバイトフォント
size integer 14 フォントサイズ

カスタマイズcss取得

curl "http://example.com/manage/hp/custom-css" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "body": "div { width: 100%; }",
    "status": 1
}

カスタマイズcssを取得します

HTTP Request

GET
/manage/hp/custom-css

Query Parameters

Parameter Type Default Description  

カスタマイズcss登録

curl "http://example.com/manage/hp/custom-css" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "body": "div { width: 90%; }"
    }'

The above command returns JSON structured like this:

{
    "body": "div { width: 90%; }",
    "status": 1
}

カスタマイズcssを登録します

HTTP Request

PUT
/manage/hp/custom-css

Query Parameters

Parameter Type Default Description  
body string css
status integer 1 利用ステータス Required

HP Themes

HPテーマに関する設定を行います

Properties

テーマ

Attribute Type Description  
id integer テーマID read only
name string テーマ名(表示用) read only
category string テーマカテゴリ read only
slug string テーマ名(内部用) read only

サイドバー

Attribute Type Description  
id integer サイドバー設定ID read only
theme_id integer テーマID read only
name string サイドバー名(表示用) read only
slug string サイドバー名(内部用) read only

Attribute Type Description  
id integer 色設定ID read only
theme_id integer テーマID read only
name string 色名(表示用) read only
slug string 色名(内部用) read only

設定

Attribute Type Description  
uid integer ユーザ識別子 read only
theme integer テーマID
sidebar integer サイドバーID
color integer 色ID

テーマ一覧取得

curl "http://example.com/manage/hp/themes" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

[
    {
        "id": 0,
        "name": "テーマ無し",
        "slug": "blank",
        "category": "uncategorized"
    },
    {
        "id": 1,
        "name": "シンプル1",
        "slug": "simple1",
        "category": "simple"
    },
    ...
]

利用可能なテーマの一覧を取得します

HTTP Request

GET
/manage/hp/themes

Query Parameters

Parameter Type Default Description
page integer 1 ページ番号
per_page integer 20 1ページあたりの件数
order string asc 順列. asc or desc
orderby string id 順列対象: id, slug, category
category string 取得対象カテゴリ
include integer 取得対象ID
exclude integer 取得対象外ID

テーマ利用サイドバー/色取得

curl "http://example.com/manage/hp/theme/<id>" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "color": [
        {
            "id": 3,
            "name": "赤",
            "slug": "red"
        },
        ...
    ],
    "sidebar": [
        {
            "id": 32,
            "name": "左",
            "slug": "left"
        },
        ...
    ]
}

該当テーマで利用可能なサイドバーの設定と色の一覧を取得します

HTTP Request

GET
/manage/hp/theme/<id>

Query Parameters

Parameter Type Default Description

テーマ設定取得

curl "http://example.com/manage/hp/theme" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "theme": 2,
    "color": 32,
    "sidebar": 2
}

現在設定されているテーマの情報を取得します

HTTP Request

GET
/manage/hp/theme

Query Parameters

Parameter Type Default Description

テーマ設定登録

curl -X PUT "http://example.com/manage/hp/theme" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "theme": 2,
        "color": 31,
        "sidebar": 1
    }'

The above command returns JSON structured like this:

{
    "theme": 2,
    "color": 31,
    "sidebar": 1
}

自身のHPにテーマを適用します

HTTP Request

PUT
/manage/hp/theme

Query Parameters

Parameter Type Default Description  
theme integer テーマID Required
color integer 色ID Required
sidebar integer サイドバーID Required

HP Header

HPのヘッダーメニューに関する設定を行います

Properties

Attribute Type Description  
id integer アイテムID read only
uid integer ユーザ識別子 read only
order_id integer 順序ID read only
label string リンク名
page_id integer リンク先ページID
regist_ts string アイテム作成日時 read only
update_ts string アイテム更新日時 read only

ヘッダーアイテム一覧取得

curl "http://example.com/manage/hp/header/items" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

[
    {
        "id": 1,
        "order_id": 0,
        "label": "TOP",
        "page_id": 3,
        "regist_ts": "2025-01-01 10:00:00",
        "update_ts": "2025-01-01 10:00:00"
    },
    {
        "id": 3,
        "order_id": 1,
        "label": "Access",
        "page_id": 22,
        "regist_ts": "2025-01-01 10:00:00",
        "update_ts": "2025-01-01 10:00:00"
    },
    {
        "id": 2,
        "order_id": 2,
        "label": "About",
        "page_id": 145,
        "regist_ts": "2025-01-01 10:00:00",
        "update_ts": "2025-01-01 10:00:00"
    }
]

ヘッダーアイテムの一覧を取得します

HTTP Request

GET
/manage/hp/header/items

Query Prameters

Parameter Type Default Description
order string asc 並び順. asc, desc
orderby string order_id 並び基準. id, order_id, page_id

ヘッダーアイテム取得

curl "http://example.com/manage/hp/header/items/:id" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "id": 1,
    "order_id": 0,
    "label": "TOP",
    "page_id": 3,
    "regist_ts": "2025-01-01 10:00:00",
    "update_ts": "2025-01-01 10:00:00"
}

ヘッダーアイテムを1件取得します

HTTP Request

GET
/manage/hp/header/items/:id

Query Prameters

Parameter Type Default Description

ヘッダーアイテム作成

curl -X POST "http://example.com/manage/hp/header/items" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "label": "リンク名",
        "page_id": 19
    }'

Then above command returns JSON structured like this:

{
    "id": 14,
    "order_id": 4,
    "label": "リンク名",
    "page_id": 19,
    "regist_ts": "2025-01-01 10:00:00",
    "update_ts": "2025-01-01 10:00:00"
}

ヘッダーアイテムを作成します

HTTP Request

POST
/manage/hp/header/items

Query Prameters

Parameter Type Default Description  
label string リンク名 Required
page_id integer ページID Required

ヘッダーアイテム更新

curl -X PUT "http://example.com/manage/hp/header/items" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "label": "リンク名2",
    }'

Then above command returns JSON structured like this:

{
    "id": 14,
    "order_id": 4,
    "label": "リンク名2",
    "page_id": 19,
    "regist_ts": "2025-01-01 10:00:00",
    "update_ts": "2025-01-01 10:00:00"
}

ヘッダーアイテムを作成します

HTTP Request

PUT
/manage/hp/header/items/:id

Query Prameters

Parameter Type Default Description
label string リンク名
page_id integer ページID

ヘッダーアイテム削除

curl -X DELETE "http://example.com/manage/hp/header/items/:id" \
    -H "Authorization: Bearer <jwt>"

Then above command returns JSON structured like this:

{
    "id": 14
}

ヘッダーアイテムを作成します

HTTP Request

DELETE
/manage/hp/header/items/:id

Query Prameters

Parameter Type Default Description

ヘッダーアイテム並び替え

curl -X PUT "http://example.com/manage/hp/header/items/order" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "order": [2, 5, 7]
    }'

The above command returns JSON structured like this:

{
    "order": [2, 5, 7, 4, 9, 3]
}

ヘッダーアイテムを並び替えます

並び替え配列に含まれないアイテムがある場合は既存順序を保持したまま最後尾に追加されます

HTTP Request

PUT
/manage/hp/header/items/order

Query Parameter

Parameter Type Default Description  
order array [] アイテムIDの並び順配列 Required

引数が空で指定された場合はそのままの順序でorder_idが再振り分けされます

HP Sidebar

HPのサイドバーに関する設定を行います

Properties

Attribute Type Description  
id integer アイテムID read only
uid integer ユーザ識別子 read only
type_id integer アイテムタイプID read only
order_id integer 順序ID read only
name string アイテム名
data string アイテムデータ
misc string アイテム設定
regist_ts string アイテム作成日時 read only
update_ts string アイテム更新日時 read only

サイドバーアイテム一覧取得

curl "http://example.com/manage/hp/sidebar/items" \
    -H "Authorization: Bearer <jwt>"
curl_init();

The above command returns JSON structured like this:

[
    {
        "id": 2,
        "type_id": 1,
        "order_id": 0,
        "name": "Profile",
        "data": {
            ...
        },
        "misc": {
            ...
        },
        "regist_ts": "2025-01-01 10:00:00",
        "update_ts": "2025-01-01 10:00:00"
    },
    {
        "id": 1,
        "type_id": 5,
        "order_id": 1,
        "name": "QR",
        "data": {
            ...
        },
        "misc": {
            ...
        },
        "regist_ts": "2025-01-01 10:00:00",
        "update_ts": "2025-01-01 10:00:00"
    }
]

サイドバーに登録されているアイテムの一覧を取得します

HTTP Request

GET
/manage/hp/sidebar/items

Query Parameters

Parameter Type Default Description
order string asc 並び順. asc, desc
orderby string order_id 並び基準. id, order_id, type_id
type integer アイテムタイプID

サイドバーアイテム取得

curl "http://example.com/hp/sidebar/items/:id" \
    -H "Authorization: Bearer <jwt>"
curl_init();

The abpve command returns JSON structured like this:

{
    "id": 1,
    "type_id": 5,
    "order_id": 1,
    "name": "QR",
    "data": {
        ...
    },
    "misc": {
        ...
    },
    "regist_ts": "2025-01-01 10:00:00",
    "update_ts": "2025-01-01 10:00:00"
}

サイドバーアイテムを1件取得

HTTP Request

GET
/manage/hp/sidebar/items/:id

Query Parameters

Parameter Type Default Description

サイドバーアイテム作成

curl -X POST "http://example.com/manage/hp/sidebar/items" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "type_id": 5,
        "order_id": 1,
        "name": "QR2",
        "data": {
            ...
        },
        "misc": {
            ...
        }
    }'

The above command returns JSON structured like this:

{
    "id": 22,
    "type_id": 5,
    "order_id": 1,
    "name": "QR2",
    "data": {
        ...
    },
    "misc": {
        ...
    },
    "regist_ts": "2026-01-01 10:00:00",
    "update_ts": "2026-01-01 10:00:00"
}

サイドバーアイテムを作成します

作成したアイテムは最後尾に追加されます

HTTP Request

POST
/manage/hp/sidebar/items
Parameter Type Default Description  
type_id integer アイテムタイプID Required
name string アイテム名 - 未指定ならアイテム種別名
data string {} アイテムデータ
misc string {} アイテム設定

サイドバーアイテム更新

curl -X PUT "http://example.com/manage/hp/sidebar/items/:id" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "name": "changed"
    }'

The above command returns JSON structured like this:

{
    "id": 22,
    "type_id": 5,
    "order_id": 1,
    "name": "changed",
    "data": {
        ...
    },
    "misc": {
        ...
    },
    "regist_ts": "2026-01-01 10:00:00",
    "update_ts": "2026-02-01 10:00:00"
}

サイドバーアイテムを更新します

HTTP Request

PUT
/manage/hp/sidebar/items/:id
Parameter Type Default Description
name string アイテム名 - 未指定ならアイテム種別名
data string {} アイテムデータ
misc string {} アイテム設定

サイドバーアイテム削除

curl -X DELETE "http://example.com/manage/hp/sidebar/items/:id" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "id": 22
}

サイドバーアイテムを削除します

削除時、次回並び替えが実行されるまでorder_idに抜けが発生しますが仕様上問題ありません

HTTP Request

DELETE
/manage/hp/sidebar/items/:id

Query Parameter

Parameter Type Default Description

サイドバーアイテム並び替え

curl -X PUT "http://example.com/manage/hp/sidebar/items/order" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "order": [2, 5, 7]
    }'

The above command returns JSON structured like this:

{
    "order": [2, 5, 7, 4, 9, 3]
}

サイドバーアイテムを並び替えます

並び替え配列に含まれないアイテムがある場合は既存順序を保持したまま最後尾に追加されます

HTTP Request

PUT
/manage/hp/sidebar/items/order

Query Parameter

Parameter Type Default Description  
order array [] アイテムIDの並び順配列 Required

引数が空で指定された場合はそのままの順序でorder_idが再振り分けされます

HP Footer

HPのフッターメニューに関する設定を行います

Attribute Type Description  
id integer アイテムID read only
uid integer ユーザ識別子 read only
type_id integer アイテムタイプID read only
group_id integer グループID read only
order_id integer 順序ID read only
name string アイテム名
data string アイテムデータ
misc string アイテム設定
regist_ts string アイテム作成日時 read only
update_ts string アイテム更新日時 read only
curl "http://example.com/manage/hp/footer/items" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

[
    [
        {
            "id": 1,
            "type_id": 1,
            "group_id": 0,
            "order_id": 0,
            "name": "test",
            "data": {
                ...
            },
            "misc": {
                ...
            },
            "regist_ts": ...,
            "update_ts": ...
        },
        {
            ...
        }
    ],
    [
        {
            "id": 1,
            "type_id": 1,
            "group_id": 1,
            "order_id": 0,
            "name": "foo",
            "data": {
                ...
            },
            "misc": {
                ...
            },
            "regist_ts": ...,
            "update_ts": ...
        },
        {
            ...
        }
    ]
]

フッターアイテムの一覧を取得します

GET
/manage/hp/footer/items
Parameter Type Default Description
order string asc 並び順. asc, desc
orderby string order_id 並び基準. id, order_id, type_id
group string グループID
type integer アイテムタイプID
curl "http://example.com/manage/hp/footer/items/:id" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "id": 1,
    "type_id": 1,
    "group_id": 0,
    "order_id": 0,
    "name": "test",
    "data": {
        ...
    },
    "misc": {
        ...
    },
    "regist_ts": ...,
    "update_ts": ...
}

指定IDのフッターアイテムを取得します

GET
/manage/hp/footer/items/:id
Parameter Type Default Description
curl -X POST "http://example.com/manage/hp/footer/items" \
    -H "Authorization: Bearer <jwt>"
    -H "Content-Type: application/json" \
    -d '{
        "type_id": 1,
        "group_id": 2,
        "name": "link",
        "data": {
            ...
        },
        "misc": {
            ...
        }
    }'

The above command returns JSON structured like this:

{
    "id": 1,
    "type_id": 1,
    "group_id": 0,
    "order_id": 0,
    "name": "test",
    "data": {
        ...
    },
    "misc": {
        ...
    },
    "regist_ts": ...,
    "update_ts": ...
}

フッターアイテムを作成します

POST
/manage/hp/footer/items
Parameter Type Default Description  
type_id integer アイテムタイプID Required
group_id integer グループID Required
name string アイテム名
data string {} アイテムデータ
misc string {} アイテム設定
curl -X PUT "http://example.com/manage/hp/footer/items/:id" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "name": "changed"
    }'

The above command returns JSON structured like this:

{
    "id": 1,
    "type_id": 1,
    "group_id": 0,
    "order_id": 0,
    "name": "changed",
    "data": {
        ...
    },
    "misc": {
        ...
    },
    "regist_ts": ...,
    "update_ts": ...
}

フッターアイテムを更新します

更新での並び替えはできません

PUT
/manage/hp/footer/items/:id
Parameter Type Default Description
name string アイテム名
data string アイテムデータ
misc string アイテム設定
curl -X DELETE "http://example.com/manage/hp/footer/items/:id" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "id": 1
}

フッターアイテムを削除します

DELETE
/manage/hp/footer/items/:id
Parameter Type Default Description
curl -X PUT "http://example.com/manage/hp/footer/items/order" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "order": [
            [5, 6, 3],
            [2, 7, 8],
            [1, 9]
        ]
    }'

The above command returns JSON structured like this:

{
    "order": [
        [5, 6, 3, 4],
        [2, 7, 8],
        [1, 9]
    ]
}

フッターアイテムを並び替えます

未指定のアイテムが存在する場合は同一グループにて既存順序を保持したまま最後尾に追加されます

PUT
/manage/hp/footer/items/order
Parameter Type Default Description  
order array [] 並び順配列 Required

引数が空で指定された場合はそのままの順序でorder_idが再振り分けされます

Item

アイテム管理API

HPアイテムの取得、更新等を行います。

Public用にRestAPIをラップしたGraphQLを提供します。

Properties

1アイテム1レコードで保存

parent_id(親アイテム)にはページアイテム(type_id = 1)のみ指定可能です。

親アイテムが存在しない場合(カテゴリページ)はparent_id0を指定します。

Attribute Type Description  
id integer アイテムID read only
uid integer ユーザ識別子 - uid read only
type_id integer アイテムタイプID read only
parent_id integer 親アイテムID
order_id integer 順序ID
name string アイテム名
data string アイテムデータ
misc string アイテム設定
status integer 表示ステータス
regist_ts string アイテム作成日時 read only
update_ts string アイテム更新日時 read only

アイテム一覧取得

curl "http://example.com/manage/page/items?parent=1" \
    -H "Authorization: Bearer <jwt>"
curl_init();

The above command returns JSON structured like this:

[
    {
        "id": 3,
        "type_id": 2,
        "parent_id": 1,
        "order_id": 0,
        "name": "画像",
        "data": {
            ...
        },
        "misc": {
            ...
        },
        "status": 1,
        "regist_ts": "2025-01-01 10:00:00",
        "update_ts": "2025-01-01 10:00:00"
    },
    {
        "id": 6,
        "type_id": 3,
        "parent_id": 1,
        "order_id": 1,
        "name": "HTML",
        "data": {
            ...
        },
        "misc": {
            ...
        },
        "status": 1,
        "regist_ts": "2025-01-01 10:00:00",
        "update_ts": "2025-01-01 10:00:00"
    }
]

アイテムの一覧を取得します。

HTTP Request

GET
/manage/page/items

Query Prameters

Parameter Type Default Description
page integer 1 ページ番号
per_page integer 0 1ページでの取得アイテム数, 0で無限
order string asc 並び順. asc, desc
orderby string order_id 並びの基準カラム. 指定可能リスト: id, order_id, parent_id, type_id
parent integer 親アイテムID - 指定で子アイテム一覧を取得
type integer アイテムタイプID - 指定アイテムタイプのみを取得
include array [] 取得対象とするidのリストを指定
exclude array [] 取得対象外とするidのリストを指定

取得時、order_idが指定ページ以下でのユニークとなるためparent_idを指定することを推奨します。

アイテム取得

curl "http://example.com/manage/page/items/:id" \
    -H "Authorization: Bearer <jwt>"
curl_init();

The above command returns JSON structured like this:

{
    "id": 6,
    "type_id": 3,
    "parent_id": 1,
    "order_id": 1,
    "name": "HTML",
    "data": {
        ...
    },
    "misc": {
        ...
    },
    "status": 1,
    "regist_ts": "2025-01-01 10:00:00",
    "update_ts": "2025-01-01 10:00:00"
}

1アイテムのデータを取得します

HTTP Request

GET
/manage/page/items/:id

Query Parameters

Parameter Type Default Description

アイテム作成

curl -X POST "http://example.com/manage/page/items" \
    -H "Authorization: Bearer <jwt>"
    -H "Content-Type: application/json" \
    -d '{
        "name": "HTML",
        "type_id": 3,
        "parent_id": 1,
        "data": {
            ...
        },
        "misc": {
            ...
        },
        "status": 1
    }'
curl_init();

The above command returns JSON structured like this:

{
    "id": 21,
    "type_id": 3,
    "parent_id": 1,
    "order_id": 2,
    "name": "HTML",
    "data": {
        ...
    },
    "misc": {
        ...
    },
    "status": 1,
    "regist_ts": "2025-01-01 10:00:00",
    "update_ts": "2025-01-01 10:00:00"
}

アイテムを作成します

作成したアイテムは親アイテム以下の最後尾に配置されます。(order_idをページ内最大値に対してインクリメント)

HTTP Request

POST
/manage/page/items

Query Parameter

Parameter Type Default Description  
type_id integer アイテムタイプID Required
parent_id integer アイテム親ID Required
name string 未指定時アイテム種別名が自動設定 アイテム名
data string {} アイテムデータ
misc string {} アイテムmisc
status integer 1 公開ステータス

アイテム更新

curl -X PUT "http://example.com/manage/page/items/:id" \
    -H "Authorization: Bearer <jwt>" \
    -d '{
        "name": "test"
    }'

The above command returns JSON structured like this:

{
    "id": 21,
    "type_id": 3,
    "parent_id": 1,
    "order_id": 2,
    "name": "test",
    "data": {
        ...
    },
    "misc": {
        ...
    },
    "status": 1,
    "regist_ts": "2025-01-01 10:00:00",
    "update_ts": "2025-02-01 10:00:00"
}

アイテムを更新します

HTTP Request

PUT
/manage/page/items/:id

Query Parameter

Parameter Type Default Description
parent_id integer アイテム親ID
name string 未指定時アイテム種別名が自動設定 アイテム名
data string {} アイテムデータ
misc string {} アイテムmisc
status integer 1 公開ステータス

アイテム削除

curl -X DELETE "http://example.com/manage/page/items/:id" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "id": 2
}

アイテムを削除します

削除時、抜けたorder_idは飛んだままになります

またページアイテム(type_id = 1)を削除した場合、該当アイテムを親としているアイテムを再帰的に削除します

HTTP Request

DELETE
/manage/page/items/:id

Query Parameter

Parameter Type Default Description

アイテム並び替え

curl -X PUT "http://example.com/manage/page/items/:id/order" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "order": [3, 6, 21]
    }'

The above command returns JSON structured like this:

{
    "order": [3, 6, 21, 2, 16, 33]
}

アイテムを並び替えます

並び替えは親アイテム単位で指定され、子のみが並び替えられます

並び替えリクエスト時に未指定のアイテムが子に含まれる場合は最後尾に既存順列で配置されます

HTTP Request

PUT
/manage/page/items/:id/order

Query Parameter

Parameter Type Default Description  
order array [] 並び順アイテムID配列 Requred

Item Board

掲示板アイテムの記事を操作します

:id: アイテムID

:id2: 記事ID

エンドポイントにてアイテムIDに対してサブカテゴリでboardを指定します

該当アイテムが掲示板アイテムでない場合は409エラーを返します

Properties

Attribute Type Description  
id integer 記事ID read only
uid integer ユーザ識別 read only
item_id integer アイテムID read only
parent_id integer 親記事ID read only
title string 記事タイトル
body string 記事本文
image string 記事添付画像URL
name string 投稿者名
ip string 投稿者IPアドレス
ua string 投稿者User-Agent
mail string 投稿者メールアドレス
link string 投稿者HPリンク
publish_ts string 公開日
regist_ts string 記事作成日 read only
update_ts string 記事更新日 read only

記事一覧取得

curl "http://example.com/manage/page/items/:id/board/posts?per_page=2" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

[
    {
        "id": 1,
        "item_id": 12345,
        "parent_id": null,
        "title": "記事タイトル",
        "body": "記事本文",
        "image": null,
        "name": "投稿者A",
        "ip": "1.1.1.1",
        "ua": "TwitterBot",
        "mail": "mail@example.com",
        "link": "http://google.com",
        "publish_ts": "2025-01-01 10:00:00"
    },
    {
        ...
    }
]

掲示板の記事一覧を取得します

HTTP Request

GET
/manage/page/items/:id/board/posts

Query Parameters

Parameter Type Default Description
context string full 取得範囲. full, summary(省略)
page integer 1 ページ番号
per_page integer 20 取得件数
order string asc 順序. asc, desc
orderby string id 基準列. id, publish_ts
include array 取得対象id配列
exclude array 取得対象外id配列
parent_id integer 親記事id
published_before string 指定日以前に公開された記事を取得
published_after string 指定日以降に公開された記事を取得

記事取得

curl "http://example.com/manage/page/items/:id/board/posts/:id2" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "id": 1,
    "item_id": 12345,
    "parent_id": null,
    "title": "記事タイトル",
    "body": "記事本文",
    "image": null,
    "name": "投稿者A",
    "ip": "1.1.1.1",
    "ua": "TwitterBot",
    "mail": "mail@example.com",
    "link": "http://google.com",
    "publish_ts": "2025-01-01 10:00:00"
}

掲示板の記事を取得します

HTTP Request

GET
/manage/page/items/:id/board/posts/:id2

Query Parameters

Parameter Type Default Description

記事作成

curl -X POST "http://example.com/manage/page/items/:id/board/posts" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "title": "記事タイトル",  
        "body": "記事本文"
    }'

The above command returns JSON structured like this:

{
    "id": 2,
    "item_id": 12345,
    "parent_id": null,
    "title": "記事タイトル",
    "body": "記事本文",
    "image": null,
    "name": null,
    "ip": null,
    "ua": null,
    "mail": null,
    "link": null,
    "publish_ts": "2025-01-01 10:00:00"
}

記事を新規で作成します

公開日は未指定の場合作成日と同じになります

HTTP Request

POST
/manage/page/items/:id/board/posts

Query Parameters

Parameter Type Default Description  
parent_id integer 親記事ID
title string 記事タイトル Required
body string 記事本文 Required
image string 添付画像URL
name string 投稿者名
ip string 投稿者IP
ua string 投稿者User-Agent
mail string 投稿者メールアドレス
link string 投稿者HP等URL
publish_ts string now 記事公開日時

記事更新

curl -X PUT "http://example.com/manage/page/items/:id/board/posts/:id2" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "title": "変更"
    }'

The above command returns JSON structured like this:

{
    "id": 2,
    "item_id": 12345,
    "parent_id": null,
    "title": "変更",
    "body": "記事本文",
    "image": null,
    "name": null,
    "ip": null,
    "ua": null,
    "mail": null,
    "link": null,
    "publish_ts": "2025-01-01 10:00:00"
}

記事を更新します

HTTP Request

PUT
/manage/page/items/:id/board/posts/:id2

Query Parameters

Parameter Type Default Description
title string 記事タイトル
body string 記事本文
image string 添付画像URL
name string 投稿者名
ip string 投稿者IP
ua string 投稿者User-Agent
mail string 投稿者メールアドレス
link string 投稿者HP等URL
publish_ts string now 記事公開日時

記事削除

curl -X DELETE "http://example.com/manage/page/items/:id/board/posts/:id2" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "id": 3
}

記事を1件削除します

HTTP Request

DELETE
/manage/page/items/:id/board/posts/:id2

Query Parameters

Parameter Type Default Description

記事一括削除

curl -X DELETE "http://example.com/manage/page/items/:id/board/posts" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "item_id": 12345
}

記事を1件削除します

HTTP Request

DELETE
/manage/page/items/:id/board/posts

Query Parameters

Parameter Type Default Description

記事一覧取得 - 公開用

curl "http://example.com/public/page/items/:id/board/posts?per_page=2"

The above command returns JSON structured like this:

[
    {
        "id": 1,
        "item_id": 12345,
        "parent_id": null,
        "title": "記事タイトル",
        "body": "記事本文",
        "image": null,
        "name": "投稿者A",
        "ip": "1.1.1.1",
        "ua": "TwitterBot",
        "mail": "mail@example.com",
        "link": "http://google.com",
        "publish_ts": "2025-01-01 10:00:00"
    },
    {
        ...
    }
]

掲示板の記事一覧を取得します

公開用として認証不要で取得可能です

HTTP Request

GET
/public/page/items/:id/board/posts

Query Parameters

Parameter Type Default Description
context string full 取得範囲. full, summary(省略)
page integer 1 ページ番号
per_page integer 20 取得件数
order string asc 順序. asc, desc
orderby string id 基準列. id, publish_ts
include array 取得対象id配列
exclude array 取得対象外id配列
parent_id integer 親記事id
published_before string 指定日以前に公開された記事を取得
published_after string 指定日以降に公開された記事を取得

記事作成 - 公開用

curl -X POST "http://example.com/public/page/items/:id/board/posts" \
    -H "X-Timestamp: <now>" \
    -H "Content-Type: application/json" \
    -d '{
        "title": "記事タイトル",  
        "body": "記事本文"
    }'

The above command returns JSON structured like this:

{
    "id": 2,
    "item_id": 12345,
    "parent_id": null,
    "title": "記事タイトル",
    "body": "記事本文",
    "image": null,
    "name": null,
    "ip": null,
    "ua": null,
    "mail": null,
    "link": null,
    "publish_ts": "2025-01-01 10:00:00"
}

記事を新規で作成します

公開日は未指定の場合作成日と同じになります

公開用として認証不要でリクエスト可能ですが不正対策としてX-Timestampヘッダの付与と内部での判定を通過する必要があります

HTTP Request

POST
/public/page/items/:id/board/posts

Query Parameters

Parameter Type Default Description
parent_id integer 親記事ID
title string 記事タイトル
body string 記事本文
image string 添付画像URL
name string 投稿者名
ip string 投稿者IP
ua string 投稿者User-Agent
mail string 投稿者メールアドレス
link string 投稿者HP等URL
publish_ts string now 記事公開日時

Item Info

お知らせ板アイテムのお知らせ操作を行います

:id: アイテムID

:id2: お知らせ記事ID

アイテム操作のエンドポイントに対して/infoのサブカテゴリにて該当お知らせ板アイテムの記事を操作します

該当のアイテムがお知らせ板アイテムでない場合は409エラーを返します

Properties

Attribute Type Description  
id integer お知らせID read only
uid integer ユーザ識別子 read only
item_id integer アイテムID read only
title string 記事タイトル
body string 記事本文
image string 画像URL
publish_ts string 公開日時
regist_ts string 作成日時 read only
update_ts strgin 更新日時 read only

お知らせ一覧取得

curl "http://example.com/manage/page/items/:id/info/posts" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

[
    {
        "id": 1,
        "item_id": 12345,
        "title": "今日のお知らせ",
        "body": "お知らせ本文",
        "image": "https://img.example.com/test.png",
        "publish_ts": "2025-01-01 10:00:00"
    },
    {
        "id": 2,
        "item_id": 12345,
        "title": "明日のお知らせ",
        "body": "お知らせ本文",
        "image": "https://img.example.com/test.png",
        "publish_ts": "2025-01-02 10:00:00"
    }
]

お知らせの一覧を取得します

HTTP Request

GET
/manage/page/items/:id/info/posts

Query Parameters

Parameter Type Default Description  
page integer 1 ページ番号
per_page integer 20 取得件数
status integer 公開ステータス
order string asc 順序. asc, desc Required
orderby string id 基準列. id, publish_ts, item_id Required
published_before string 指定日以前に公開された記事を取得
published_after string 指定日以降に公開された記事を取得

お知らせ取得

curl "http://example.com/manage/hp/items/:id/info/posts/:id2" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "id": 2,
    "item_id": 12345,
    "title": "明日のお知らせ",
    "body": "お知らせ本文",
    "image": "https://img.example.com/test.png",
    "publish_ts": "2025-01-02 10:00:00"
}

お知らせを1件取得します

HTTP Request

GET
/manage/page/items/:id/info/posts/:id2

Query Parameters

Parameter Type Default Description  

お知らせ作成

curl -X POST "http://example.com/manage/page/items/:id/info/posts" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "title": "お知らせ",
        "body": "本文",
        "publish_ts": "2024-01-01 10:00:00"
    }'

The above command returns JSON structured like this:

{
    "id": 3,
    "item_id": 12345,
    "title": "お知らせ",
    "body": "本文",
    "image": null,
    "publish_ts": "2024-01-01 10:00:00"
}

お知らせ記事を新規作成します

HTTP Request

POST
/manage/page/items/:id/info/posts

Query Parameters

Parameter Type Default Description  
title string お知らせタイトル
body string お知らせ本文
image string 画像URL
status integer 1 公開ステータス Required
publish_ts string 公開日時 Required

お知らせ編集

curl -X PUT "http://example.com/manage/page/items/:id/info/posts/:id2" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "title": "changed"
    }'

The above command returns JSON structured like this:

{
    "id": 3,
    "item_id": 12345,
    "title": "changed",
    "body": "本文",
    "image": null,
    "publish_ts": "2024-01-01 10:00:00"
}

お知らせを編集します

HTTP Request

PUT
/manage/page/items/:id/info/posts/:id2

Query Parameters

Parameter Type Default Description  
title string お知らせタイトル
body string お知らせ本文
image string 画像URL
status integer 1 公開ステータス Required
publish_ts string 公開日時 Required

お知らせ削除

curl -X DELETE "http://example.com/manage/page/items/:id/info/posts/:id2" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "id": 3
}

お知らせ記事を1件削除します

HTTP Request

DELETE
/manage/page/items/:id/info/posts/:id2

Query Parameters

Parameter Type Default Description  

お知らせ一括削除

curl -X DELETE "http://example.com/manage/page/items/:id/info/posts" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "item_id": 12345
}

お知らせ記事をアイテム単位で一括削除します

HTTP Request

DELETE
/manage/page/items/:id/info/posts

Query Parameters

Parameter Type Default Description  

お知らせ一覧取得 - 公開用

curl "http://example.com/public/page/items/:id/info/posts?uid=51100"

The above command returns JSON structured like this:

[
    {
        "id": 1,
        "item_id": 12345,
        "title": "今日のお知らせ",
        "body": "お知らせ本文",
        "image": "https://img.example.com/test.png",
        "publish_ts": "2025-01-01 10:00:00"
    },
    {
        "id": 2,
        "item_id": 12345,
        "title": "明日のお知らせ",
        "body": "お知らせ本文",
        "image": "https://img.example.com/test.png",
        "publish_ts": "2025-01-02 10:00:00"
    }
]

お知らせ板アイテムに対して記事一覧を取得します

公開用エンドポイントでは公開ステータスが「公開」となっているもののみ取得、引数としてユーザ識別子が必須になります

HTTP Request

GET
/public/page/items/:id/info/posts

Query Parameters

Parameter Type Default Description  
uid integer ユーザ識別子 Required
page integer 1 ページ番号
per_page integer 20 取得件数
order string asc 順序. asc, desc Required
orderby string id 基準列. id, publish_ts, item_id Required
published_before string 指定日以前に公開された記事を取得
published_after string 指定日以降に公開された記事を取得

Item Schedule

予定アイテムの予定の管理を行います

:id: アイテムID

:id2: 予定ID

アイテム操作のエンドポイントに対して/scheduleのサブカテゴリにて該当予定アイテムの記事を操作します

該当のアイテムが予定アイテムでない場合は409エラーを返します

Properties

Attribute Type Description  
id integer 予定ID read only
uid integer ユーザ識別子 read only
item_id integer アイテムID read only
subject string 予定名
body string 予定詳細
date string 予定日
start string 予定開始時刻
end string 予定終了時刻
status integer 公開ステータス

予定一覧取得

curl "http://example.com/manage/page/items/:id/schedule/posts" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

[
    {
        "id": 1,
        "item_id": 12345,
        "subject": "Test",
        "body": "test-test",
        "date": "2025-01-01",
        "start": "10:00",
        "end": "12:00",
        "status": 1
    },
    {
        "id":2 ,
        "item_id": 12345,
        "subject": "Test",
        "body": "test-test",
        "date": "2025-01-01",
        "start": "11:00",
        "end": "12:00",
        "status": 1
    }
]

予定の一覧を取得します

HTTP Request

GET
/manage/page/items/:id/schedule/posts

Query Parameters

Parameter Type Default Description  
page integer 1 ページ番号
per_page integer 20 取得件数
status integer 公開ステータス
order string asc 順序. asc, desc
orderby string id 基準列. id, date, start, end, order
before string 指定日以前の予定を取得
after string 指定日移行の予定を取得

予定取得

curl "http://example.com/manage/page/items/:id/schedule/posts/:id2" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "id":2 ,
    "item_id": 12345,
    "subject": "Test",
    "body": "test-test",
    "date": "2025-01-01",
    "start": "11:00",
    "end": "12:00",
    "status": 1
}

予定を1件取得します

HTTP Request

GET
/manage/page/items/:id/schedule/posts/:id2

Query Parameters

Parameter Type Default Description  

予定作成

curl -X POST "http://example.com/manage/page/items/:id/schedule/posts" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "subject": "件名",
        "body": "本文",
        "date": "2025-01-02",
        "start": null,
        "end": null,
        "status": 1
    }'

The above command returns JSON structured like this:

{
    "id": 3,
    "item_id": 12345,
    "subject": "件名",
    "body": "本文",
    "date": "2025-01-02",
    "start": null,
    "end": null,
    "status": 1
}

新規の予定を作成します

HTTP Request

POST
/manage/page/items/:id/schedule/posts

Query Parameters

Parameter Type Default Description  
subject string 予定件名 Required
body string 予定本文 Required
date string 予定日 Required
start string 予定開始時刻
end string 予定終了時刻
status integer 1 公開ステータス

予定更新

curl -X PUT "http://example.com/manage/page/items/:id/schedule/posts/:id2" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "date": "2025-02-01"
    }'

The above command returns JSON structured like this:

{
    "id": 3,
    "item_id": 12345,
    "subject": "件名",
    "body": "本文",
    "date": "2025-02-01",
    "start": null,
    "end": null,
    "status": 1
}

予定を更新します

HTTP Request

PUT
/manage/page/items/:id/schedule/posts/:id2

Query Parameters

Parameter Type Default Description
subject string 予定件名
body string 予定本文
date string 予定日
start string 予定開始時刻
end string 予定終了時刻
status integer 1 公開ステータス

予定削除

curl -X DELETE "http://example.com/manage/page/items/:id/schedule/posts/:id2" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "id": 3
}

予定を削除します

HTTP Request

DELETE
/manage/page/items/:id/schedule/posts/:id2

Query Parameters

Parameter Type Default Description  

予定一括削除

curl -X DELETE "http://example.com/manage/page/items/:id/schedule/posts" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "item_id": 12345
}

予定を削除します

HTTP Request

DELETE
/manage/page/items/:id/schedule/posts

Query Parameters

Parameter Type Default Description  

予定一覧取得 - 公開用

curl "http://example.com/public/page/items/:id/schedule/posts?uid=5000"

The above command returns JSON structured like this:

[
    {
        "id": 1,
        "item_id": 12345,
        "subject": "Test",
        "body": "test-test",
        "date": "2025-01-01",
        "start": "10:00",
        "end": "12:00",
        "status": 1
    },
    {
        "id":2 ,
        "item_id": 12345,
        "subject": "Test",
        "body": "test-test",
        "date": "2025-01-01",
        "start": "11:00",
        "end": "12:00",
        "status": 1
    }
]

予定の一覧を取得します

公開用として認証無しで利用可能ですが、ユーザ識別子の指定が必須で公開ステータスが「公開」のもののみ取得されます

HTTP Request

GET
/public/page/items/:id/schedule/posts

Query Parameters

Parameter Type Default Description  
uid integer ユーザ識別子 Required
page integer 1 ページ番号
per_page integer 20 取得件数
order string asc 順序. asc, desc
orderby string id 基準列. id, date, start, end, order
before string 指定日以前の予定を取得
after string 指定日移行の予定を取得

Item Enquete

アンケート機能の操作を行います

:id: アイテムID

:id2: 選択肢ID

アイテム操作のエンドポイントに対して/enqueteのサブカテゴリにて該当アンケートアイテムの選択肢を操作します

該当のアイテムがアンケートアイテムでない場合は409エラーを返します

Properties

Attribute Type Description  
id integer 選択肢ID read only
uid integer ユーザ識別子 read only
item_id integer アイテムID read only
label string 項目名
order integer 並び順 read only
count integer 得票数

選択肢一覧取得

curl "http://example.com/manage/page/items/:id/enquete/posts" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

[
    {
        "id": 4,
        "item_id": 12345,
        "label": "選択肢2",
        "order": 0,
        "count": 120
    },
    {
        "id": 1,
        "item_id": 12345,
        "label": "選択肢1",
        "order": 1,
        "count": 10
    }
]

アンケートの選択肢一覧を取得します

HTTP Request

GET
/manage/page/items/:id/enquete/posts

Query Parameters

Parameter Type Default Description
order string asc 順序. asc, desc
orderby string order 基準列. order, id, count
over integer 得票数が指定以上のみ取得
under integer 得票数が指定以下のみ取得

選択肢取得

curl "http://example.com/manage/page/items/:id/enquete/posts/:id2" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "id": 1,
    "item_id": 12345,
    "label": "選択肢1",
    "order": 1,
    "count": 10
}

アンケートの選択肢を取得します

HTTP Request

GET
/manage/page/items/:id/enquete/posts/:id2

Query Parameters

Parameter Type Default Description

選択肢作成

curl -X POST "http://example.com/manage/page/items/:id/enquete/posts" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "label": "選択肢5"
    }'

The above command returns JSON structured like this:

{
    "id": 10,
    "item_id": 12345,
    "label": "選択肢5",
    "order": 11,
    "count": 0
}

選択肢を作成します

orderは最後尾、countは0で作成されます(countはリクエスト時に初期値の指定も可能)

HTTP Request

POST
/manage/page/items/:id/enquete/posts

Query Parameters

Parameter Type Default Description  
label string 選択肢項目名 Required
count integer 0 得票数

選択肢更新

curl -X PUT "http://example.com/manage/page/items/:id/enquete/posts/:id2" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "count": 100
    }'

The above command returns JSON structured like this:

{
    "id": 10,
    "item_id": 12345,
    "label": "選択肢5",
    "order": 11,
    "count": 100
}

HTTP Request

PUT
/manage/page/items/:id/enquete/posts

Query Parameters

Parameter Type Default Description
label string 選択肢項目名
count integer 得票数

選択肢削除

curl -X DELETE "http://example.com/manage/page/items/:id/enquete/posts/:id2" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "id": 10
}

選択肢を削除します

HTTP Request

DELETE
/manage/page/items/:id/enquete/posts/:id2

Query Parameters

Parameter Type Default Description

選択肢一括削除

curl -X DELETE "http://example.com/manage/page/items/:id/enquete/posts" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "item_id": 12345
}

選択肢をアイテム単位で一括削除します

HTTP Request

DELETE
/manage/page/items/:id/enquete/posts

Query Parameters

Parameter Type Default Description

選択肢並べ替え

curl -X PUT "http://example.com/manage/page/items/:id/enquete/posts/order" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "order": [1, 2, 6, 3]
    }'

The above command returns JSON structured like this:

{
    "order": [1, 2, 6, 3, 4, 5]
}

選択肢を並び替えます

未指定IDがある場合はそのまま最後尾に置かれます

HTTP Request

PUT
/manage/page/items/:id/enquete/posts/order

Query Parameters

Parameter Type Default Description
order array [] 並び順ID配列

選択肢一覧取得 - 公開用

curl "http://example.com/public/page/items/:id/enquete/posts"

The above command returns JSON structured like this:

[
    {
        "id": 4,
        "item_id": 12345,
        "label": "選択肢2",
        "order": 0,
        "count": 120
    },
    {
        "id": 1,
        "item_id": 12345,
        "label": "選択肢1",
        "order": 1,
        "count": 10
    }
]

アンケートの選択肢一覧を取得します

公開用エンドポイントとして認証不要で取得できます

HTTP Request

GET
/public/page/items/:id/enquete/posts

Query Parameters

Parameter Type Default Description
order string asc 順序. asc, desc
orderby string order 基準列. order, id, count
over integer 得票数が指定以上のみ取得
under integer 得票数が指定以下のみ取得

選択回数加算 - 公開用

curl -X PUT "http://example.com/manage/page/items/:id/enquete/posts/:id2/vote" \
    -H "X-Timestamp: <now>"

The above command returns JSON structured like this:

{
    "id": 1,
    "count": 11
}

指定した選択肢に投票します

ヘッダーにX-Timestampをセットしてリクエスト時のエポック秒を送信します

サーバ上で一定の条件を持って有効なリクエストと判断された場合のみ投票は有効となります

HTTP Request

PUT
/public/page/items/:id/enquete/posts/:id2/vote

Query Parameters

Parameter Type Default Description

Item Chirashi

チラシビューアアイテムのチラシを管理

チラシ画像自体は別途ファイル管理APIでUP等の操作を行う

:id: アイテムID

:id2: チラシID

Properties

Attribute Type Description  
id integer チラシID read only
uid integer ユーザ識別子 read only
item_id integer アイテムID read only
title string チラシタイトル
body string チラシ詳細
publish_start string 公開開始日時
publish_end string 公開終了日時
cnt integer 掲載画像数 read only
order integer 順序ID read only

チラシ一覧取得

curl "http://example.com/manage/page/items/:id/chirashi/posts" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

[
    {
        "id": 1,
        "item_id": 12345,
        "title": "広告",
        "body": "セール広告",
        "publish_start": null,
        "publish_end": null,
        "cnt": 1,
        "order": 0
    },
    {
        ...
    }
]

作成されたチラシの一覧を取得します

HTTP Request

GET
/manage/page/items/:id/chirashi/posts

Query Parameters

Parameter Type Default Description
page integer 1 ページ番号
per_page integer 20 取得件数
order string asc 順序. asc, desc
orderby string order 基準列. order, id

チラシ取得

curl "http://example.cpm/manage/page/items/:id/chirashi/posts/:id2" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "id": 1,
    "item_id": 12345,
    "title": "広告",
    "body": "セール広告",
    "publish_start": null,
    "publish_end": null,
    "cnt": 1,
    "order": 0
}

作成されたチラシを取得します

HTTP Request

GET
/manage/page/items/:id/chirashi/posts/:id2

Query Parameters

Parameter Type Default Description

チラシ作成

curl -X POST "http://example.com/manage/page/items/:id/chirashi/posts" \
    -H "AUthorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "title": "タイトル",
        "body": "本文"
    }'

The above command returns JSON structured like this:

{
    "id": 2,
    "item_id": 12345,
    "title": "タイトル",
    "body": "本分",
    "publish_start": null,
    "publish_end": null,
    "cnt": 0,
    "order": 1
}

チラシを作成します

HTTP Request

POST
/manage/page/items/:id/chirashi/posts

Query Parameters

Parameter Type Default Description  
title string チラシタイトル Required
body string チラシ説明文
publish_start string チラシ公開開始日時
publish_end string チラシ公開終了日時

チラシ更新

curl -X PUT "http://example.com/manage/page/items/:id/chirashi/posts/:id2" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "title": "変更"
    }'

The above command returns JSON structured like this:

{
    "id": 2,
    "item_id": 12345,
    "title": "変更",
    "body": "本分",
    "publish_start": null,
    "publish_end": null,
    "cnt": 0,
    "order": 1
}

チラシを編集します

HTTP Request

PUT
/manage/page/items/:id/chirashi/posts/:id2

Query Parameters

Parameter Type Default Description
title string チラシタイトル
body string チラシ説明文
publish_start string チラシ公開開始日時
publish_end string チラシ公開終了日時

チラシ削除

curl -X DELETE "http://example.com/manage/page/items/:id/chirashi/posts/:id" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "id": 2
}

チラシを削除します

HTTP Request

DELETE
/manage/page/items/:id/chirashi/posts/:id2

Query Parameters

Parameter Type Default Description

チラシ一括削除

curl -X DELETE "http://example.com/manage/page/items/:id/chirashi/posts" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "item_id": 12345
}

チラシをアイテム単位で一括削除します

HTTP Request

DELETE
/manage/page/items/:id/chirashi/posts

Query Parameters

Parameter Type Default Description

チラシ一覧取得 - 公開用

curl "http://example.com/public/page/items/:id/chirashi/posts?uid=5000"

The above command returns JSON structured like this:

[
    {
        "id": 1,
        "item_id": 12345,
        "title": "広告",
        "body": "セール広告",
        "publish_start": null,
        "publish_end": null,
        "cnt": 1,
        "order": 0
    },
    {
        ...
    }
]

チラシの一覧を取得します

公開用APIとして認証不要で取得可能ですが、管理用と異なりpublish_*を見て公開状態のチラシしか取得されません

HTTP Request

GET
/public/page/items/:id/chirashi/posts

Query Parameters

Parameter Type Default Description  
uid integer ユーザ識別子 Required
page integer 1 ページ番号
per_page integer 20 取得件数
order string asc 順序. asc, desc
orderby string order 基準列. order, id

Blog Posts

ブログ機能に対して、

がリクエストできます。

追加機能として以下の特別なエンドポイントを提供します。

Properties

Attribute Type Description  
id integer 記事ID read only
uid integer ユーザ識別子 - 特権管理のみ返答 read only
title string 記事タイトル
slug string URLスラッグ
description string 記事説明文
date string 公開日時
category integer カテゴリID
content string 記事本文
status string ステータス, private, published, draft, scheduled
sub int サブブログID
regist_ts string 記事作成日時 read only
update_ts string 記事更新日時 read only

一覧取得の場合、レスポンスヘッダにてX-API-Totalに総取得件数を含めます。

記事一覧取得 - 管理用

curl "http://example.com/manage/blog/posts?context=summary" \
    -H "Authorization: Bearer <jwt>"
curl_init();

The above command returns JSON structured like this:

[
    {
        "id": 1,
        "title": "ブログタイトル",
        "slug": "test",
        "description": "ブログ説明文",
        "date": "2025-01-01 10:00:00",
        "category": 2,
        "content": "ブログ前方です。",
        "status": "published",
        "sub": null,
        "ulid": "ADD357C905F347C986E27352ED",
        "regist_ts": "2025-01-01 10:00:00",
        "update_ts": "2025-01-01 10:00:00"
    },
    {
        "id": 2,
        "title": "ブログタイトル2",
        "slug": "test",
        "description": "ブログ2説明文",
        "date": "2025-01-10 10:00:00",
        "category": 2,
        "content": "<p>HTMLを含んだ本文で",
        "status": "published",
        "sub": null,
        "ulid": "D0AC1E31EA874555A638EC9F65",
        "regist_ts": "2025-01-01 10:10:34",
        "update_ts": "2025-01-01 10:10:34"
    }
]

ブログ記事一覧を取得します。

管理用としてToken内部に会員識別子が含まれているため公開用と異なり指定は不要です。

HTTP Request

GET
/manage/blog/posts

Query Parameters

Parameter Type Default Description
context string summary 取得時の本文取得範囲を制限。summaryの場合は本文の前方40文字のみを取得します。
page integer 1 ページ番号
per_page integer 20 1ページでの取得記事数, 最大100
status string published 取得記事ステータスを指定. private, published, draft, scheduled
order string asc 並び順. asc, desc
orderby string id 並びの基準カラムを指定. 指定可能リスト: id, date, title, slug, category, ulid, status
include array [] 取得対象とするidのリストを指定
exclude array [] 取得対象外とするidのリストを指定
category string 取得対象とするカテゴリSlugを指定
before string 指定日以前に作成された記事を取得
after string 指定日以降に作成された記事を取得
published_before string 指定日以前に公開された記事を取得
published_after string 指定日以降に公開された記事を取得
filter string 指定文字列が「タイトル」または「本文」または「Slug」に含まれている記事を取得

記事取得

curl http://example.com/manage/blog/posts/:id \
    -H "Authorization: Bearer <jwt>"
curl_init();

The above command returns JSON structured like this:

{
    "id": 1,
    "title": "ブログタイトル",
    "slug": "test",
    "description": "ブログ説明文",
    "date": "2025-01-01 10:00:00",
    "category": 2,
    "content": "ブログ前方です。\nブログ中部です。\nブログ下部です。",
    "status": "published",
    "sub": null,
    "ulid": "ADD357C905F347C986E27352ED",
    "regist_ts": "2025-01-01 10:00:00",
    "update_ts": "2025-01-01 10:00:00"
}

ブログ記事を1件取得します。

HTTP Request

GET
/manage/blog/posts/:id

Query Parameters

Parameter Type Default Description

新規投稿

curl -X POST http://example.com/manage/blog/posts \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "title": "記事タイトル",
        "slug": "test",
        "description": "記事説明文",
        "date": "2025-01-01 10:00:00",
        "category": 1,
        "content": "ブログ本文です",
        "status": "private",
        "sub": null
    }'
curl_init();

The above command returns JSON structured like this:

{
    "id": 1,
    "title": "記事タイトル",
    "slug": "test",
    "description": "記事説明文",
    "date": "2025-01-01 10:00:00",
    "category": 1,
    "content": "ブログ本文です",
    "status": "private",
    "sub": null,
    "ulid": "ADD357C905F347C986E27352ED",
    "regist_ts": "2025-01-01 09:00:00",
    "update_ts": "2025-01-01 09:00:00"
}

ブログ記事を新規作成します。

HTTP Request

POST
/manage/blog/posts

Query Parameters

Parameter Type Default Description  
title string 記事タイトル Required
slug string 記事ID URLスラッグ
description string 記事説明文(meta description)
date string now 公開日
category integer 1 カテゴリID
content string 記事本文 Required
status string published 公開ステータス
sub int null サブブログID

投稿更新

curl -X PUT http://example.com/manage/blog/posts/:id \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "title": "記事タイトル変更後"
    }'
curl_init();

The above command returns JSON structured like this:

{
    "id": 1,
    "title": "記事タイトル変更後",
    "slug": "test",
    "description": "記事説明文",
    "date": "2025-01-01 10:00:00",
    "category": 1,
    "content": "ブログ本文です",
    "status": "private",
    "sub": null,
    "ulid": "ADD357C905F347C986E27352ED",
    "regist_ts": "2025-01-01 09:00:00",
    "update_ts": "2025-02-01 11:23:11"
}

ブログ記事を1件更新します。

HTTP Request

PUT
/manage/blog/posts/:id

Query Parameters

Parameter Type Description
title string 記事タイトル
slug string URLスラッグ
description string 記事説明文(meta description)
date string 公開日
category integer カテゴリID
content string 記事本文
status string 公開ステータス
sub int サブブログID

記事削除

curl -X DELETE http://example.com/manage/blog/posts/:id \
    -H "Authorization: Bearer <jwt>"
curl_init();

The above command returns JSON structured like this:

{
    "id": 1
}

ブログ記事を1件削除します。

HTTP Request

DELETE
/manage/blog/posts/:id

Query Parameters

Parameter Type Default Description

記事一覧取得 - 公開用

curl "http://example.com/public/blog/posts?context=full"
curl_init();

The above command returns JSON structured like this:

[
    {
        "id": 1,
        "title": "ブログタイトル",
        "slug": "test",
        "description": "ブログ説明文",
        "date": "2025-01-01 10:00:00",
        "category": 2,
        "content": "ブログ前方です。\nブログ中部です。\nブログ下部です。",
        "status": "published",
        "sub": null,
        "ulid": "ADD357C905F347C986E27352ED",
        "regist_ts": "2025-01-01 10:00:00",
        "update_ts": "2025-01-01 10:00:00"
    },
    {
        "id": 2,
        "title": "ブログタイトル2",
        "slug": "test",
        "description": "ブログ2説明文",
        "date": "2025-01-10 10:00:00",
        "category": 2,
        "content": "<p>HTMLを含んだ本文です。</p>\nテキストエリア上での改行はデータ上は`\n`で保存され、SSGで利用される場合に<br>に変換されます。",
        "status": "published",
        "sub": null,
        "ulid": "D0AC1E31EA874555A638EC9F65",
        "regist_ts": "2025-01-01 10:10:34",
        "update_ts": "2025-01-01 10:10:34"
    }
]

記事一覧を取得します。

公開用APIとして取得できるスキーマに制限があり、取得時にユーザ識別子が必要です。

管理用との具体的な差は

の2点

HTTP Request

GET
/public/blog/posts

Query Parameters

Parameter Type Default Description  
uid integer ユーザ識別子 - uid Required
context string summary 取得時の本文取得範囲を制限。summaryの場合は本文の前方40文字のみを取得します。
page integer 1 ページ番号
per_page integer 20 1ページでの取得記事数, 最大100
order string asc 並び順. asc, desc
orderby string id 並びの基準カラムを指定. 指定可能リスト: id, date, title, slug, category, ulid, status
include array [] 取得対象とするidのリストを指定
exclude array [] 取得対象外とするidのリストを指定
category string 取得対象とするカテゴリSlugを指定
before string 指定日以前に作成された記事を取得
after string 指定日以降に作成された記事を取得
published_before string 指定日以前に公開された記事を取得
published_after string 指定日以降に公開された記事を取得
filter string 指定文字列が「タイトル」または「本文」または「Slug」に含まれている記事を取得

画像取得

curl "http://example.com/public/blog/images?per_page=3"
curl_init();

The above command returns JSON structured like this:

[
    {
        "id": 1,
        "ulid": "ADD357C905F347C986E27352ED",
        "img": "https://img.example.com/5000/2025/01/01/sample.png"
    },
    {
        "id": 1,
        "ulid": "ADD357C905F347C986E27352ED",
        "img": "https://img.example.com/5000/2025/01/01/test.jpeg"
    },
    {
        "id": 2,
        "ulid": "D0AC1E31EA874555A638EC9F65",
        "img": "https://img.example.com/5000/2025/01/01/sample.png"
    }
]

ブログ記事本文から使用されている画像と記事IDを取得します。

記事内で複数の画像が使用されている場合1つの画像につき1件のデータとして含まれてる枚数分n件としてカウントします。

HTTP Request

GET
/public/blog/images

Query Parameters

Parameter Type Default Description  
uid integer 会員識別子 - uid Required
page integer 1 ページ番号
per_page integer 20 1ページでの取得記事数, 最大100
order string asc 並び順. asc, desc
orderby string id 並びの基準カラムを指定. 指定可能リスト: id, date, title, slug, category, ulid, status
include array [] 取得対象とするidのリストを指定
exclude array [] 取得対象外とするidのリストを指定
category string 取得対象とするカテゴリSlugを指定
before string 指定日以前に作成された記事を取得
after string 指定日以降に作成された記事を取得
published_before string 指定日以前に公開された記事を取得
published_after string 指定日以降に公開された記事を取得

記事一覧取得 - 特権管理用

curl "http://example.com/admin/blog/posts?context=summary&published_after=2025-01-01"
curl_init();

The above command returns JSON structured like this:

[
    {
        "id": 1,
        "uid": 3000,
        "title": "ブログタイトル",
        "slug": "test",
        "description": "ブログ説明文",
        "date": "2025-01-01 10:00:00",
        "category": 2,
        "content": "ブログ前方です。",
        "status": "published",
        "sub": null,
        "ulid": "ADD357C905F347C986E27352ED",
        "regist_ts": "2025-01-01 10:00:00",
        "update_ts": "2025-01-01 10:00:00"
    },
    {
        "id": 1,
        "uid": 5000,
        "title": "ブログタイトル2",
        "slug": "test",
        "description": "ブログ2説明文",
        "date": "2025-01-10 10:00:00",
        "category": 2,
        "content": "<p>HTMLを含んだ本文で",
        "status": "published",
        "sub": null,
        "ulid": "D0AC1E31EA874555A638EC9F65",
        "regist_ts": "2025-01-01 10:10:34",
        "update_ts": "2025-01-01 10:10:34"
    }
]

ブログ記事一覧を取得します。

特権管理用としてuidに関わらずすべての記事を対象に検索可能です。

HTTP Request

GET
/admin/blog/posts

Query Parameters

Parameter Type Default Description
context string summary 取得時の本文取得範囲を制限。summaryの場合は本文の前方40文字のみを取得します。
uid integer ユーザ識別子
page integer 1 ページ番号
per_page integer 20 1ページでの取得記事数, 最大100
status string published 取得記事ステータスを指定. private, published, draft, scheduled
order string asc 並び順. asc, desc
orderby string id 並びの基準カラムを指定. 指定可能リスト: id, date, title, slug, category, ulid, status
include array [] 取得対象とするidのリストを指定
exclude array [] 取得対象外とするidのリストを指定
category string 取得対象とするカテゴリSlugを指定
before string 指定日以前に作成された記事を取得
after string 指定日以降に作成された記事を取得
published_before string 指定日以前に公開された記事を取得
published_after string 指定日以降に公開された記事を取得
filter string 指定文字列が「タイトル」または「本文」または「Slug」に含まれている記事を取得

Blog Category

ブログ機能に対して

がリクエストできます。

Properties

Attribute Type Description  
id integer カテゴリID read only
slug text slug - 半角英数(すべて小文字)または-
name text カテゴリ名
disp_order integer 並び順
status integer ステータス(0/1: 無効/有効)
regist_ts string カテゴリ作成日時 read only
update_ts string カテゴリ更新日時 read only
count integer 記事件数 read only

記事件数は管理用、公開用で記事の取得範囲が異なるためそれぞれ異なる値が返答されます。

カテゴリ一覧取得 - 管理用

curl "http://example.com/manage/blog/categories?orderby=id" \
    -H "Authorization: Bearer <jwt>"
curl_init();

The above command returns JSON structured like this:

[
    {
        "id": 0,
        "slug": "uncategorized",
        "name": "Uncategorized",
        "disp_order": 0,
        "status": 1,
        "regist_ts": "2025-01-01 10:00:00",
        "update_ts": "2025-01-01 10:00:00",
        "count": 2
    },
    {
        "id": 1,
        "slug": "news",
        "name": "news",
        "disp_order": 1,
        "status": 1,
        "regist_ts": "2025-01-10 11:00:00",
        "update_ts": "2025-01-10 11:00:00",
        "count": 33
    },
    {
        "id": 2,
        "slug": "tmp",
        "name": "tmp",
        "disp_order": 2,
        "status": 0,
        "regist_ts": "2025-01-10 11:00:00",
        "update_ts": "2025-01-11 11:00:00",
        "count": 0
    }
]

カテゴリ一覧を取得します。

HTTP Request

GET
/manage/blog/categories

Query Parameters

Parameter Type Default Description
status integer 1 取得ステータス
order string asc 並び順. asc, desc
orderby string disp_order 並びの基準カラムを指定. 指定可能リスト: id, name, disp_order
include array [] 取得対象とするidのリストを指定
exclude array [] 取得対象外とするidのリストを指定
filter string 指定文字列から「カテゴリ名」で検索

カテゴリ取得

curl "http://example.com/manage/blog/categories/:id" \
    -H "Authorization: Bearer <jwt>"
curl_init();

The above command returns JSON structured like this:

{
    "id": 0,
    "slug": "uncategorized",
    "name": "Uncategorized",
    "status": 1,
    "regist_ts": "2025-01-01 10:00:00",
    "update_ts": "2025-01-01 10:00:00",
    "count": 2
}

カテゴリを取得します。

HTTP Request

GET
/manage/blog/categories/:id

Query Parameters

Parameter Type Default Description

カテゴリ作成

curl -X POST "http://example.com/manage/blog/categories" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "name": "tmp2"
    }'
curl_init();

The above command returns JSON structured like this:

{
    "id": 2,
    "slug": "tmp",
    "name": "tmp2",
    "status": 1,
    "regist_ts": "2025-01-11 11:00:00",
    "update_ts": "2025-01-11 11:00:00"
}

カテゴリを作成します。

HTTP Request

POST
/manage/blog/categories

Query Parameters

Parameter Type Default Description  
name string カテゴリ名 Required
slug string カテゴリSlug Required
status integer 1 公開ステータス

カテゴリ更新

curl -X PUT "http://example.com/manage/blog/categories/:id" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "name": "test"
    }'
curl_init();

The above command returns JSON structured like this:

{
    "id": 2,
    "slug": "test",
    "name": "test",
    "status": 1,
    "regist_ts": "2025-01-11 11:00:00",
    "update_ts": "2025-01-11 11:00:00"
}

カテゴリを作成します。

HTTP Request

PUT
/manage/blog/categories/:id

Query Parameters

Parameter Type Default Description
name string カテゴリ名
slug string カテゴリSlug
status int ステータス

カテゴリ削除

curl -X DELETE "http://example.com/manage/blog/categories/:id" \
    -H "Authorization: Bearer <jwt>"
curl_init();

The above command returns JSON structured like this:

{
    "id": 3
}

カテゴリを削除します。

HTTP Request

DELETE
/manage/blog/categories/:id

Query Parameters

Parameter Type Default Description

カテゴリ並び替え

curl -X PUT "http://example.com/manage/blog/categories/order" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "order": [1, 2, 0, 4, 3]
    }'
curl_init();

The above command returns JSON structured like this:

{
    "order": [1, 2, 0, 4, 3, 5, 6, 7, 8, 9]
}

カテゴリを並び替えます。

並び替え配列に含まれていないカテゴリは変更前の順序で指定IDの後に順列で設定されます。

HTTP Request

PUT
/manage/blog/categories/order

Query Parameters

Parameter Type Default Description
order array [] 並び替え配列

カテゴリ一覧取得 - 公開用

curl "http://example.com/public/blog/categories" \
    -d "order=desc"
curl_init();

The above command returns JSON structured like this:

[
    {
        "id": 1,
        "slug": "news",
        "name": "news",
        "count": 33
    },
    {
        "id": 0,
        "slug": "uncategorized",
        "name": "Uncategorized",
        "count": 2
    }
]

カテゴリ一覧を取得します。

公開用として公開ステータスが無効となっているカテゴリは取得されず、管理用の情報も含まれません。

HTTP Request

GET
/manage/blog/categories

Query Parameters

Parameter Type Default Description
order string asc 並び順. asc, desc
orderby string disp_order 並びの基準カラムを指定. 指定可能リスト: id, name, disp_order
include array [] 取得対象とするidのリストを指定
exclude array [] 取得対象外とするidのリストを指定
filter string 指定文字列から「カテゴリ名」で検索

Blog Stats

ブログ機能に対して

がリクエストできます。

Properties

Attribute Type Description  
id integer 記事ID read only
uid integer ユーザ識別子 read only
count integer 閲覧数 read only

指定可能な集計期間は以下の通りです。

統計情報更新

curl -X PUT http://example.com/public/blog/posts/:id/visit
    -d uid=5000
curl_init();

The above command returns JSON structured like this:

{
    "id": 1
}

ブログ記事の閲覧数を増加させます。

HTTP Request

PUT
/public/blog/posts/:id/visit

Query Parameters

Parameter Type default Description  
uid integer ユーザ識別子 Required

統計情報取得

curl "http://example.com/public/blog/posts/visit?uid=5000&per_page=3&type=monthly&order=desc"
curl_init();

The above command returns JSON structured like this:

[
    {
        "id": 4,
        "count": 320
    },
    {
        "id": 6,
        "count": 120
    },
    {
        "id": 1,
        "count": 23
    }
]

ブログ記事の閲覧数を一覧取得します。

公開ステータスが「公開」の記事のみ取得されます。

HTTP Request

GET
/public/blog/posts/visit

Query Parameters

Parameter Type default Description  
uid integer ユーザ識別子 Required
type string daily 集計期間
order string asc 昇順 or 降順, asc/desc
page integer 1 ページ番号
per_page integer 20 1ページ件数

File Image

ファイル管理API - 画像ライブラリ

拡張の可能性を考え、エンドポイントを/fileとし以下に/imagesで画像を操作する仕様になっています。

Properties

画像はホスト名以降のPATHでストレージに保存。

meta情報としてPATHを含むデータを管理します。

Attribute Type Description  
uid integer ユーザ識別子 - uid read only
path string ファイルパス read only
id integer ファイル管理ID read only
title string ファイルタイトル
alt string alt属性
regist_ts string ファイル作成日時 read only
update_ts string ファイル更新日時 read only

画像一覧取得

curl "http://example.com/manage/file/images?per_page=2" \
    -H "Authorization: Bearer <jwt>"
curl_init();

The above command returns JSON structured like this:

[
    {
        "id": 1,
        "path": "/5000/2025/01/01/103201/sample.png",
        "title": "sample",
        "alt": "サンプル画像",
        "regist_ts": "2025-01-01 10:32:00",
        "update_ts": "2025-01-01 10:32:00"
    },
    {
        "id": 2,
        "path": "/5000/2025/01/02/103601/sample.png",
        "title": "sample",
        "alt": "サンプル画像2枚目",
        "regist_ts": "2025-01-02 10:36:00",
        "update_ts": "2025-01-02 10:36:00"
    }
]

管理されている画像の一覧を取得します。

HTTP Request

GET
/manage/file/images

Query Parameters

Parameter Type Default Description
page integer 1 ページ番号
per_page integer 20 1ページでの取得記事数, 最大100
order string asc 並び順. asc, desc
orderby string id 並びの基準カラムを指定. 指定可能リスト: id, title
include array [] 取得対象とするidのリストを指定
exclude array [] 取得対象外とするidのリストを指定
before string 指定日以前に作成された画像を取得
after string 指定日以降に作成された画像を取得
title string タイトル検索 - 部分一致
alt string alt検索 - 部分一致

画像取得

curl "http://example.com/manage/file/images/:id" \
    -H "Authorization: Bearer <jwt>" \
curl_init();

The above command returns JSON structured like this:

{
    "id": 1,
    "path": "/5000/2025/01/01/103201/sample.png",
    "title": "sample",
    "alt": "サンプル画像",
    "regist_ts": "2025-01-01 10:32:00",
    "update_ts": "2025-01-01 10:32:00"
}

管理されている画像を取得します。

HTTP Request

GET
/manage/file/images/:id

Query Parameters

Parameter Type Default Description

画像登録

curl -X POST "http://example.com/manage/file/images" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "src": "<base64> or URL",
        "title": "sample",
        "alt": "サンプル"
    }'
curl_init();

The above command returns JSON structured like this:

{
    "id": 3,
    "path": "/5000/2025/01/02/103601/sample.png",
    "title": "sample",
    "alt": "サンプル",
    "regist_ts": "2025-01-02 10:36:00",
    "update_ts": "2025-01-02 10:36:00"
}

画像を新規登録(アップロード)

HTTP Request

POST
/manage/file/images

Query Parameters

Parameter Type Default Description  
src string Base64化された画像ファイルまたは参照可能なURL Required
title string タイムスタンプ ファイルタイトル
alt string ファイルalt

画像更新

curl -X PUT "http://example.com/manage/file/images/:id" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "title": "change",
    }'
curl_init();

The above command returns JSON structured like this:

{
    "id": 3,
    "path": "/5000/2025/01/02/103601/change.png",
    "title": "change",
    "alt": "サンプル",
    "regist_ts": "2025-01-02 10:36:00",
    "update_ts": "2025-01-10 11:24:00"
}

画像を更新

タイトル、altのみ変更可能

HTTP Request

PUT
/manage/file/images/:id

Query Parameters

Parameter Type Default Description  
title string タイムスタンプ ファイルタイトル
alt string ファイルalt

画像削除

curl -X DELETE "http://example.com/manage/file/images/:id" \
    -H "Authorization: Bearer <jwt>"
curl_init();

The above command returns JSON structured like this:

{
    "id": 3
}

画像を削除します

HTTP Request

DELETE
/manage/file/images/:id

Query Parameters

Parameter Type Default Description  

File Design

ファイル管理API - デザイン設定用

TOP画像やロゴ画像を管理

Properties

Attribute Type Description  
uid integer ユーザ識別子 read only
path string ファイルパス read only
url string ファイルURL read only
ext string 拡張子 read only
update_ts string ファイル更新日時 read only

データベースを持たないため実体ファイル参照により情報を取得

TOP画像取得

curl "http://example.com/manage/file/design/image/top" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "path": "/5000/design/image/top.webp",
    "url": "https://example.com/5000/design/image/top.webp",
    "ext": "webp",
    "update_ts": "2025-01-01 10:00:00"
}

TOP画像の情報を取得します

HTTP Request

GET
/manage/file/design/image/top

Query Parameters

Parameter Type Default Description

TOP画像登録

curl -X PUT "http://example.com/manage/file/design/image/top" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "src": http://example.com/top.webp"
    }'

The above command returns JSON structured like this:

{
    "path": "/5000/design/image/top.webp",
    "url": "https://example.com/5000/design/image/top.webp",
    "ext": "webp",
    "update_ts": "2025-01-01 10:00:00"
}

TOP画像を登録します

HTTP Request

PUT
/manage/file/design/image/top

Query Parameters

Parameter Type Default Description  
src string 画像URLまたはBase64 Required
curl "http://example.com/manage/file/design/image/logo" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "path": "/5000/design/image/logo.webp",
    "url": "https://example.com/5000/design/image/logo.webp",
    "ext": "webp",
    "update_ts": "2025-01-01 10:00:00"
}

Logo画像の情報を取得します

HTTP Request

GET
/manage/file/design/image/logo

Query Parameters

Parameter Type Default Description
curl -X PUT "http://example.com/manage/file/design/image/logo" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "src": http://example.com/sample.webp"
    }'

The above command returns JSON structured like this:

{
    "path": "/5000/design/image/logo.webp",
    "url": "https://example.com/5000/design/image/logo.webp",
    "ext": "webp",
    "update_ts": "2025-01-01 10:00:00"
}

Logo画像を登録します

HTTP Request

PUT
/manage/file/design/image/logo

Query Parameters

Parameter Type Default Description  
src string 画像URLまたはBase64 Required

File Chirashi

ファイル管理API - チラシOP用

チラシOPのチラシファイルを管理

:id: アイテムID

:id2: チラシID

Properties

Attribute Type Description  
uid integer ユーザ識別子 read only
item_id integer アイテムID read only
chirashi_id integer チラシID read only
path string ファイルパス read only
url string ファイルURL read only
ext string 拡張子 read only
update_ts string 更新日時 read only

チラシ取得

curl "http://example.com/manage/file/chirashi/items/:id/posts/:id2/images" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "front": {
        "item_id": 12345,
        "chirashi_id": 10,
        "path": "/5000/chirashi/12345/10/front.webp",
        "url": "https://example.com/5000/chirashi/12345/10/front.webp",
        "ext": "webp",
        "update_ts": "2025-01-01 10:00:00"
    },
    "back": {}
}

指定したチラシアイテム内の1つのチラシとして登録された画像を取得します

表裏両方設定済の場合は2枚分、片方のみ(実質表のみ)の場合は1枚分のデータが返されます

HTTP Request

GET
/manage/file/chirashi/items/:id/posts/:id2/images

Query Parameters

Parameter Type Default Description
context string 取得対象の裏表指定. front, back - 未指定なら両方

チラシ登録

curl X PUT "http://example.com/manage/file/chirashi/items/:id/posts/:id2/images" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "context": "front",
        "src": "http://example.com/sample.png"
    }'

The above command returns JSON structured like this:

{
    "item_id": 12345,
    "chirashi_id": 10,
    "path": "/5000/chirashi/12345/10/front.webp",
    "url": "https://example.com/5000/chirashi/12345/10/front.webp",
    "ext": "webp",
    "update_ts": "2025-01-01 10:00:00"
}

指定のチラシに対してチラシ画像を登録します

HTTP Request

PUT
/manage/file/chirashi/items/:id/posts/:id2/images

Query Parameters

Parameter Type Default Description  
context string 登録先指定. front, back Required
src string 画像URLまたはBase64 Required

チラシ削除

curl -X DELETE "http://example.com/manage/file/chirashi/items/:id/posts/:id2/images" \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{
        "context": "back"
    }'

The above command returns JSON structured like this:

{
    "id": 10,
    "context": "back"
}

指定のチラシ画像を削除します

HTTP Request

DELETE
/manage/file/chirashi/items/:id/posts/:id2/images

Query Parameters

Parameter Type Default Description
context string 登録先指定. front, back - 未指定時は両方削除

チラシ一括削除

curl -X DELETE "http://example.com/manage/file/chirashi/items/:id/posts" \
    -H "Authorization: Bearer <jwt>"

The above command returns JSON structured like this:

{
    "item_id": 12345
}

指定のチラシ画像をアイテム単位で一括削除します

HTTP Request

DELETE
/manage/file/chirashi/items/:id/posts

Query Parameters

Parameter Type Default Description

Errors

リクエストエラー時はHTTPレスポンスステータスコードにてエラーを通知します。

またレスポンスヘッダX-API-Errorに詳細なエラー文章を返します。

Error Code Meaning Description
400 Bad Request 不正なリクエスト
401 Unauthorized 認証に失敗
403 Forbidden 許可されないリクエスト
404 Not Found 存在しないエンドポイント
405 Method Not Allowed 不正なHTTPメソッド
406 Not Acceptable json以外の形式での要求
409 Conflict リクエストに対してリソースの状態と要求が矛盾している場合
410 Gone 廃止されたエンドポイントへのリクエスト
418 I'm a teapot. ティーポットで珈琲を淹れようとした際のエラー
429 Too Many Requests 一定時間内に制限を超えたリクエスト
500 Internal Server Error サーバ側に問題がある際のエラー
503 Service Unavailable メンテナンス等の理由により一時的にリクエストを処理できないエラー

更新履歴

v1.0.0

新規リリース