airdcpp-web / airdcpp-webclient

Communal peer-to-peer file sharing application for file servers/NAS devices
https://airdcpp-web.github.io
182 stars 33 forks source link

Filelist and health related endpoints #438

Closed rishighan closed 3 months ago

rishighan commented 1 year ago

Is your feature request related to a problem? Please describe. Not really a problem, as much as it is for integration with an app I am building (ThreeTwo) Based on Discord discussions with @maksis, @nstephenh and @barbequesauce.

Describe the solution you'd like I would like endpoints that do the following:

  1. Send a path to a file and get the existing calculated hash and other information AirDC++ has on the file,
  2. Get a list of all the files AirDC++ knows about
  3. A health check endpoint to indicate that gives health information

Describe alternatives you've considered Specifically around (3) above, I have tried using:

  1. The websocket to infer the "health" of AirDC++, but it isn't an accurate characterization of whether a user is connected to AirDC++ and connected to the hub.
  2. The connection to AirDC++ itself, but I want something that gives me connection to AirDC++ and connection to a hub in one endpoint.
  3. Would like a response such as this:
    { status: "connected", hubs: ["blah", "blah"], uptime: 4000, heartbeat: "ok" }

for this use case:

Within ThreeTwo users can initiate searches on DC++. If AirDC++ is down, I don’t want them to wait until they perform the search to find out. I can simply ping the health check endpoint to update a status icon

Additional context N/A

barbequesauce commented 1 year ago

Link to https://github.com/mylar3/mylar3/projects/2#card-31748066

maksis commented 3 months ago

Share-related endpoints that allow fetching directory/file information by real path have been implemented in https://github.com/airdcpp/airdcpp-windows/commit/3246483d14fcc3165fcacb6589f50e4f6dc7fb5b and will be available in the next release

Docs: https://airdcpp.docs.apiary.io/#reference/share/share-tree

I'll close the issue as the health endpoint isn't related to the share endpoints but feel free to open a new feature request for it