contribsys / faktory

Language-agnostic persistent background job server
https://contribsys.com/faktory/
Other
5.78k stars 230 forks source link

REST API for UI #473

Closed lukeshumard closed 6 months ago

lukeshumard commented 7 months ago

I was curious if you would be open to a REST API for the UI. I would like to directly integrate parts of Faktory into my project without the need for the current Web UI for operations. I'd also like to create my own version of the UI as a separate package for others to use. I'm happy to author the PR and develop the idea further if you're interested.

I was imagining something like GET /api/busy or GET /api/queues to return the same data present on their respective pages. Similarly, POST /api/queues/:queue_name could pause or clear the queue. The authentication could be similar to the Basic Auth used to access the Web UI.

I've looked through the INFO command which could help with the dashboard data, but getting other data that is in the Web UI isn't accessible unless it's scraped. I had a look at this issue which was asking about something similar.

I've also explored the following options which didn't quite seem to satisfy the requirements. They are all also behind Enterprise.

mperham commented 7 months ago

I'd be interested in hearing more if you want to draw up a firmer plan. Faktory already has the Mutate API but maybe it needs a few extensions for the things you mentioned.

lukeshumard commented 5 months ago

Apologies for the delay on this. Once I have this fleshed out properly with what I'm trying to accomplish, I'll reopen the ticket.