Ontwikkelaars
MQTT
Realtime events via MQTT voor integraties met strikte topic-toegang
MQTT biedt pub/sub-toegang tot Tillor-events voor integraties. Credentials maak je aan in Tillor onder Instellingen - Ontwikkelaars (per organisatie). Toegang tot topics is strikt beperkt tot tillor/{env}/{orgId}/integration en sub-topics ({env} = prod, staging of local).
Beheer
| Method | Pad | Beschrijving |
|---|---|---|
| POST | /api/orgs/:orgId/mqtt/credentials | JWT-credentials genereren (tijdelijk) |
| GET | /api/orgs/:orgId/mqtt/static-credentials | Statische credentials ophalen |
| POST | /api/orgs/:orgId/mqtt/static-credentials | Statische credential aanmaken |
| DELETE | /api/orgs/:orgId/mqtt/static-credentials/:id | Statische credential verwijderen |
Authenticatie: x-api-key en X-Tillor-Org-Id (zelfde als HTTP API). Zie de OpenAPI-specificatie voor volledige request- en response-schema's.
Credentials
Er zijn twee varianten:
JWT (tijdelijk)
- Gebruik: Korte sessies, tijdelijke toegang
- Verloop: Token verloopt na 1 minuut tot 24 uur (configureerbaar via
expiresInSeconds) - Ideaal voor: Testen, tijdelijke verbindingen, of wanneer je tokens dynamisch ophaalt
- Aanmaken: In Tillor onder Instellingen - Ontwikkelaars, of via
POST /api/orgs/:orgId/mqtt/credentialsmet optioneel{ "clientId": "...", "expiresInSeconds": 3600 } - Response:
token(gebruik als MQTT-wachtwoord),clientId,brokerUrl,topicPrefix,expiresAt
Statische credentials
- Gebruik: Langlopende integraties, altijd-on verbindingen
- Vorm: Vaste userName, clientId en password
- Ideaal voor: Productie-integraties die continu verbonden blijven
- Aanmaken: In Tillor onder Instellingen - Ontwikkelaars, of via
POST /api/orgs/:orgId/mqtt/static-credentialsmet optioneel{ "name": "mijn-integratie" } - Let op: Het wachtwoord wordt eenmalig in de response getoond en kan daarna niet meer worden opgehaald
Topic-toegang
Topic-subscripties zijn strikt beperkt. Je kunt alleen publiceren en subscriben op tillor/{env}/{orgId}/integration en tillor/{env}/{orgId}/integration/#. Pogingen om andere topics te benaderen worden geweigerd.
- Toegestane topics - Alleen
tillor/{env}/{orgId}/integrationen sub-topics (bijv.tillor/{env}/{orgId}/integration/events) - Geen wildcard-bypass - Zelfs met
#of+krijg je alleen toegang tot je organisatie-namespace - Per organisatie - Credentials zijn per organisatie; je hebt geen toegang tot topics van andere organisaties