> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mastermindcms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# msm:rest

> HTTP-Endpunkt aufrufen und Antwort rendern

`<msm:rest>` ruft einen externen HTTP-Endpunkt (GET/POST) auf und rendert die Antwort mit Templates.

## Grundstruktur

```html theme={null}
<msm:rest id="remote" endpoint="https://api.example.com/items" method="GET" item-name="r">
  <msm:template>
    <div>${r|value}</div>
  </msm:template>
  <msm:empty>
    <div>No data</div>
  </msm:empty>
</msm:rest>
```

## Attribute

| Attribut            | Bedeutung                                                    |
| ------------------- | ------------------------------------------------------------ |
| `endpoint`          | HTTP-URL.                                                    |
| `method`            | `GET` oder `POST`.                                           |
| `request`           | JSON-Request-Payload (für POST) oder Params (je nach Setup). |
| `header` / `footer` | Optionales JSON für zusätzliche Sections.                    |
| `item-name`         | Prefix innerhalb der Templates.                              |
