diff --git a/mapping-tools/examples.http b/mapping-tools/examples.http index 92ecd67..e9ea79d 100644 --- a/mapping-tools/examples.http +++ b/mapping-tools/examples.http @@ -9,7 +9,7 @@ # EZS_CONCURRENCY=1 npx ezs -v -d . # Trouver l'Institut du CNRS associé à une structure de recherche -POST http://localhost:31976/v1/rnsr/instituts-cnrs/json?indent=true HTTP/1.1 +POST https://mapping-tools.services.inist.fr/v1/rnsr/instituts-cnrs/json?indent=true HTTP/1.1 Content-Type: application/json [ @@ -19,7 +19,7 @@ ### # Trouver l'idRef associé au halAuthorId (format LODEX) -POST http://localhost:31976/v1/halAuthorId/idRef/json?indent=true HTTP/1.1 +POST https://mapping-tools.services.inist.fr/v1/halAuthorId/idRef/json?indent=true HTTP/1.1 Content-Type: application/json [ @@ -30,7 +30,7 @@ ### # Trouver l'ORCID associé à l'IdRef (format LODEX) -POST http://localhost:31976/v1/idRef/orcid/json?indent=true HTTP/1.1 +POST https://mapping-tools.services.inist.fr/v1/idRef/orcid/json?indent=true HTTP/1.1 Content-Type: application/json [ @@ -41,7 +41,7 @@ ### # Homogénéiser la forme d'une source de notice -POST http://localhost:31976/v1/homogenize/source/json?indent=true HTTP/1.1 +POST https://mapping-tools.services.inist.fr/v1/homogenize/source/json?indent=true HTTP/1.1 Content-Type: application/json [ @@ -54,7 +54,7 @@ ### # Homogénéiser la forme des éditeurs -POST http://localhost:31976/v1/homogenize/publisher/json?indent=true HTTP/1.1 +POST https://mapping-tools.services.inist.fr/v1/homogenize/publisher/json?indent=true HTTP/1.1 Content-Type: application/json [ @@ -68,7 +68,7 @@ ### # Homogénéiser les types de documents -POST http://localhost:31976/v1/homogenize/documentType/json?indent=true HTTP/1.1 +POST https://mapping-tools.services.inist.fr/v1/homogenize/documentType/json?indent=true HTTP/1.1 Content-Type: application/json [ diff --git a/mapping-tools/tests.http b/mapping-tools/tests.http new file mode 100644 index 0000000..92ecd67 --- /dev/null +++ b/mapping-tools/tests.http @@ -0,0 +1,81 @@ +# Ces exemples peuvent être exécutés directement dans VSCode, en utilisant +# l'extension REST Client (humao.rest-client) + +# Pour pouvoir les tester, lancez le serveur, à partir du répertoire +# mapping-tools: +# npx ezs -v -d . + +# Pour chauffer le cache rapidement, utiliser un seul cœur: +# EZS_CONCURRENCY=1 npx ezs -v -d . + +# Trouver l'Institut du CNRS associé à une structure de recherche +POST http://localhost:31976/v1/rnsr/instituts-cnrs/json?indent=true HTTP/1.1 +Content-Type: application/json + +[ + {"id":1, "value": "200919362L"}, + {"id":2, "value": "200112440X"} +] +### + +# Trouver l'idRef associé au halAuthorId (format LODEX) +POST http://localhost:31976/v1/halAuthorId/idRef/json?indent=true HTTP/1.1 +Content-Type: application/json + +[ + { "id":1, "value": "https://data.archives-ouvertes.fr/author/1458607" }, + { "id":2, "value": "https://data.archives-ouvertes.fr/author/1358616" }, + { "id":3, "value": "https://data.archives-ouvertes.fr/author/11165563" } +] +### + +# Trouver l'ORCID associé à l'IdRef (format LODEX) +POST http://localhost:31976/v1/idRef/orcid/json?indent=true HTTP/1.1 +Content-Type: application/json + +[ + { "id":1, "value": "http://www.idref.fr/190260483/id" }, + { "id":2, "value": "http://www.idref.fr/165835257/id" }, + { "id":3, "value": "http://www.idref.fr/182222918/id" } +] +### + +# Homogénéiser la forme d'une source de notice +POST http://localhost:31976/v1/homogenize/source/json?indent=true HTTP/1.1 +Content-Type: application/json + +[ + { "id":1, "value": "101 secrets de l'ADN" }, + { "id":2, "value": "101 secrets de l’ADN." }, + { "id":3, "value": "101 secrets de l’ADN. CNRS Éditions, Paris, pp 114-116" }, + { "id":4, "value": "« Gilets jaunes » Hypothèses sur un mouvement" }, + { "id":5, "value": "Bon sang!" } +] +### + +# Homogénéiser la forme des éditeurs +POST http://localhost:31976/v1/homogenize/publisher/json?indent=true HTTP/1.1 +Content-Type: application/json + +[ + { "id":1, "value": "Springer" }, + { "id":2, "value": "Springer Verlag" }, + { "id":3, "value": "John Wiley and Sons" }, + { "id":4, "value": "Wiley-Blackwell: No OnlineOpen" }, + { "id":5, "value": "Elsevier Science inc" }, + { "id":6, "value": "A&M Editions 17" } +] +### + +# Homogénéiser les types de documents +POST http://localhost:31976/v1/homogenize/documentType/json?indent=true HTTP/1.1 +Content-Type: application/json + +[ + { "id":1, "value": "ART" }, + { "id":2, "value": "Biography" }, + { "id":3, "value": "Congress" }, + { "id":4, "value": "News" }, + { "id":5, "value": "Technical Report" } +] +###