Push (planned)
Push tokens and scheduled pushes with end-to-end encrypted payloads. Planned for stage 6.
Planned (stage 6); 501 unsupported until then. UnifiedPush (ntfy) on Android, APNs on iOS, FCM optional.
pluginTokenAuthorizationBearer <token>Token from POST /v1/auth/token (10 minutes, one device + one plugin + services). Channel owner endpoints require the token of the device and plugin that opened the channel.
application/json- body
kind*string"unifiedpush""apns""fcm"token*string1 <= length <= 2048Registered.
application/json- response
ok*booleancurl -X POST 'https://cloud.example.org/v1/push/tokens' \ -H 'Content-Type: application/json' \ -d '{ "kind": "unifiedpush", "token": "string"}'{ "ok": true}Planned (stage 6); 501 unsupported until then. The payload is an envelope: the server learns the time only. At most 100 pending schedules.
pluginTokenAuthorizationBearer <token>Token from POST /v1/auth/token (10 minutes, one device + one plugin + services). Channel owner endpoints require the token of the device and plugin that opened the channel.
application/json- body
at*MsUnix time in milliseconds.
0 <= valuepayload*XChaCha20-Poly1305 sealed JSON. n = 24-byte random nonce, c = ciphertext ‖ 16-byte tag. Open it with open() from @pku-harness/cloud-protocol and validate the result.
The schedule id.
application/json- response
id*string1 <= lengthcurl -X POST 'https://cloud.example.org/v1/push/schedule' \ -H 'Content-Type: application/json' \ -d '{ "at": 0, "payload": { "v": 1, "n": "string", "c": "stringstringstringstri" }}'{ "id": "string"}Planned (stage 6); 501 unsupported until then.
pluginTokenAuthorizationBearer <token>Token from POST /v1/auth/token (10 minutes, one device + one plugin + services). Channel owner endpoints require the token of the device and plugin that opened the channel.
application/json- body
id*string1 <= lengthCancelled.
application/json- response
ok*booleancurl -X DELETE 'https://cloud.example.org/v1/push/schedule' \ -H 'Content-Type: application/json' \ -d '{ "id": "string"}'{ "ok": true}