AppFlowy-IO / AppFlowy

Bring projects, wikis, and teams together with AI. AppFlowy is an AI collaborative workspace where you achieve more without losing control of your data. The best open source alternative to Notion.
https://www.appflowy.io
GNU Affero General Public License v3.0
50.2k stars 3.32k forks source link

[FR] REST API #1906

Open simenfossnes opened 1 year ago

simenfossnes commented 1 year ago

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.

annieappflowy commented 1 year ago

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

Megajin commented 1 year ago

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.

annieappflowy commented 1 year ago

cc: @appflowy

silvergasp commented 8 months ago

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.

silvergasp commented 8 months ago

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;

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

Tomas-Kuchta-FPV commented 5 months ago

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.

Zontex commented 1 month ago

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