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
The Schema.org metadata export and the schema.org metadata embedded in dataset pages has been updated to improve compliance with Schema.org's schema and Google's recommendations.
2
+
3
+
Backward compatibility - the "citation"/"text" key has been replaced by a "citation"/"name" key.
### Support for cleaning up files in datasets' storage
2
+
3
+
Experimental feature: the leftover files stored in the Dataset storage location that are not in the file list of that Dataset, but are named following the Dataverse technical convetion for dataset files, can be removed with the new native API call [Cleanup storage of a Dataset](https://guides.dataverse.org/en/latest/api/native-api.html#cleanup-storage-api).
Copy file name to clipboardexpand all lines: doc/sphinx-guides/source/admin/harvestclients.rst
+2
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,8 @@ Clients are managed on the "Harvesting Clients" page accessible via the :doc:`da
21
21
22
22
The process of creating a new, or editing an existing client, is largely self-explanatory. It is split into logical steps, in a way that allows the user to go back and correct the entries made earlier. The process is interactive and guidance text is provided. For example, the user is required to enter the URL of the remote OAI server. When they click *Next*, the application will try to establish a connection to the server in order to verify that it is working, and to obtain the information about the sets of metadata records and the metadata formats it supports. The choices offered to the user on the next page will be based on this extra information. If the application fails to establish a connection to the remote archive at the address specified, or if an invalid response is received, the user is given an opportunity to check and correct the URL they entered.
23
23
24
+
Note that as of 5.13, a new entry "Custom HTTP Header" has been added to the Step 1. of Create or Edit form. This optional field can be used to configure this client with a specific HTTP header to be added to every OAI request. This is to accommodate a (rare) use case where the remote server may require a special token of some kind in order to offer some content not available to other clients. Most OAI servers offer the same publicly-available content to all clients, so few admins will have a use for this feature. It is however on the very first, Step 1. screen in case the OAI server requires this token even for the "ListSets" and "ListMetadataFormats" requests, which need to be sent in the Step 2. of creating or editing a client. Multiple headers can be supplied separated by `\\n` - actual "backslash" and "n" characters, not a single "new line" character.
The dataset id can be extracted from the response retrieved from the API which uses the persistent identifier (``/api/datasets/:persistentId/?persistentId=$PERSISTENT_IDENTIFIER``).
750
749
@@ -1513,6 +1512,38 @@ The fully expanded example above (without environment variables) looks like this
This is an experimental feature and should be tested on your system before using it in production.
1521
+
Also, make sure that your backups are up-to-date before using this on production servers.
1522
+
It is advised to first call this method with the ``dryrun`` parameter set to ``true`` before actually deleting the files.
1523
+
This will allow you to manually inspect the files that would be deleted if that parameter is set to ``false`` or is omitted (a list of the files that would be deleted is provided in the response).
1524
+
1525
+
If your Dataverse installation has been configured to support direct uploads, or in some other situations,
1526
+
you could end up with some files in the storage of a dataset that are not linked to that dataset directly. Most commonly, this could
1527
+
happen when an upload fails in the middle of a transfer, i.e. if a user does a UI direct upload and leaves the page without hitting cancel or save,
1528
+
Dataverse doesn't know and doesn't clean up the files. Similarly in the direct upload API, if the final /addFiles call isn't done, the files are abandoned.
1529
+
1530
+
All the files stored in the Dataset storage location that are not in the file list of that Dataset (and follow the naming pattern of the dataset files) can be removed, as shown in the example below.
curl -H "X-Dataverse-key: $API_TOKEN" -X GET "$SERVER_URL/api/datasets/:persistentId/cleanStorage?persistentId=$PERSISTENT_ID&dryrun=$DRYRUN"
1540
+
1541
+
The fully expanded example above (without environment variables) looks like this:
1542
+
1543
+
.. code-block:: bash
1544
+
1545
+
curl -H X-Dataverse-key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -X GET https://demo.dataverse.org/api/datasets/:persistentId/cleanStorage?persistentId=doi:10.5072/FK2/J8SJZB&dryrun=true
1546
+
1516
1547
Adding Files To a Dataset via Other Tools
1517
1548
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1518
1549
@@ -2060,6 +2091,77 @@ The response is a JSON object described in the :doc:`/api/external-tools` sectio
2060
2091
Files
2061
2092
-----
2062
2093
2094
+
Get JSON Representation of a File
2095
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2096
+
2097
+
.. note:: Files can be accessed using persistent identifiers. This is done by passing the constant ``:persistentId`` where the numeric id of the file is expected, and then passing the actual persistent id as a query parameter with the name ``persistentId``.
2098
+
2099
+
Example: Getting the file whose DOI is *10.5072/FK2/J8SJZB*:
The file id can be extracted from the response retrieved from the API which uses the persistent identifier (``/api/datasets/:persistentId/?persistentId=$PERSISTENT_IDENTIFIER``).
2164
+
2063
2165
Adding Files
2064
2166
~~~~~~~~~~~~
2065
2167
@@ -3339,7 +3441,8 @@ The following optional fields are supported:
3339
3441
- archiveDescription: What the name suggests. If not supplied, will default to "This Dataset is harvested from our partners. Clicking the link will take you directly to the archival source of the data."
3340
3442
- set: The OAI set on the remote server. If not supplied, will default to none, i.e., "harvest everything".
3341
3443
- style: Defaults to "default" - a generic OAI archive. (Make sure to use "dataverse" when configuring harvesting from another Dataverse installation).
3342
-
3444
+
- 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.
3445
+
3343
3446
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.
3344
3447
3345
3448
An example JSON file would look like this::
@@ -3351,6 +3454,7 @@ An example JSON file would look like this::
3351
3454
"archiveUrl": "https://zenodo.org",
3352
3455
"archiveDescription": "Moissonné depuis la collection LMOPS de l'entrepôt Zenodo. En cliquant sur ce jeu de données, vous serez redirigé vers Zenodo.",
Copy file name to clipboardexpand all lines: doc/sphinx-guides/source/developers/documentation.rst
+2
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,8 @@ That's it! Thank you for your contribution! Your pull request will be added manu
22
22
23
23
Please see https://github.com/IQSS/dataverse/pull/5857 for an example of a quick fix that was merged (the "Files changed" tab shows how a typo was fixed).
24
24
25
+
Preview your documentation changes which will be built automatically as part of your pull request in Github. It will show up as a check entitled: `docs/readthedocs.org:dataverse-guide — Read the Docs build succeeded!`. For example, this PR built to https://dataverse-guide--9249.org.readthedocs.build/en/9249/.
26
+
25
27
If you would like to read more about the Dataverse Project's use of GitHub, please see the :doc:`version-control` section. For bug fixes and features we request that you create an issue before making a pull request but this is not at all necessary for quick fixes to the documentation.
Copy file name to clipboardexpand all lines: doc/sphinx-guides/source/index.rst
+1-1
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
Dataverse Documentation v. |version|
7
7
====================================
8
8
9
-
These documentation guides are for the |version| version of Dataverse. To find guides belonging to previous versions, :ref:`guides_versions` has a list of all available versions.
9
+
These documentation guides are for the |version| version of Dataverse. To find guides belonging to previous or future versions, :ref:`guides_versions` has a list of all available versions.
0 commit comments