> For the complete documentation index, see [llms.txt](https://docs.kiloiot.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kiloiot.io/kilo-docs-de/kilo-iot-server/api/public-rest-api.md).

# Öffentliche REST-API

Öffentliche REST-API des Kilo IoT Server — primäre Integrationsoberfläche über HTTPS/JSON mit X-API-Key und X-Organization-Id.

Die REST-API ist der primäre Weg, Kilo IoT Server über standardmäßiges HTTPS mit externen Systemen zu integrieren. Jede Sprache oder jedes Tool, das eine authentifizierte HTTP-Anfrage senden kann, kann sie verwenden — Backend-Dienste, Datenpipelines, Reporting-Jobs und operative Tools.

Verwenden Sie die [API-Referenz](https://api.kiloiot.io/) für die vollständige Liste der Endpunkte, Anfrageparameter, Antwortschemas und erforderlichen Scopes.

## Basis-Endpunkt und Authentifizierung

Anfragen gehen an den gesicherten Produktionsendpunkt und tragen zwei Header:

* `X-API-Key` — ein Schlüssel mit eingeschränktem Geltungsbereich, erstellt in [Einstellungen → API-Schlüssel](/kilo-docs-de/kilo-iot-server/settings/api-keys.md).
* `X-Organization-Id` — die Organisation, in der die Anfrage ausgeführt wird; sie muss mit der Organisation des Schlüssels übereinstimmen. Einige Operationen akzeptieren die Organisation auch als `organizationId` Abfrageparameter anstelle des Headers.

Der gesamte Datenverkehr läuft über TLS. Behandeln Sie den Schlüssel wie Zugangsdaten — siehe [Authentifizierung & API-Schlüssel](/kilo-docs-de/kilo-iot-server/api/authentication-and-api-keys.md).

## Was die API kann

REST ist die breite, primäre Oberfläche. Vorbehaltlich der dem Schlüssel gewährten Scopes können Integrationen plattformweit arbeiten — zum Beispiel: das Konto-/Benutzerprofil lesen; Geräte und ihre **physische Gerätekonfiguration** (die Client-Geräte-ID, die Verbindung, an die sie gebunden ist, und verbindungsspezifische Einstellungen), ihre Sensoren und Sensormappings sowie Sensortemplates; Sensordaten **verlauf und zuletzt gesehen** Werte lesen; Connector-Definitionen lesen und Verbindungen verwalten; Dashboards und Widgets lesen und verwalten; Organisations-, Mitgliedschafts- und Abonnementdaten lesen; Automatisierungs- **Regeldefinitionen zusammen mit ihren Versionen und Builds lesen und verwalten**; und **Gerätebefehle** definieren und ausführen, um Hardware zu steuern.

Für typisierte Service-zu-Service- oder On-Premises-Integrationen siehe [gRPC-API](/kilo-docs-de/kilo-iot-server/api/grpc-api.md).

## Arbeitsablauf

1. Erstellen Sie einen Schlüssel mit eingeschränktem Geltungsbereich in [Einstellungen → API-Schlüssel](/kilo-docs-de/kilo-iot-server/settings/api-keys.md) und speichern Sie ihn sicher.
2. Finden Sie die benötigte Operation in der API-Referenz.
3. Rufen Sie sie mit `X-API-Key` und `X-Organization-Id`.
4. Behandeln Sie die standardmäßigen HTTP-Statuscodes und JSON-Antworten.

Ein minimaler authentifizierter Aufruf befindet sich in [Beispiele](/kilo-docs-de/kilo-iot-server/api/examples.md).

## Siehe auch

* [gRPC-API](/kilo-docs-de/kilo-iot-server/api/grpc-api.md) — wenn typisierte Clients oder Service-zu-Service-Aufrufe besser passen.
* [Authentifizierung & API-Schlüssel](/kilo-docs-de/kilo-iot-server/api/authentication-and-api-keys.md)
* [API-Schlüssel](/kilo-docs-de/kilo-iot-server/settings/api-keys.md) — Schlüssel erstellen und verwalten.


---

# 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://docs.kiloiot.io/kilo-docs-de/kilo-iot-server/api/public-rest-api.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.
