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/jsonAnfrage-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
| field | type | |
|---|---|---|
ciphertext | string (base64) | Verschlüsselter Inhalt (Base64), erstellt mit AES-256-GCM |
iv | string (base64, 12 B) | Initialisierungsvektor (Base64), 12 Byte |
keyHash | string (base64, 32 B) | SHA-256-Hash des Schlüssels (Base64), wird vom Server zur Verifizierung gespeichert |
isOneTime | boolean | Wenn true, wird die Notiz nach erstem Aufruf gelöscht |
expirationMinutes | number | Minuten bis zum Ablauf (nur bei isOneTime=false) |
creatorEmail | string (optional) | Optionale Absender-Mail (Klartext) |