oggit/api_server
Vadim vtroshchinskiy 442324659c Add branches and tags creation endpoints 2025-04-23 08:43:34 +02:00
..
blueprints Add branches and tags creation endpoints 2025-04-23 08:43:34 +02:00
debian Debian packaging 2025-04-16 00:00:13 +02:00
README.md Add README 2025-03-31 10:25:57 +02:00
api_server.py Fixes for running under gunicorn 2025-04-15 23:59:07 +02:00
install_deps.sh Fixes for running under gunicorn 2025-04-15 23:59:07 +02:00
opengnsys-repository-api.service Debian packaging 2025-04-16 00:00:13 +02:00

README.md

API Server

api_server.py is a Flask script that loads and executes Flask blueprints from the blueprints directory.

Currently it's intended to combine oggit and ogrepository.

Usage

Ubuntu 24.04

 sudo apt install -y python3-flask python3-paramiko opengnsys-flask-executor opengnsys-flask-restx

The opengnsys-flask-executor and opengnsys-flask-restx packages are available on the OpenGnsys package server.

Run with:

./api_server.py

Operation

Requirements

The gitapi is designed to run within an existing opengnsys environment. It should be installed in an ogrepository.

API Examples

Get list of branches

$ curl -L http://localhost:5000/repositories/linux/branches
{
    "branches": [
        "master"
    ]
}

Synchronize with remote repository

curl --header "Content-Type: application/json" --data  '{"remote_repository":"foobar"}' -X POST -L http://localhost:5000/repositories/linux/sync