From 32394a66908d6da78ae013037ddbd29e42804974 Mon Sep 17 00:00:00 2001 From: Vadim Troshchinskiy Date: Thu, 19 Sep 2024 19:47:07 +0200 Subject: [PATCH] Add API examples --- api/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/api/README.md b/api/README.md index 3faed5c..955bd2e 100644 --- a/api/README.md +++ b/api/README.md @@ -52,3 +52,18 @@ Se puede generar documentación de Python con una utilidad como pdoc3 (hay multi La gitapi esta diseñada para funcionar dentro de un entorno opengnsys existente. Se debe instalar en un ogrepository. +## Ejemplo de API + +### Obtener lista de ramas + + $ curl -L http://localhost:5000/repositories/linux/branches + { + "branches": [ + "master" + ] + } + +### Sincronizar con repositorio remoto + + curl --header "Content-Type: application/json" --data '{"remote_repository":"foobar"}' -X POST -L http://localhost:5000/repositories/linux/sync +