bisq2 icon indicating copy to clipboard operation
bisq2 copied to clipboard

Implement REST API

Open chimp1984 opened this issue 3 years ago • 4 comments

We got the skeleton/prototype for a REST API (http://167.172.189.9:8080/swagger-ui/). Now we are looking for a developer adding more endpoints and making it production ready. It should come with some useful scripts for demonstrating real life usage (e.g. post a chat message, create a user profile,...).

chimp1984 avatar Apr 22 '22 09:04 chimp1984

I'm interested - started work on that on my rest-api branch.

ghost avatar Apr 22 '22 12:04 ghost

@salokiam has already committed to that task. Was quick...

chimp1984 avatar Apr 22 '22 22:04 chimp1984

Got it, in case of need I'm in reserve

ghost avatar Apr 23 '22 07:04 ghost

As we use now the Rest API for seed and oracle monitoring we should get it into a more clean state.

Tasks:

  • Investigate which framework to use. It should be minimal without large footprint and should avoid boilerplate (current has quite some boilerplate).
  • If we stick to existing get API docs working
  • Decide on how we want to integrate the endpoints and DTOs. Currently its in one app module. Alternative could be to treat the actual domain models as DTOs or place the DTOs there. Drawback might be that we have different use case and the DTOs are often tailored for its custom use case. We do not offer all Java APIs as REST API but only those which are actually needed.

Existing use case: Reporting data for monitoring. The other endpoints have been just added as POC.

Planned used case: Bisq Easy mobile which requests offer date, user profile data and other public network data which is needed for a minimal Bisq Easy version. Furthermore support for private messages and mailbox messages.

Extension: For push messages we should add support for websockets. It is likely an independent tech stack and might only partially overlap with the REST API. That part can be done as a second stage as well, but would be good to have a clear picture of a potential solution.

Tor support: The rough idea for the mobile app is that Tor can be optionally supported at least for Android (iOS tor support is problematic). So the chosen solutions should work well with Tor.

HenrikJannsen avatar Aug 21 '24 14:08 HenrikJannsen