Skip to content

Commit e66421f

Browse files
committed
doc updates
1 parent f0635e3 commit e66421f

File tree

4 files changed

+22
-20
lines changed

4 files changed

+22
-20
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## Get Dataset/Dataverse Storage Driver API
2+
3+
### Changed Json response - breaking change!
4+
5+
The API for getting the Storage Driver info has been changed/extended.
6+
/api/datasets/{identifier}/storageDriver
7+
/api/admin/dataverse/{dataverse-alias}/storageDriver
8+
Rather tha returning just the name/id of the driver (with the key "message"), the api call now returns a JSONObject with the driver's "name", "type" and "label", and booleas indicating whether the driver has "directUpload", "directDownload", and/or "uploadOutOfBand" enabled.
9+
10+
This change also affects the /api/admin/dataverse/{dataverse-alias}/storageDriver api call. In addition, this call now supports an optional ?getEffective=true to find the effective storageDriver (the driver that will be used for new datasets in the collection)
11+
12+
See also [the guides](https://dataverse-guide--11664.org.readthedocs.build/en/11664/api/native-api.html#configure-a-dataset-to-store-all-new-files-in-a-specific-file-store), #11695, and #11664.

doc/release-notes/11695-change-api-get-storage-driver.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

doc/sphinx-guides/source/admin/dataverses-datasets.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,19 @@ To direct new files (uploaded when datasets are created or edited) for all datas
5656

5757
(Note that for ``dataverse.files.store1.label=MyLabel``, you should pass ``MyLabel``.)
5858

59-
The current driver can be seen using::
59+
A store assigned directly to a collection can be seen using::
6060

6161
curl -H "X-Dataverse-key: $API_TOKEN" http://$SERVER/api/admin/dataverse/$dataverse-alias/storageDriver
6262

63-
Or to recurse the chain of parents to find the effective storageDriver::
63+
This may be null. To get the effective storageDriver for a collection, which may be inherited from a parent collection or be the installation default, you can use::
6464

6565
curl -H "X-Dataverse-key: $API_TOKEN" http://$SERVER/api/admin/dataverse/$dataverse-alias/storageDriver?getEffective=true
66+
67+
This will never be null.
6668

67-
(Note that for ``dataverse.files.store1.label=MyLabel``, ``store1`` will be returned.)
69+
(Note that for ``dataverse.files.store1.label=MyLabel``, the JSON response will include "name":"store1" and "label":"MyLabel".)
6870

69-
and can be reset to the default store with::
71+
To delete a store assigned directly to a collection (so that the colllection's effective store is inherted from it's parent or is the global default), use::
7072

7173
curl -H "X-Dataverse-key: $API_TOKEN" -X DELETE http://$SERVER/api/admin/dataverse/$dataverse-alias/storageDriver
7274
@@ -261,15 +263,15 @@ To identify invalid data values in specific datasets (if, for example, an attemp
261263
Configure a Dataset to Store All New Files in a Specific File Store
262264
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
263265

264-
Configure a dataset to use a specific file store (this API can only be used by a superuser) ::
266+
Configure an individual dataset to use a specific file store (this API can only be used by a superuser) ::
265267
266268
curl -H "X-Dataverse-key: $API_TOKEN" -X PUT -d $storageDriverLabel http://$SERVER/api/datasets/$dataset-id/storageDriver
267269
268-
The current driver can be seen using::
270+
The effective store can be seen using::
269271

270272
curl http://$SERVER/api/datasets/$dataset-id/storageDriver
271273

272-
It can be reset to the default store as follows (only a superuser can do this) ::
274+
To remove an assigned store, and allow the dataset to inherit the store from it's parent collection, use the following (only a superuser can do this) ::
273275

274276
curl -H "X-Dataverse-key: $API_TOKEN" -X DELETE http://$SERVER/api/datasets/$dataset-id/storageDriver
275277

doc/sphinx-guides/source/api/changelog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ This API changelog is experimental and we would love feedback on its usefulness.
1010
v6.9
1111
----
1212
- The POST /api/admin/makeDataCount/{id}/updateCitationsForDataset processing is now asynchronous and the response no longer includes the number of citations. The response can be OK if the request is queued or 503 if the queue is full (default queue size is 1000).
13+
- For GET /api/admin/dataverse/{dataverse-alias}/storageDriver and /api/datasets/{identifier}/storageDriver the driver name is no longer returned in data.message. Instead, it is returned as data.name (along with other information about the storageDriver).
1314

1415
v6.8
1516
----
1617

1718
- For POST /api/files/{id}/metadata passing an empty string ("description":"") or array ("categories":[]) will no longer be ignored. Empty fields will now clear out the values in the file's metadata. To ignore the fields simply do not include them in the JSON string.
1819
- For PUT /api/datasets/{id}/editMetadata the query parameter "sourceInternalVersionNumber" has been removed and replaced with "sourceLastUpdateTime" to verify that the data being edited hasn't been modified and isn't stale.
1920
- For GET /api/dataverses/$dataverse-alias/links the Json response has changed breaking the backward compatibility of the API.
20-
- For GET /api/admin/dataverse/{dataverse-alias}/storageDriver and /api/datasets/{identifier}/storageDriver the driver name is no longer returned in data.message. This value is now returned in data.name.
2121
- For PUT /api/dataverses/$dataverse-alias/inputLevels custom input levels that had been previously set will no longer be deleted. To delete input levels send an empty list (deletes all), then send the new/modified list.
2222
- For GET /api/externalTools and /api/externalTools/{id} the responses are now formatted as JSON (previously the toolParameters and allowedApiCalls were a JSON object and array (respectively) that were serialized as JSON strings) and any configured "requirements" are included.
2323

0 commit comments

Comments
 (0)