Skip to main content

Bareos REST API using fastAPI and python-bareos

Experimental and subject to enhancements and changes.

This is an experimental backend for development purposes.

It provides a REST API using fastapi and python-bareos to connect to a Bareos director.

Guide

Installation

We recommend to create a dedicated Python environment for the installation in an own directory:

python3 -m venv env
# Activate the virtual environment inside the directory
source env/bin/activate
# Install dependencies into the virtual environment
pip install bareos-restapi

Note: The optional module sslpsk can be installed manually, if you want encrypted communication between the API and the Bareos director.

Configuration

The module directory contains a sample ini-file. Change into this directory (something like /lib/python3.x/site-packages/bareosRestapiModels on most operating systems) and copy api.ini.sample to api.ini and adapt it to your director. Make sure to generate an own secret-key for the JWT section.

Your director configuration in api.ini should look like:

[Director]
Name=bareos-dir
Address=127.0.0.1
Port=9101

Note: you will need a named console (user/password) to acces the Bareos director using this API. Read more about Consoles here: https://docs.bareos.org/Configuration/Director.html#console-resource

Start the backend server

From inside the module directory run:

uvicorn bareos_restapi:app --reload

Browse

The Swagger UI contains documentation and online-tests. Use "authorize" to connect to your Bareos director using a named console. Read here to learn how to configure a named console: https://docs.bareos.org/Configuration/Director.html#console-resource

The Swagger documentation also contains CURL statements for all available endpoints.

Future work

The API will be extended by some methods provided by the Bareos console, that are not yet implemented. It is also planned to add delete / update options for configuration in the director and REST API. If you are interested in support and / or funding enhancements, please visit https://www.bareos.com

TODO:

  • define and document response model
  • add possibility to connect to a choice of directors
  • add start-script with ini-file name as parameter

Release files for bareos-restapi 25.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bareos-restapi 25.1.1
File Size Uploaded
bareos_restapi-25.1.1.tar.gz 42.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bareos-restapi 25.1.1
File Interpreter ABI Platform
bareos_restapi-25.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 83.7 kB

Release files / bareos_restapi-25.1.1.tar.gz

Download URL bareos_restapi-25.1.1.tar.gz
Size 42.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a0f5025a0628547fff1fe9499829c6fc56349db7c2342332d0012218846a9a9c
BLAKE2b-256 checksum
How to use checksums
2a5b8cf6f1c4c9dd3f7e9817644b600a759aa57b3343f038c17c849a1ec98498
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release files / bareos_restapi-25.1.1-py3-none-any.whl

Download URL bareos_restapi-25.1.1-py3-none-any.whl
Size 41.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d609d46b200943ad6cdbaa357f300b674e8cb5a5ebe6dfde510c41de7354c1ab
BLAKE2b-256 checksum
How to use checksums
92a970fc6ea0bc28afeb90f2ddd037fc8c9929b7746aadbd035c24bf6566f193
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

25.1.1 This release

2 release files

25.0.2

2 release files

24.0.9

2 release files

24.0.7

2 release files

24.0.6

2 release files

24.0.4

2 release files

24.0.3

2 release files

24.0.2

2 release files

24.0.1

2 release files

24.0.0

2 release files

23.1.0

2 release files

23.0.2

2 release files

23.0.1

2 release files

23.0.0

2 release files

22.1.4

2 release files

22.1.3

2 release files

22.1.2

2 release files

22.1.1

2 release files

22.1.0

2 release files

22.0.3

2 release files

22.0.0

2 release files

21.1.9

2 release files

21.1.8

2 release files

21.1.7

2 release files

21.1.6

2 release files

21.1.2

2 release files

21.1.1

2 release files

21.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page