fossar / selfoss

multipurpose rss reader, live stream, mashup, aggregation web application
https://selfoss.aditu.de
GNU General Public License v3.0
2.36k stars 343 forks source link

/update specs #1357

Open davidoskky opened 2 years ago

davidoskky commented 2 years ago

Hi, I'm sorry about opening an issue just regarding some information about the api, but couldn't find it in the documentation. What are the plausible response of /update? I reckon that if everything works fine you get a successful response containing "finished" Are there other possible response messages?

jtojnar commented 2 years ago

That is completely fine. After all, the API endpoint is not documented, which is either a documentation bug, or an intentional omission.

Both controllers\Sources\Update::updateAll (POST /update) and controllers\Sources\Update::update (POST /source/:sourceId/update) actions only return finished when completed and unallowed access when no user is not logged in and updating sources is not allowed for public. But the later also currently has 200 status code, which is suboptimal.

Ideally, we would also report back errors that occur during updating a single source, and update progress for updating all sources.

jtojnar commented 1 year ago

1428 will add alternative response format to GET /update.