Skip to content

Commit

Permalink
updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenwinship committed Feb 26, 2024
1 parent 00a3331 commit 58e765a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
@@ -1,6 +1,3 @@
The API endpoint `api/harvest/clients/{harvestingClientNickname}` has been extended to include the following fields:

`AllowHarvestingMissingCVV` setting to enable/disable allowing datasets to be harvested with Controlled Vocabulary Values that existed in the originating Dataverse Project but are not in the harvesting Dataverse Project.
The default value of this setting is false/no which will cause the harvesting of the dataset to fail.
By activating this feature (true/yes) the value in question will be removed from the list of values and the dataset will be harvested without the missing value.

`curl http://localhost:8080/api/admin/settings/:AllowHarvestingMissingCVV -X PUT -d yes`
- `allowHarvestingMissingCVV`: enable/disable allowing datasets to be harvested with Controlled Vocabulary Values that existed in the originating Dataverse Project but are not in the harvesting Dataverse Project. Default is false.
6 changes: 4 additions & 2 deletions doc/sphinx-guides/source/api/native-api.rst
Expand Up @@ -4423,7 +4423,8 @@ The following optional fields are supported:
- set: The OAI set on the remote server. If not supplied, will default to none, i.e., "harvest everything".
- style: Defaults to "default" - a generic OAI archive. (Make sure to use "dataverse" when configuring harvesting from another Dataverse installation).
- customHeaders: This can be used to configure this client with a specific HTTP header that will be added to every OAI request. This is to accommodate a use case where the remote server requires this header to supply some form of a token in order to offer some content not available to other clients. See the example below. Multiple headers can be supplied separated by `\\n` - actual "backslash" and "n" characters, not a single "new line" character.
- allowHarvestingMissingCVV: flag to allow datasets to be harvested with Controlled Vocabulary Values that existed in the originating Dataverse Project but are not in the harvesting Dataverse Project. (Default is false)
Generally, the API will accept the output of the GET version of the API for an existing client as valid input, but some fields will be ignored. For example, as of writing this there is no way to configure a harvesting schedule via this API.
An example JSON file would look like this::
Expand All @@ -4436,7 +4437,8 @@ An example JSON file would look like this::
"archiveDescription": "Moissonné depuis la collection LMOPS de l'entrepôt Zenodo. En cliquant sur ce jeu de données, vous serez redirigé vers Zenodo.",
"metadataFormat": "oai_dc",
"customHeaders": "x-oai-api-key: xxxyyyzzz",
"set": "user-lmops"
"set": "user-lmops",
"allowHarvestingMissingCVV":true
}
Something important to keep in mind about this API is that, unlike the harvesting clients GUI, it will create a client with the values supplied without making any attempts to validate them in real time. In other words, for the `harvestUrl` it will accept anything that looks like a well-formed url, without making any OAI calls to verify that the name of the set and/or the metadata format entered are supported by it. This is by design, to give an admin an option to still be able to create a client, in a rare case when it cannot be done via the GUI because of some real time failures in an exchange with an otherwise valid OAI server. This however puts the responsibility on the admin to supply the values already confirmed to be valid.
Expand Down

0 comments on commit 58e765a

Please sign in to comment.