Add API examples

ticket-769
Vadim vtroshchinskiy 2024-09-19 19:47:07 +02:00
parent 2927d374c8
commit 32394a6690
1 changed files with 15 additions and 0 deletions

View File

@ -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