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 24.0.11

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 24.0.11
File Size Uploaded
bareos_restapi-24.0.11.tar.gz 42.1 kB Details

Built distribution (wheel)

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

Total release size: 83.7 kB

Release files / bareos_restapi-24.0.11.tar.gz

Download URL bareos_restapi-24.0.11.tar.gz
Size 42.1 kB
Tags Source
SHA-256 checksum
How to use checksums
40f1d92fa9d7c8b5feb0371431a228d15cf3606e4bffb7a24092801a58d6e08e
BLAKE2b-256 checksum
How to use checksums
89e881a6183518f15e2b08e4dae60f14bf25a18cb91428ca809a9afe9135c1bc
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-24.0.11-py3-none-any.whl

Download URL bareos_restapi-24.0.11-py3-none-any.whl
Size 41.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
17fc6b654a01619df634ad0ae0573dc74b4b3c528b88ea94f37c0b088e3c1f58
BLAKE2b-256 checksum
How to use checksums
e0fd29611fce7768c80c4142ed264c8cbdae19a1285eb5c5d85c318c48ca4d0a
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

25.0.2

2 release files

This release

24.0.11 This release

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