aiidateam / team-compass

A repository for storing the AiiDA team roadmap
https://team-compass.readthedocs.io
MIT License
0 stars 0 forks source link

Usability: Make it possible to interact with an AiiDA instance over a web API #16

Open sphuber opened 1 year ago

sphuber commented 1 year ago

Motivation

AiiDA provides an extensive Python API, which is the main way to interact with the system. In addition, there is the verdi CLI for quick access over the command line. While both APIs provide in most required use-cases, they require direct access to the machine where the AiiDA instance is running. However, there are use-cases where direct access is either not possible or not desirable. In these cases, it would be useful to provide a web API to allow interaction with an AiiDA instance over the HTTP protocol.

There are a number of use-cases known that would benefit from a web API:

Desired Outcome

Ideally, there should be a single stable well-supported (official) web API that allows users to interact with an AiiDA instance over HTTP.

Impact

There are already a number of known use-cases of a web API that each have a considerable number of (in)direct users. Consolidating existing solutions into a single stable solution would benefit everyone and would reduce development and maintenance cost in the long-term.

Complexity

The main challenges in realizing this project consist of:

Progress

The aiida-core package already ships with a REST API implementation. However, this is read-only and does not support requests that mutate the state of a profile storage. The aiida-restapi has implemented a web API that does allow mutations, but it currently mixes two approaches: a REST API implemented using fastapi and a web API using GraphQL.

Concrete action points: