endpoint
Endpoint
One API route. First line `POST /v1/graphs`, a sentence, a params table (bold name is required), then request and response fences. Many routes in one table are Sheet.
one component
First line is the method and path. A table of params — bold name is required. Fences after it are the request and the response.
GET/api/v1/components/:slug
One component from the catalog, with its props.
- slug (required)stringRegistry slug, like
graph-table
request
$ curl https://mdxcn.dev/api/v1/components/graph-meterjson
{ "slug": "graph-meter", "name": "GraphMeter", "props": [ … ] }MDX
<Endpoint>
GET /api/v1/components/:slug
One component from the catalog, with its props.
| Param | Type | |
| --- | --- | --- |
| **slug** | string | Registry slug, like `graph-table` |
```bash
$ curl https://mdxcn.dev/api/v1/components/graph-meter
```
```json
{ "slug": "graph-meter", "name": "GraphMeter", "props": [ … ] }
```
</Endpoint>install
command
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | "endpoint" | Caption drawn on the top edge of the frame. |
| children | Markdown | — | Method and path, paragraphs, a table of name / type / description, fenced blocks. |
| method | string | — | Or the first line of the children. |
| path | string | — | Or the first line of the children. |
| params | { name, type?, description?, required? }[] | — | Data form of the table. |
| blocks | { label?, code }[] | — | Data form of the fences. |
| palette | "mono" | "duo" | "multi" | "mono" | mono is one accent plus muted. duo paints the second series with --graph-accent-2. multi cycles three accents. |
| corner | string | "+" | Character at each corner of the frame. |
| className | string | — | Passed to the outer frame. |