Alpha: Ships on npm at 7.0.0-alpha.07.0.0-alpha.0

endpoints

An API at a glance: one ruled row per route, with its method, path and job.

View as JSON

Carried by the api-product Template. Seen on pages/harbor/home.json, section 5.

From Harbor tides › homequaypointOpen the frame
pages/harbor/home.json, section 5
{
  "kind": "section",
  "shell": { "inset": "contained", "density": "section" },
  "block": {
    "type": "endpoints",
    "head": { "eyebrow": "The API", "title": "Four routes, one shape." },
    "rows": [
      { "method": "GET", "path": "/v1/berths", "text": "Every berth in a harbor, with its charted depth" },
      { "method": "GET", "path": "/v1/berths/{berth}/tides", "text": "High and low water for one berth" },
      { "method": "GET", "path": "/v1/berths/{berth}/window", "text": "The hours a given draft clears" },
      { "method": "POST", "path": "/v1/alerts", "text": "A webhook before a window closes" }
    ]
  }
}

Smallest that parses

{
  "type": "endpoints",
  "head": { "eyebrow": "The API", "title": "Four routes, one shape." },
  "rows": [
    { "method": "GET", "path": "/v1/berths", "text": "Every berth in a harbor, with its charted depth" },
    { "method": "GET", "path": "/v1/berths/{berth}/tides", "text": "High and low water for one berth" },
    { "method": "GET", "path": "/v1/berths/{berth}/window", "text": "The hours a given draft clears" }
  ]
}

Props

From @mdxui/site@7.0.0-alpha.0. A count reads as min–max × item; a string bound is its maximum length in characters, and links its refusal.

PropType and boundRequired
headobjectyes
head.eyebrowstring ≤28yes
head.titlestring ≤72no
head.ledestring ≤300no
head.maxstring (pattern)no
head.ledeMaxstring (pattern)no
head.balancebooleanno
head.scale"compact" | "large"no
head.tagstring ≤8no
head.layout"split"no
rows3–16 × objectyes
rows[].method"GET" | "POST" | "PUT" | "PATCH" | "DELETE"yes
rows[].pathstring ≤64yes
rows[].textstring ≤96yes
rows[].hrefstring ≤160no
notestring ≤160no

Use instead