simple-login / app

The SimpleLogin back-end and web app
https://simplelogin.io
GNU Affero General Public License v3.0
4.9k stars 413 forks source link

Undocumented API Endpoints #1367

Open csfore opened 1 year ago

csfore commented 1 year ago

Prerequisites

Bug report

Describe the bug

While looking through the API code, I discovered some undocumented endpoints.

Mailbox Endpoints

There are two undocumented API endpoints: /mailboxes and /v2/mailboxes, here, that use a GET method and are not mentioned in the mailbox documentation.

Settings Endpoints

In the Settings endpoint, /setting/unlink_proton_account using DELETE is undocumented. /setting/domains is also undocumented.

Notification Endpoint

There is a typo in the documentation that uses /notifications/<int:notification_id> when in the code it uses /notifications/<int:notification_id>/read.

Misc Endpoints

The endpoint /apple/update_notification (POST) is undocumented.

Expected behavior Example JSON structures and appropriate headers for the endpoints in the documentation.

Screenshots Undocumented Mailbox endpoint: image Undocumented Settings endpoint: image Notification Endpoint Typo: image

nguyenkims commented 1 year ago

@csfore some endpoints are indeed quite specific to the SaaS version and aren't useful for a self hosting instance and that's why they aren't documented. For example, the /apple/update_notification endpoint is only useful for the Apple in-app purchase integration or /setting/unlink_proton_account is only used in the SimpleLogin-Proton integration.