# mapping-tools Ce service permet de remplacer des valeurs selon une table de correspondance. Pour l'instant, il n'y a qu'une table, celle faisant correspondre des identifiants RNSR à un ou plusieurs institut(s) du CNRS. ## Configuration Il faut préciser dans le fichier de configuration de l'instance qu'elle utilise les paquets node: - `@ezs/basics` - `@ezs/analytics` Et jusqu'à `@ezs/analytics@1.16.4`, il faut ajouter `node-object-hash@2.3.10`. Exemple: ```json { "packages": [ "@ezs/analytics@1.16.4", "@ezs/basics@1.14.0", "node-object-hash@2.3.10" ] } ``` ## Utilisation - [v1/rnsr/instituts-cnrs/json](#v1%2frnsr%2finstituts-cnrs%2fjson) ### v1/rnsr/instituts-cnrs/json Prend en entrée du JSON avec deux champs: `id` et `value`, et renvoie un JSON avec un institut du CNRS dans le champ `value`. > **Remarque**: quand on ne trouve pas d'institut, la valeur est `n/a` (*not > available*) #### Paramètres de v1/rnsr/instituts-cnrs/json | nom | description | | :----- | :--------------------------------------------------------------------- | | indent | `true` ou `false`, indente le JSON résultat ou non (`true` par défaut) | #### Exemple ```bash $ cat <<EOF | curl -X POST --data-binary @- "https://mapping-tools.services.inist.fr/v1/rnsr/instituts-cnrs/json?indent=true" [{ "id": 1, "value": "200919362L" }, { "id": 2, "value": "200112440X"}] EOF ``` Sortie ```json [{ "id": 1, "value": "INEE" }, { "id": 2, "value": "STIC" }] ```