応答の形式
この記事の内容
一覧の応答
一覧は、items と、docs からfields で
curl "https://api.kumidana.com/v1/docs/content/docs?limit=2&fields=title,section,audience&order=position" \
-H "Authorization: Bearer kmd_pub_xxxx"{
"items": [
{
"id": "01a2229d-b2d7-7b22-a17f-959dbbee7f1c",
"type": "docs",
"slug": "what-is-kumidana",
"publishedAt": "2026-11-27T15:00:00.000Z",
"updatedAt": "2026-11-27T15:00:00.000Z",
"data": {
"title": { "text": "Kumidana とは", "html": "Kumidana とは" },
"section": {
"id": "01a2229a-2298-7e97-ba8d-2fcaef6a6f1c",
"type": "sections",
"slug": "getting-started",
"data": {
"title": { "text": "はじめに", "html": "はじめに" },
"slug": "getting-started",
"description": {
"text": "Kumidana の考え方と、サイトを作って API でコンテンツを取り出すまでの流れを説明します。",
"html": "Kumidana の<wbr>考え方と、<wbr>サイトを<wbr>作って<wbr> API で<wbr>コンテンツを<wbr>取り出すまでの<wbr>流れを<wbr>説明します。"
},
"icon": "solid:rocket",
"position": 10
}
},
"audience": ["editor", "developer", "admin"]
}
}
],
"total": 42,
"limit": 2,
"offset": 0
}(2 件目は
total はlimit とoffset は、items がtotal は
1 件の応答
1 件のitems のdepth=0 を
curl "https://api.kumidana.com/v1/docs/content/docs/entries?depth=0" \
-H "Authorization: Bearer kmd_pub_xxxx"{
"id": "01a2229d-b2d7-7960-9fd8-742db0baa7f1",
"type": "docs",
"slug": "entries",
"publishedAt": "2026-11-27T15:00:00.000Z",
"updatedAt": "2026-11-27T15:00:00.000Z",
"data": {
"title": {
"text": "エントリーを作成・公開する",
"html": "エントリーを<wbr>作成・<wbr>公開する"
},
"slug": "entries",
"section": {
"id": "01a2229a-2299-7b34-8664-8d44b12e492d",
"type": "sections",
"slug": "editing"
},
"position": 30,
"summary": {
"text": "エントリーは「保存」で下書きに残り、「公開」で公開サイトに出ます。…",
"html": "エントリーは<wbr>「保存」で<wbr>下書きに<wbr>残り、<wbr>「公開」で<wbr>公開サイトに<wbr>出ます。…"
},
"audience": ["editor"],
"body": {
"markdown": "## 作る・保存する・公開する\n\nエントリーは、種類…",
"html": "<h2>作る・保存する<wbr>・公開する</h2>\n<p>エントリーは、<wbr>種類…</p>"
},
"related": [
{ "id": "01a2229d-b2d7-7365-aa80-b53657f70fd4", "type": "docs", "slug": "status-and-conflicts" },
{ "id": "01a2229d-b2d7-762f-8543-aeac9259dc5f", "type": "docs", "slug": "history" }
]
}
}エントリーのdata の
| キー | 型 | 内容 |
|---|---|---|
id |
文字列 | エントリーの |
type |
文字列 | 種類の |
slug |
文字列 | スラッグ。null に |
publishedAt |
文字列またはnull |
公開日時。2026-11-27T15:00:00.000Z) |
updatedAt |
文字列 | 更新日時。 |
visibleTo |
文字列の |
限定の |
data |
オブジェクト | 種類の |
限定のvisibleTo がKumidana-Viewer)を
data にfields で
型ごとの値の形
| 項目の |
値の |
|---|---|
text、textarea |
{ "text", "html" }。phraseBreak: false の |
richtext |
{ "markdown", "html" } |
number、boolean |
数値、 |
date、datetime、slug、url、email、icon |
文字列 |
select |
文字列。multiple なら |
media |
オブジェクト。multiple なら |
reference |
オブジェクト。multiple なら |
repeater |
行の |
text と textarea
既定では、text とtextarea はtext(元のhtml(文節のhtml を<title> のようにtext をhtml は&、<、>、")をtextarea の<br> に、text の
phraseBreak: false の
{ "term": { "text": "ヘッドレス CMS", "html": "ヘッドレス CMS" }, "reading": "へっどれすしーえむえす" }<wbr> が
richtext
richtext は、markdown と、html をhtml はscript とstyle はmedia/… のhttp、https、mailto、/ で# で
{
"markdown": "## はじめに\n\n**Kumidana** は…",
"html": "<h2>はじめに</h2>\n<p><strong>Kumidana</strong> は…</p>"
}項目にphraseBreak: false をrichtext はhtml から<wbr> が
media
media は、
{
"path": "media/2026/cover.webp",
"url": "https://media.kumidana.com/media/sites/01a2229a-2299-7b34-8664-8d44b12e492d/01a2229d-b2d7-7960-9fd8-742db0baa7f1.webp",
"mimeType": "image/webp",
"width": 1200,
"height": 630,
"alt": "会場の写真"
}path はurl はwidth とheight は、null にalt がurl には、null、
reference と depth
reference は、id、type、slug をdepth がdata もdata とpublishedAt とupdatedAt は
{
"id": "01a2229a-2299-7b34-8664-8d44b12e492d",
"type": "sections",
"slug": "editing",
"data": { "title": { "text": "編集する", "html": "編集する" }, "position": 20 }
}depth=0 ではdata がdepth=1(既定)でdepth=2 でdata がmultiple のnull、depth をdepth=0 とdata は
repeater
repeater は、site 種類のlabel はphraseBreak: false なので
{
"navLinks": [
{ "label": "Kumidana", "url": "https://kumidana.com" },
{ "label": "更新履歴", "url": "/changelog" }
]
}repeater のreference はreference は、repeater の
select の複数選択
multiple をselect は、audience が["editor", "developer"] のようにchoices に
空の値の返り方
値の
| 項目の |
空の |
|---|---|
text、textarea、richtext、media(単数)、reference(単数) |
null |
media、reference、select のmultiple |
[] |
repeater |
[] |
number、date、slug、url、select(単数)など |
null |
0 とfalse は
TypeScript の型
公式の
type Text = { text: string; html: string }; // phraseBreak: false の項目は string のまま
type RichText = { markdown: string; html: string };
type Media = { path: string; url: string; mimeType: string; width: number | null; height: number | null; alt: string };
type Ref<T> = { id: string; type: string; slug: string | null; data?: T }; // depth が足りないと data は付かない
type Entry<T> = { id: string; type: string; slug: string | null; publishedAt: string | null; updatedAt: string; visibleTo?: string[]; data: T };
type List<T> = { items: Entry<T>[]; total: number; limit: number; offset: number };項目のGET /types/<キー> のtype とoptions(multiple、phraseBreak、fields)でnull、multiple とrepeater なら[] です。
エラーの