From 5bd815b386574eef04d8e7950cc8911725bd9688 Mon Sep 17 00:00:00 2001 From: gaetanbrl Date: Fri, 2 Aug 2024 11:03:24 +0200 Subject: [PATCH] Start doc services --- docs-manager-back/README.md | 50 +++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/docs-manager-back/README.md b/docs-manager-back/README.md index 72eb2d2..d311aa8 100644 --- a/docs-manager-back/README.md +++ b/docs-manager-back/README.md @@ -293,6 +293,56 @@ Now restart security-proxy service: sudo service restart tomcat@proxycas ``` +# Services + +Services code source is available [here](https://github.com/jdev-org/docs-manager/blob/main/docs-manager-back/src/main/java/org/georchestra/docsmanager/controller/FilesController.java). + +This section will details services. + +- Upload a file + +| TYPE | URL | Param | ALLOWED ROLES | +|------|------------------|-------------------------------------------------|----------------------------| +| POST | /plugin/{plugin} | Plugin: `` - Plugin's code (e.g CARTEAUX) | writers + admins | + +JSON Body params : +``` +{ + file: ``, + comment: ``, + label: ``, + dateDoc: ``, + status: ``, + entity: `` +} +``` + +- Get all files or all files by field's values + +| TYPE | URL | Param | ALLOWED ROLES | +|------|------------------|-------------------------------------------------|----------------------------| +| GET | /all | | admins | + + +- Get all files by application (plugin) code + +| TYPE | URL | Param | ALLOWED ROLES | +|------|------------------|-------------------------------------------------|----------------------------| +| GET | /plugin/{plugin} | Plugin: `` - Plugin's code (e.g CARTEAUX) | writers + readers + admins | + + +- Get verification to controle that a document exists + +| TYPE | URL | Param | ALLOWED ROLES | +|--------|-----------------------|----------------------------------------------------------------------------------|----------------------------| +| GET | /label/exists/{label} | label: `` - label to search | * | + +- Delete a file + +| TYPE | URL | Param | ALLOWED ROLES | +|--------|-----------------------|----------------------------------------------------------------------------------|----------------------------| +| DELETE | /plugin/{plugin}/{id} | pluginPlugin: `` - Plugin's code (e.g CARTEAUX)
id: file's ID to delete | writers + admins | + # Developper corner TODO