Basic HTTP Api wrapping the Actual Budget NodeJS api.
Interoperability mostly. Useful for scenarios where you want to interact with your Actual server instance but you can't import a Node.js library (let's say you are using another programming language).
To host this server you can run it either with Node.js or Docker. You will need the following environment variables:
ACTUAL_SERVER_URL: Url of your Actual Budget server instanceACTUAL_SERVER_PASSWORD: Password of your Actual Budget serverAPI_KEY: A string secret used to give access to clients of this API. Unlike typical Api Keys, this one is not used to identify the caller since the basic authorization method of this api doesn't allow multiple api keys, it's just one for every caller. You can generate one however you want, I useapg -m 50 -n 1
To start the server using the local code with Node.js, define your environment variables in the .env file and then run:
npm install
node server.jsOr run the public docker image using docker run command:
docker run -d --name actualhttpapi -v ./data:/data:rw -p 5007:5007 \
-e 'ACTUAL_SERVER_URL=http://localhost:5006/' \
-e 'ACTUAL_SERVER_PASSWORD=my-actual-server-password' \
-e 'API_KEY=my-strong-api-key' \
--restart=on-failure jhonderson/actual-http-api:latestImportant
It's recommended to use a specific docker tag rather than latest. This is because the version of this docker image has to be the same version as the docker image of Actual budget, so if you use latest it may get out of sync. So, use a specific tag for both images, i.e actualbudget/actual-server:25.8.0 and jhonderson/actual-http-api:25.8.0.
Or run it using docker compose:
docker-compose up -dOnce the service is up, see the documentation in http://localhost:5007/api-docs/