Commit 38e95b9e authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Flux inscription administrative : doc

parent 03c62cad
Loading
Loading
Loading
Loading
+24 −7
Original line number Diff line number Diff line
@@ -6,11 +6,11 @@ Flux Inscriptions administratives (Pégase => SyGAL)

### Configuration

- SyGAL
#### SyGAL

Inscrire dans sygal/config/users.htpasswd le couple login:password du compte étant autorisé à consommer l’API de SyGAL.

- Pégase
#### Pégase

Configurer l’URL de l’API de SyGAL (ex : https://sygal-test.normandie-univ.fr/api/v1), le compte utilisateur et son mot 
de passe. 
@@ -18,6 +18,23 @@ Cf. doc utilisateur Pégase sur le contrôle du cursus "PC-SCOL_FORM_COC_V28.doc
cycle et les différents paramétrages nécessaires.


### Pré-requis

#### SyGAL

Noter le nom de l'instance Pégase d'où proviendront les inscriptions administratives (ex : 'pilote-unicaen-6c1f7') 
et créer dans la base de données de SyGAL la source de données correspondante *en l'associant à l'établissement
d'inscription concerné*, exemple :
```sql
insert into source(code, libelle, importable, etablissement_id)
select 'pilote-unicaen-6c1f7', 'Pégase UCN', true, e.id from etablissement e where source_code = 'UCN';
```

#### Pégase

Cf. doc Pégase !


### Envoi d’une IA de Pégase vers SyGAL

Cf. doc Pégase !
@@ -33,13 +50,13 @@ Exemple :
```bash
curl \
--no-progress-meter \
--insecure 
-H "Accept: application/json" 
-H "Content-Type: application/json" 
-H "Authorization: Basic cGVnYXNlOmF6ZXJ0eQ==" 
--insecure \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Basic cGVnYXNlOmF6ZXJ0eQ==" \
-X POST \
--data-binary "@json/inscr-admin-PEGASE_UCN-286615046.json" \
-b XDEBUG_SESSION=PHPSTORM \
--data-binary "@resources/admission_inexistante/inscr-admin-PEGASE_UCN-286615046.json" \
https://localhost:8003/api/v1/inscription-administrative
```