included scripts for api interaction

This commit is contained in:
Florian Zumpe
2026-06-17 11:41:36 +02:00
parent a697e293cb
commit 3b3069ca8c
16 changed files with 573 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env python3
import argparse
from common import add_common_arguments, ask, client_from_args, run
parser = argparse.ArgumentParser(description="Gelöschte Route wiederherstellen")
add_common_arguments(parser)
parser.add_argument("--route-id", type=int)
args = parser.parse_args()
def action():
client = client_from_args(args)
route_id = ask("Route-ID", args.route_id, required=True, cast=int)
return client.request("POST", f"/api/routes/{route_id}/restore", json_body={})
run(action)