profound-logoProfound CMS
⌘K
Admin
Theme
DocsTutorialBlogPhilosophy
DocsTutorialBlogPhilosophy

Hybrid

Collection of Pages with ComponentsTypes of ComponentsSetup server sent events (SSE) content refetchInstall Profound CMS as a proxyCEL Scripting in Template BuilderProject ScaffoldingMedia Library

Headless

Quick startJSON และ Claude Codeดึงคำอธิบาย Zod ของคอมโพเนนต์

REST API

REST API Overviewgetเชื่อมต่อเว็บไซต์กับ CMS APIgetGET /routesgetGET /routegetGET /blocksgetรับบล็อกพร้อมแคช CELgetGET /blocks/generatedgetGET /componentsgetGET /components/{name}getGET /dataset/{schema_name}getGET /content-changes (SSE)patchPATCH /dataset/{schema_name}postPOST /translationpatchPATCH /translationsgetGET /usagepostPOST /csvpatchPATCH /csv
All Systems Operational
Powered Byprofound-logo
Theme

GET /routes

แสดงรายการเส้นทางของเว็บไซต์แบบแบ่งหน้า พร้อม `block_ids` ที่มีผลจริง.

แสดงรายการเส้นทางของเว็บไซต์แบบแบ่งหน้า และสามารถกรองตามสถานะและรูปแบบได้ตามต้องการ เส้นทางที่มี block_ids ว่างจะถูกเติมข้อมูลจากเส้นทาง dynamic-default ที่ตรงกัน ดังนั้น block_ids ที่ส่งกลับมาคือบล็อกที่มีผลจริงสำหรับการเรนเดอร์

การยืนยันตัวตน: คีย์ API (ส่วนหัว x-api-key หรือพารามิเตอร์คิวรี api_key)

พารามิเตอร์คิวรี

พารามิเตอร์ชนิดจำเป็นหมายเหตุ
websiteIduuidใช่เว็บไซต์เป้าหมาย.
api_keystringไม่ทางเลือกแทนส่วนหัว x-api-key.
statestringไม่กรองตามสถานะของเส้นทาง (ต้องตรงกันทั้งหมด).
patternstringไม่ตรวจสอบการจับคู่บางส่วนกับรูปแบบเส้นทาง (LIKE โดยหนีอักขระตัวแทน).
limitintegerไม่ขนาดหน้าผลลัพธ์ ค่าเริ่มต้น 50 จำกัดอยู่ที่ 1–100.
offsetintegerไม่จำนวนแถวที่ข้าม ค่าเริ่มต้น 0.

ผลลัพธ์จะเรียงตาม updated_at DESC.

การตอบกลับ

{
  "routes": [
    {
      "website_id": "...",
      "path": "/docs/getting-started",
      "pattern": "/docs/getting-started",
      "label": "เริ่มต้นใช้งาน",
      "tags": [],
      "block_ids": ["..."],
      "template_block_ids": ["..."],
      "override_mode": "merge",
      "state": "Live",
      "param_bindings": {},
      "created_at": "2026-06-23T18:34:16Z",
      "updated_at": "2026-06-23T20:36:55Z"
    }
  ],
  "total": 42,
  "hasMore": true
}

total คือจำนวนที่ผ่านการกรองทั้งหมด; hasMore หมายถึง offset + limit < total. label, param_bindings, template_block_ids และ override_mode จะไม่ถูกส่งมาหรือเป็น null เมื่อยังไม่ได้ตั้งค่า

ตัวอย่าง

curl '{CMS_API_URL}/routes?websiteId=<uuid>&limit=20' \
  -H 'x-api-key: <key>'

ข้อผิดพลาด

  • 400 — ไม่มีหรือ websiteId ไม่ถูกต้อง
  • 401 — คีย์ API ไม่ถูกต้อง (หรือไม่มีเมื่อเซิร์ฟเวอร์ต้องการ)
Continue Reading
Previous‹เชื่อมต่อเว็บไซต์กับ CMS APINextGET /route›