You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the following small tweaks proposed by Phil, and convert the old style API docs to the new style with environment variables.
pdurbin@beamish dataverse % git diff --word-diff doc
diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst
index b16ea55bd2..9725602df4 100644
--- a/doc/sphinx-guides/source/api/native-api.rst
+++ b/doc/sphinx-guides/source/api/native-api.rst
@@ -5853,7 +5853,7 @@ Saved Search
~~~~~~~~~~~~
The Saved Search, Linked Dataverses, and Linked Datasets features are only accessible to superusers except for linking a dataset. The following API endpoints were added to help people with access to the "admin" API make use of these features in their current form. Keep in mind that they are partially experimental.
The update of all saved search is run by a timer once a week (See :ref:`saved-search-timer`) so if you just created a saved search, you can run manually {+the+} ``makelinks`` endpoint that will find new dataverses and datasets that match the saved search and then link the search results to the dataverse in which the saved search is defined.
List all saved searches. ::
@@ -5865,7 +5865,7 @@ List a saved search by database id. ::
Delete a saved search by database id.
The ``unlink=true`` query parameter unlinks all links (linked dataset or Dataverse collection) associated with the deleted saved search. Use of this parameter should be well considered as you cannot know if the links were created manually or by the saved search. After deleting a saved search with ``unlink=true``, we recommend running ``/makelinks/all`` just in case there was a dataset that was linked by another saved search. (Saved searches can link the same dataset.) Reindexing might be necessary as [-well.::-]{+well. ::+}
DELETE http://$SERVER/api/admin/savedsearches/$id?unlink=true
pdurbin@beamish dataverse % git diff src
diff --git a/src/main/java/edu/harvard/iq/dataverse/api/SavedSearches.java b/src/main/java/edu/harvard/iq/dataverse/api/SavedSearches.java
index 33a11a2df2..e6519c9ff3 100644
--- a/src/main/java/edu/harvard/iq/dataverse/api/SavedSearches.java
+++ b/src/main/java/edu/harvard/iq/dataverse/api/SavedSearches.java
@@ -181,7 +181,7 @@ public class SavedSearches extends AbstractApiBean {
try {
wasDeleted = savedSearchSvc.delete(doomedId, unlink);
} catch (Exception e) {
- return error(INTERNAL_SERVER_ERROR, "Problem while trying to unlink links of saved search id " + doomedId);
+ return error(INTERNAL_SERVER_ERROR, "Problem while trying to unlink links of saved search id " + doomedId + ". Exception: " + e.getLocalizedMessage());
}
if (wasDeleted) {
diff --git a/src/test/java/edu/harvard/iq/dataverse/api/SavedSearchIT.java b/src/test/java/edu/harvard/iq/dataverse/api/SavedSearchIT.java
index 90357596c2..cdcd92d930 100644
--- a/src/test/java/edu/harvard/iq/dataverse/api/SavedSearchIT.java
+++ b/src/test/java/edu/harvard/iq/dataverse/api/SavedSearchIT.java
@@ -22,7 +22,7 @@ public class SavedSearchIT {
@BeforeAll
public static void setUpClass() {
-
+ RestAssured.baseURI = UtilIT.getRestAssuredBaseUri();
}
@AfterAll
@@ -52,6 +52,7 @@ public class SavedSearchIT {
createDatasetResponse2.prettyPrint();
Integer datasetId2 = UtilIT.getDatasetIdFromResponse(createDatasetResponse2);
+ // TODO: put all these methods in UtilIT
// missing body
Response resp = RestAssured.given()
.contentType("application/json")
pdurbin@beamish dataverse %
The text was updated successfully, but these errors were encountered:
Following this PR :
Add the following small tweaks proposed by Phil, and convert the old style API docs to the new style with environment variables.
The text was updated successfully, but these errors were encountered: