> For the complete documentation index, see [llms.txt](https://helpcenter.etron.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpcenter.etron.info/verwaltungsoberflache/api-and-hooks/endpunkte/custom-endpoints.md).

# Custom Endpoints

> *API & Hooks -> Endpunkte -> Custom Endpoints*

<figure><img src="/files/d3wdVbI2ONhDUgzMXVcZ" alt=""><figcaption></figcaption></figure>

Mit Custom Endpoints können eigene REST-Endpunkte definiert werden. Damit lassen sich verschiedene Integrationen umsetzen, von einfachen Datenabfragen über die Ausführung von Server Actions bis hin zu frei definierbarem Python-Code, z.B. ein Endpunkt, der `/customlist/products` heißt und beim Aufruf eine Liste von Produkten zurückgibt.

<figure><img src="/files/hEacBoTbeWhspFYedrAT" alt="Anlegen eines Custom Endpoints"><figcaption><p>Anlegen eines Custom Endpoints</p></figcaption></figure>

### Name

Der Name des Endpunkts&#x20;

### Custom Endpoint

der Pfad des Enpunkts, z.B. `customlist/products`

### &#xD;HTTP Method

HTTP-Methode des Endpunkts (GET, POST, PUT, DELETE).

### Model

Auf dieses Datenmodell bezieht sich der Endpunkt, z.B. Produkte (product.template)

### &#xD;Protected

Bestimmt, ob ein Endpunkt geschützt ist, erfordert eine Authentifizierung, wenn aktiviert. u

### Sudo Evaluation

Führt Code ohne Zugriffsbeschränkungen aus, wenn aktiviert.

### Wrap Response

Fügt Metadaten zum Response hinzu, wenn aktiviert.

### Evaluation Type

Es gibt 3 verschiedene Typen

<details>

<summary>Evaluate a Domain: Filterabfrage auf Datensätze</summary>

Nutzt eine Domain (Filter) auf ein Modell und gibt gefilterte Datensätze zurück.

**Beispiel:**

* HTTP-Methode: GET
* Model: Produkt
* Domain Settings: \[('list\_price', '>', 100)]
* Domain Fields: name und list\_price

Es werden Name und Preis aller Produkte mit einem Preis größer 100 zurückgegeben.

```
  "domain": [["price", ">", 100]],
  "fields": ["name", "list_price"],
  "result": [
    {"name": "Product A", "list_price": 120},
    {"name": "Product B", "list_price": 150}
  ],
  "count": 2
}
```

#### Domain Settings

In den Domain-Settings kann eine Filterung der Datensätze eingestellt werden.&#x20;

<figure><img src="/files/tBrMubWG9G1PO3XMnxp6" alt=""><figcaption></figcaption></figure>

#### Domain Fields

<figure><img src="/files/OTv2r0DIqtYIjOqN17mE" alt=""><figcaption></figcaption></figure>

#### Docs

<figure><img src="/files/aOS4Lzp87DmJmM21hkBn" alt=""><figcaption></figcaption></figure>

</details>

<details>

<summary>Execute a Server Action: Ausführen einer vordefinierten Aktion</summary>

#### **Server Action, Docs**

Die gewünschte Aktion wird unter "Server Actions" ausgewählt, z.B. "Löschen/Archivieren"&#x20;

<figure><img src="/files/BxYfXHqJrQ3bmGiRaQGf" alt=""><figcaption></figcaption></figure>

</details>

<details>

<summary>Execute Python Code: Ausführen von eigenem Code</summary>

#### Code Settings

Unter Code Settings wird der auszuführende Python-Code eingegeben.&#x20;

<figure><img src="/files/Mz6FsAF8h9ivFr1Wnu25" alt=""><figcaption></figcaption></figure>

**Beispiel:**

```
result = model.search_read([('list_price', '>', 100)], ['name', 'list_price'])
```

Es werden Name und Preis aller Produkte mit einem Preis größer 100 zurückgegeben.

#### Help

Gibt weite Informationen zu den Python expressions an, z.B. welche Parameter im Python-Code verwendet werden können.

![](/files/t36evCJluUrKuC6Us1KT)&#x20;

#### Docs

<figure><img src="/files/aLk5ue0G9vclgLuQNd5H" alt=""><figcaption></figcaption></figure>

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://helpcenter.etron.info/verwaltungsoberflache/api-and-hooks/endpunkte/custom-endpoints.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
