Aquarisma API

Erste Schritte

Vier Schritte bis zum ersten Snapshot. Antworten sind JSON. Zeiten in UTC sind ISO-8601. Ein Futterplan nennt zusätzlich die Zeitzone des Beckens.

  1. Client registrieren. Öffentliche Clients haben kein Secret. Die Redirect-URI muss später exakt dieselbe sein.

    curl -sS -X POST https://aquarisma.com/oauth/register \
      -H "Content-Type: application/json" \
      -d '{"client_name":"Mein Client","redirect_uris":["https://example.com/callback"],"token_endpoint_auth_method":"none"}'
  2. Den Browser auf /oauth/authorize schicken. resource muss https://aquarisma.com/api/v1 sein, code_challenge_method ist S256.

  3. Den Code einmal gegen ein Token tauschen. Der Access-Token gilt 15 Minuten, der Refresh-Token 30 Tage und rotiert.

    curl -sS -X POST https://aquarisma.com/oauth/token \
      -H "Content-Type: application/json" \
      -d '{"grant_type":"authorization_code","code":"CODE","code_verifier":"VERIFIER","redirect_uri":"https://example.com/callback","client_id":"CLIENT","resource":"https://aquarisma.com/api/v1"}'
  4. Den Snapshot lesen. Ohne Konto probierst du zuerst die Sandbox.

    curl -sS -H "Authorization: Bearer $TOKEN" -H "Accept: application/json" \
      https://aquarisma.com/api/v1/integrations/home-assistant/snapshot

Die Sandbox unter /api/v1/sandbox/snapshot schreibt nichts und liest keine Kundendaten.