From b080823aaa99efa736fe4481c37fff65494f6bcb Mon Sep 17 00:00:00 2001 From: Pete Meyer Date: Sat, 28 Apr 2018 15:32:09 -0400 Subject: [PATCH 1/3] initial docs for create facet API --- doc/sphinx-guides/source/api/native-api.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst index 42f70c1bd8d..a659a52d73d 100644 --- a/doc/sphinx-guides/source/api/native-api.rst +++ b/doc/sphinx-guides/source/api/native-api.rst @@ -72,6 +72,15 @@ List Facets Configured for a Dataverse GET http://$SERVER/api/dataverses/$id/facets?key=$apiKey +Set Facets for a Dataverse +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Assign search facets for a given dataverse with alias ``$alias`` + +``curl -H "X-Dataverse-key: $apiKey" -X POST "http://$server/api/dataverses/$alias/facets --upload-file facets.json`` + +Where ``facets.json`` contains a JSON encoded list of metadata keys (e.g. ``["title","subtitle"]``). + Create a New Role in a Dataverse ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From e2c0a63df8a4ec0d4a86263b6ddf6554da2ce2e2 Mon Sep 17 00:00:00 2001 From: Pete Meyer Date: Mon, 30 Apr 2018 16:34:53 -0400 Subject: [PATCH 2/3] remove unpaired quote in url --- doc/sphinx-guides/source/api/native-api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst index a659a52d73d..751ded4330c 100644 --- a/doc/sphinx-guides/source/api/native-api.rst +++ b/doc/sphinx-guides/source/api/native-api.rst @@ -77,7 +77,7 @@ Set Facets for a Dataverse Assign search facets for a given dataverse with alias ``$alias`` -``curl -H "X-Dataverse-key: $apiKey" -X POST "http://$server/api/dataverses/$alias/facets --upload-file facets.json`` +``curl -H "X-Dataverse-key: $apiKey" -X POST http://$server/api/dataverses/$alias/facets --upload-file facets.json`` Where ``facets.json`` contains a JSON encoded list of metadata keys (e.g. ``["title","subtitle"]``). From 095cfce5e2118a52433b11c97701487e183c71df Mon Sep 17 00:00:00 2001 From: Pete Meyer Date: Mon, 30 Apr 2018 16:45:24 -0400 Subject: [PATCH 3/3] example now uses metadata fields that are actually facetable --- doc/sphinx-guides/source/api/native-api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst index 751ded4330c..d2a2c1a795b 100644 --- a/doc/sphinx-guides/source/api/native-api.rst +++ b/doc/sphinx-guides/source/api/native-api.rst @@ -79,7 +79,7 @@ Assign search facets for a given dataverse with alias ``$alias`` ``curl -H "X-Dataverse-key: $apiKey" -X POST http://$server/api/dataverses/$alias/facets --upload-file facets.json`` -Where ``facets.json`` contains a JSON encoded list of metadata keys (e.g. ``["title","subtitle"]``). +Where ``facets.json`` contains a JSON encoded list of metadata keys (e.g. ``["authorName","authorAffiliation"]``). Create a New Role in a Dataverse ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~