diff --git a/api/swagger.yaml b/api/swagger.yaml index ce258ea..b8bf505 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -2087,6 +2087,203 @@ paths: error: type: string example: "Parameters missing" + /ogrepository/v1/git/repositories/{repository}: + delete: + summary: "Eliminar repositorio" + description: | + Elimina un repositorio de Git + tags: + - "Git" + parameters: + - name: repository + in: path + required: true + type: string + description: "Nombre de repositorio" + responses: + "200": + description: "Repositorio eliminado" + schema: + type: object + properties: + status: + type: string + example: deleted + "404": + description: "Repositorio no encontrado" + schema: + type: object + properties: + status: + type: string + example: not found + "500": + description: "Excepción" + schema: + type: object + properties: + success: + type: boolean + example: false + exception: + type: string + example: "(Exception description)" + + /ogrepository/v1/git/repositories/{repository}/sync: + post: + summary: "Sincronizar con repositorio remoto" + description: | + Sincroniza un repositorio de Git con uno remoto. + tags: + - "Git" + parameters: + - name: repository + in: path + required: true + type: string + description: "Nombre de repositorio" + - name: JSON + in: body + required: true + description: | + * **remote_repository** - Reposition remoto al que hacer push + responses: + "200": + description: "Repositorio en proceso de sincronización" + schema: + type: object + properties: + success: + type: boolean + example: True + output: + type: string + example: "Synchronizing..." + job_id: + type: string + example: "GitSync_02345" + "404": + description: "Repositorio no encontrado" + schema: + type: object + properties: + status: + type: string + example: not found + "500": + description: "Excepción" + schema: + type: object + properties: + success: + type: boolean + example: false + exception: + type: string + example: "(Exception description)" + /ogrepository/v1/git/repositories/{repository}/backup: + post: + summary: "Sincronizar con repositorio remoto" + description: | + Sincroniza un repositorio de Git con uno remoto. + tags: + - "Git" + parameters: + - name: repository + in: path + required: true + type: string + description: "Nombre de repositorio" + - name: JSON + in: body + required: true + description: | + * **ssh_server** - Servidor SSH al que enviar el backup + * **ssh_port** - Puerto del servidor SSH al que enviar el backup + * **ssh_user** - Usuario del servidor SSH al que enviar el backup + * **filename** - Nombre de archivo del backup + responses: + "200": + description: "Repositorio en proceso de sincronización" + schema: + type: object + properties: + success: + type: boolean + example: True + output: + type: string + example: "Backing up..." + job_id: + type: string + example: "GitBackup_02345" + "404": + description: "Repositorio no encontrado" + schema: + type: object + properties: + status: + type: string + example: not found + "500": + description: "Excepción" + schema: + type: object + properties: + success: + type: boolean + example: false + exception: + type: string + example: "(Exception description)" + /ogrepository/v1/git/repositories/{repository}/compact: + post: + summary: "Compactar repositorio" + description: | + Compacta un repositorio de Git para optimizar el rendimiento y liberar espacio + tags: + - "Git" + parameters: + - name: repository + in: path + required: true + type: string + description: "Nombre de repositorio" + responses: + "200": + description: "Repositorio en proceso de compactación" + schema: + type: object + properties: + success: + type: boolean + example: True + output: + type: string + example: "Compacting..." + job_id: + type: string + example: "GitGC_02345" + "404": + description: "Repositorio no encontrado" + schema: + type: object + properties: + status: + type: string + example: not found + "500": + description: "Excepción" + schema: + type: object + properties: + success: + type: boolean + example: false + exception: + type: string + example: "(Exception description)" + /ogrepository/v1/git/repositories/{repository}/tags: get: summary: "Obtener lista de tags"