borgwarehouse icon indicating copy to clipboard operation
borgwarehouse copied to clipboard

Repo API with Token key

Open rarrais opened this issue 11 months ago • 3 comments

The possibility to access the API for repository management with an API_KEY (similar to the existing CRONJOB_KEY) would open up automation possibilities for managing repositories (e.g., automatically adding new repositories; refreshing the SSH Public Key of an already configured repository).

In the proposed scenario, the existing credentials-based authentication would still be supported, but augmented with an alternative (token key-based) method.

The main reason for the request is that I would like to start working on an Ansible module similar to those found at this collection, and managing the CSRF-based authentication of Auth.js through Python was turning out to be an impossible task (at least for me).

rarrais avatar Mar 10 '24 11:03 rarrais

Ansible Collection making use of the changes proposed in #180:

rarrais avatar Mar 11 '24 00:03 rarrais

Hi!

I'm using BorgWarehouse and I'm liking it so far. I'd like to have some kind of daily report about the status of the Borg repositories.

I've seen that I can get the status of the repositories with the endpoint {borgwarehouse_url}/api/repo. I'm not sure how I can authenticate and I guess that this change would make it easier for me instead of authenticating via NextAuth.js. If this gets merged, I could just use the newly created API_KEY variable.

Also, I could read the repo.json file from the config directory, but I would prefer using the API.

Any suggestions?

deved99 avatar Jun 21 '24 17:06 deved99

It's coming soon :

image

Ravinou avatar Jul 22 '24 09:07 Ravinou