8. Web Services
Les web services d’openARIA sont RESTful. Les retours sont au format JSON, encodés en UTF-8.
8.1. Ressource « maintenance »
8.1.1. Synchronisation des utilisateurs via un annuaire
- POST /openaria/services/rest_entry.php/maintenance
Exemple de requête :
POST /openaria/services/rest_entry.php/maintenance HTTP/1.1 Host: localhost { "module": "user" }
Exemple de réponse :
HTTP/1.1 500 Internal Server Error Content-Type: text/javascript { "http_code": 500, "http_code_message": "500 Internal Server Error", "message": "Erreur interne" }
- Status Codes:
200 OK – Tout s’est déroulé correctement.
500 Internal Server Error – Erreur interne.
8.1.2. Synchronisation des voies
- POST /openaria/services/rest_entry.php/maintenance
Exemple de requête :
POST /openaria/services/rest_entry.php/maintenance HTTP/1.1 Host: localhost { "module": "voies", "data" : { "file_name" : "/tmp/synchronsization_voies.csv" } }
8.1.3. Numérisation automatique
- POST /openaria/services/rest_entry.php/maintenance
Exemple de requête :
POST /openaria/services/rest_entry.php/maintenance HTTP/1.1 Host: localhost { "module": "import", "data": { "service": "ACC" // Ces deux paramètres sont facultatifs "Todo" : "chemin_dossier_source", // ou "" pour utiliser le chemin dans la configuration "Done" : "chemin_dossier_destination" // ou "" pour utiliser le chemin dans la configuration } }
8.1.4. Synchronisation des contraintes
- POST /openaria/services/rest_entry.php/maintenance
Exemple de requête :
POST /openaria/services/rest_entry.php/maintenance HTTP/1.1 Host: localhost { "module": "contraintes" }
8.1.5. Gestion des messages asynchrones
- POST /openaria/services/rest_entry.php/maintenance
Exemple de requête :
POST /openaria/services/rest_entry.php/maintenance HTTP/1.1 Host: localhost { "module": "messagesasync" }
8.1.6. Gestion des consultations
- POST /openaria/services/rest_entry.php/maintenance
Exemple de requête :
POST /openaria/services/rest_entry.php/maintenance HTTP/1.1 Host: localhost { "module": "ar_consultation" }
8.2. Ressource « messages »
Cette ressource permet d’interfacer un message.
- POST /openaria/services/rest_entry.php/messages
Cas d’utilisation :
[101](Échange ADS → ERP) Dossier AT Information de qualification ADS
[102](Échange ADS → ERP) Dossier PC/ERP Pré-demande de complétude ERP
[103](Échange ADS → ERP) Dossier PC/ERP Pré-demande de qualification ERP
[104](Échange ADS → ERP) Dossier PC/ERP Consultation officielle pour avis
[105](Échange ADS → ERP) Dossier PC/ERP Information de décision ADS
[106](Échange ADS → ERP) Dossier PC/ERP Consultation officielle pour conformité
[107](Échange ADS → ERP) Dossier PC/ERP Demande de visite d’ouverture
[109](Échange ADS → ERP) Dossier AT Retrait du pétitionnaire
[110](Échange ADS → ERP) Dossier AT Demande de visite d’ouverture
[111](Échange ADS → ERP) Dossier PC/ERP Information de décision Conformité
[112](Échange ADS → ERP) Dossier AT Dépôt de pièce par le pétitionnaire
[113](Échange ADS → ERP) Ajout d’une nouvelle pièce numérisée
[114](Échange ADS → ERP) Dossier PC Notification de dossier à enjeux ADS
Exemple de requête :
POST /openaria/services/rest_entry.php/messages HTTP/1.1 Host: localhost { "type": "Mise à jour de complétude ERP ACC", "date": "16/06/2014 14:12", "emetteur": "John Doe", "dossier_instruction": "PD12R0001", "contenu": { "Complétude ERP ACC": "non", "Motivation Complétude ERP ACC": "Lorem ipsum dolor sit amet..." } }