ページ名と現行本文を検索します。検索語が空の場合は更新日時の新しい順に返します。
権限 pages:read成功 200 OK
Query parameters
| 名前 | 型 | 必須 | 制約・既定値 |
q | string | 任意 | 最大200文字 |
limit | integer | 任意 | 1〜50、既定値20 |
Response 200
{
"pages": [{
"name": "会議/2026-07-25",
"url": "https://{wiki-host}/会議/2026-07-25",
"excerpt": "会議概要...",
"current_revision_id": 42,
"updated_at": "2026-07-25T10:30:00+09:00"
}]
}
GET
/pages/{page_name}
getPage
現行Markdown本文、タグ、更新に必要なリビジョンIDを取得します。階層名は各セグメントをURLエンコードします。
権限 pages:read成功 200 OK
Response 200
{
"name": "会議/2026-07-25",
"body": "# 会議概要",
"tags": ["会議"],
"current_revision_id": 42,
"updated_at": "2026-07-25T10:30:00+09:00",
"url": "https://{wiki-host}/会議/2026-07-25"
}
Responses 200 取得成功 · 401 認証失敗 · 403 権限不足 · 404 page_not_found
新規ページを作成し、下書きを経ずに公開します。既存または削除済みページの名前は再利用できません。
権限 pages:create成功 201 Created
Request body application/json
| フィールド | 型 | 必須 | 制約 |
name | string | 必須 | 最大255文字 |
body | string | 必須 | 最大1,000,000文字 |
summary | string | null | 任意 | 最大255文字 |
tags | string[] | 任意 | 最大10件、各50文字、重複不可 |
source_refs | string[] | 任意 | 最大10件、各500文字、重複不可 |
Request example
curl -X POST "https://{wiki-host}/api/integration/v1/pages" \
-H "Authorization: Bearer <access-token>" \
-H "Idempotency-Key: meeting-2026-07-25" \
-H "Content-Type: application/json" \
-d '{
"name": "会議/2026-07-25",
"body": "# 会議概要",
"summary": "会議ページを作成",
"tags": ["会議"],
"source_refs": ["議事録: 2026-07-25"]
}'
Responses 201 作成成功 · 200 再送結果 · 409 page_already_exists · 409 idempotency_conflict · 422 入力不正
PUT
/pages/{page_name}
updatePage
既存ページの本文全体を置き換え、新しい履歴を作成します。先にGETで現行版を取得してください。
権限 pages:update成功 200 OK
Request body application/json
| フィールド | 型 | 必須 | 制約・説明 |
body | string | 必須 | 最大1,000,000文字。置き換え後の本文全体 |
base_revision_id | integer | 必須 | GETで取得した current_revision_id |
summary | string | null | 任意 | 最大255文字 |
tags | string[] | 任意 | 更新後のタグ全体。省略時は空 |
source_refs | string[] | 任意 | この履歴の参照元 |
Request example
curl -X PUT "https://{wiki-host}/api/integration/v1/pages/会議/2026-07-25" \
-H "Authorization: Bearer <access-token>" \
-H "Idempotency-Key: meeting-update-1" \
-H "Content-Type: application/json" \
-d '{
"body": "# 会議概要\n\n決定事項を追記",
"base_revision_id": 42,
"summary": "決定事項を追記",
"tags": ["会議"]
}'
409 revision_conflict の処理
ページを再取得し、変更内容を現行本文へ反映してから新しいIdempotency-Keyで再試行します。
Responses 200 成功 · 403 page_frozen · 404 page_not_found · 409 revision_conflict · 409 idempotency_conflict · 422 入力不正