OTN API

Notizen aus einem Skript, CI-Job oder anderen Tool erstellen — über eine einfache REST-API.

Hinweis: Da OTN Ende-zu-Ende verschlüsselt arbeitet, müssen Clients die Verschlüsselung selbst durchführen, bevor sie die Daten an die API senden.

Endpoint

POST https://otn.see-sg.de/api/notes
Content-Type: application/json

Anfrage-Body

{
  "ciphertext":        "<base64 of AES-256-GCM ciphertext+auth-tag>",
  "iv":                "<base64 of 12-byte IV>",
  "keyHash":           "<base64 of SHA-256(rawKey)>",
  "isOneTime":         true,
  "expirationMinutes": null,
  "creatorEmail":      null
}

Antwort

HTTP/1.1 201 Created

{
  "success":   true,
  "uniqueId":  "Ab3-fH7-zQ91",
  "link":      "https://otn.see-sg.de/n/Ab3-fH7-zQ91",
  "expiresAt": null,
  "isOneTime": true
}

Felder

fieldtype
ciphertextstring (base64)Verschlüsselter Inhalt (Base64), erstellt mit AES-256-GCM
ivstring (base64, 12 B)Initialisierungsvektor (Base64), 12 Byte
keyHashstring (base64, 32 B)SHA-256-Hash des Schlüssels (Base64), wird vom Server zur Verifizierung gespeichert
isOneTimebooleanWenn true, wird die Notiz nach erstem Aufruf gelöscht
expirationMinutesnumberMinuten bis zum Ablauf (nur bei isOneTime=false)
creatorEmailstring (optional)Optionale Absender-Mail (Klartext)