サイトごとの設定
ワークスペース内の各サイトで、公開 API を個別に有効化・設定できます。
サイトごとの公開 API 設定で、何を誰に公開するかを正確にコントロール。公開済みコンテンツ、サイトマップ、リダイレクトを、どこでも同じ予測可能な JSON 形式で取得できます。覚えるべき GraphQL スキーマも、同期を保つべき生成クライアントもありません。以下のリクエストはすべて本物で、CMSHub で構築したブログに curl だけで呼び出しています。
サイトが有効化され、コレクションを許可リストに入れれば、公開済みレコードはシンプルな GET ひとつで取得できます。解決は Host ヘッダーだけで行われ、公開データに API キーは不要です。
https://the-signal.blog/api/postscurl https://the-signal.blog/api/posts{
"siteId": "the-signal-4f2a",
"siteName": "The Signal",
"baseUrl": "https://the-signal.blog",
"collection": {
"id": "3b0d6f2a-9c41-4e8a-8f2e-1d4c9a7b6e11",
"slug": "posts",
"name": "Posts"
},
"data": [
{
"id": "a91f2e3c-7d5b-4a10-9c3e-6f8a2b1d0e44",
"locale": "en",
"translationOfId": null,
"data": {
"title": "Shipping a public content API without a GraphQL schema",
"slug": "shipping-a-public-content-api",
"excerpt": "Plain REST beats a bespoke query language when a frontend just needs JSON.",
"category": "Engineering",
"author": "Dana Osei",
"published_at": "2026-09-10"
}
},
{
"id": "d2c5b8a1-4e3f-4c9d-8b7a-2f1e6d5c4b33",
"locale": "en",
"translationOfId": null,
"data": {
"title": "What the quality gate actually checks before you publish",
"slug": "the-quality-gate-explained",
"excerpt": "Every generated page passes the same checks, whether it's post 1 or post 10,000.",
"category": "Product",
"author": "Dana Osei",
"published_at": "2026-09-04"
}
}
],
"meta": {
"locale": "en",
"pagination": { "start": 0, "limit": 20, "total": 2, "nextCursor": null }
}
}sitemap.xml と robots.txt は、コンテンツ API が読むのと同じページ一覧から生成されます。同期を保つべき別の設定も、手作業で再生成するものもありません。
https://the-signal.blog/sitemap.xmlcurl https://the-signal.blog/sitemap.xml<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url><loc>https://the-signal.blog/posts/shipping-a-public-content-api</loc><lastmod>2026-09-10T14:22:00.000Z</lastmod></url>
<url><loc>https://the-signal.blog/posts/the-quality-gate-explained</loc><lastmod>2026-09-04T09:15:00.000Z</lastmod></url>
</urlset>公開コンテンツ API は、サイトが公開する内容を明示的に設定するまで閉じたままです。未公開や下書きのコンテンツをこっそり配信する、デフォルトで開いたエンドポイントはありません。
ワークスペース内の各サイトで、公開 API を個別に有効化・設定できます。
公開 API が配信するのは、品質ゲートを通過し、実際に公開されたものだけ。下書きは決して配信しません。
すべてのルートはバージョン付きのパスの下にあるため、今日作った連携は CMSHub が進化しても動き続けます。
サイトのひとつで公開コンテンツ API をオンにして、生成したページを取得してみましょう。