AppFlowy icon indicating copy to clipboard operation
AppFlowy copied to clipboard

[FR] REST API

Open simenfossnes opened this issue 2 years ago • 8 comments

Description

Add a REST API.

Impact

Integration with anything on the web. It's one of the primary reasons to stick to notion these days.

Additional Context

I could help set up an OpenAPI spec file, if interested. Would probably require some help from the people knowing the ins and outs of AppFlowy better than me.

simenfossnes avatar Mar 01 '23 16:03 simenfossnes

How can users benefit from an OpenAPI spec file? @LucasXu0

annieappflowy avatar Mar 02 '23 02:03 annieappflowy

I second this request.

I would like to propose two potential use-cases for feature development:

  1. Local Server with API Support for AppFlowy: I envision a self-hosted server offering an API interface for AppFlowy, enabling the creation of a grid and exposing the properties of the grid as an API endpoint. This could be similar to the CRUD operations provided in Pocketbase. As an initial step, incorporating a CSV import feature for the grids would be quite beneficial. I also believe the incorporation of this feature into the Pages could be feasible and advantageous.

  2. Integration of External APIs into AppFlowy: The capacity to integrate external APIs into AppFlowy would offer extensive utility. If we could store endpoints as well as data mapping into a Page/Grid/etc., it would provide a significant enhancement to the functionality. This would entail recording the authentication method and the response body, which could then be mapped, for example, to properties in a grid.

While I could indeed envision further possibilities, I believe these suggestions provide a substantive yet achievable starting point. It is not my intention to propose overly complex or superfluous features, but rather to advocate for those that could enhance the versatility and efficiency of AppFlowy.

Megajin avatar May 26 '23 11:05 Megajin

cc: @appflowy

annieappflowy avatar May 27 '23 11:05 annieappflowy

I'd like to suggest using grpc there is a bit of a discussion about using it here.

While grpc is a different protocol there are adapters to interop between swagger/openapi and grpc. This would allow using both the extensive ecosystem of client/server generators for grpc as well as the extensive ecosystem of openapi/swagger generators for REST clients/servers.

nathaniel-brough avatar Oct 27 '23 17:10 nathaniel-brough

If #2231 was merged and combined with the adapters, you'd essentially be able to "fake" being the user without needing to use the UI directly. This would be great for things like;

  • Automated task tracking e.g. A pull request get's opened on a repo and a bot creates a kanban card on appflowy.
    • Create new task
    • Move task from doing->done (When PR is merged).

There are a ton of other use-cases to when it comes to automated task tracking.

nathaniel-brough avatar Oct 27 '23 17:10 nathaniel-brough

I have an idea of making an e-ink project,task etc. tracer. So I'm sharing my idea of why API would be beneficial.

Nerd-9000 avatar Jan 22 '24 19:01 Nerd-9000

Any plans to integrate a rest API? or is there any current way of updating fields or getting data / having webhooks to appflowly components?

Zontex avatar May 13 '24 13:05 Zontex