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 [tutorial](https://dataverse-guide--11201.org.readthedocs.build/en/11201/container/running/demo.html#root-collection-customization-alias-name-etc) on running Dataverse in Docker has been updated to explain how to configure the root collection using a JSON file. See also #10541 and #11201.
A new /api/datasets/{id}/deleteFiles call has beed added to the API, allowing delete of multiple file from the latest version of a dataset in one operation.
Added a new query param, ``returnChildCount``, to getDataverse endpoint(``/api/dataverses/<ID>``) for optionally retrieving the child count, which represents the number of dataverses, datasets, or files within the dataverse.
If you want to include the child count of the Dataverse, which represents the number of dataverses, datasets, or files within the dataverse, you must set ``returnChildCount`` query parameter to ``true``.
curl -H "X-Dataverse-key:$API_TOKEN" -X PUT "$SERVER_URL/api/datasets/:persistentId/deleteFiles?persistentId=$PERSISTENT_IDENTIFIER" \
3568
+
-H "Content-Type: application/json" \
3569
+
-d '{"fileIds": [1, 2, 3]}'
3570
+
3571
+
The fully expanded example above (without environment variables) looks like this:
3572
+
3573
+
.. code-block:: bash
3574
+
3575
+
curl -H "X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -X PUT "https://demo.dataverse.org/api/datasets/:persistentId/deleteFiles?persistentId=doi:10.5072/FK2ABCDEF" \
3576
+
-H "Content-Type: application/json" \
3577
+
-d '{"fileIds": [1, 2, 3]}'
3578
+
3579
+
The ``fileIds``in the JSON payload should be an array of file IDs that you want to delete from the dataset.
3580
+
3581
+
You must have the appropriate permissions to delete files from the dataset.
3582
+
3583
+
Upon success, the API will return a JSON response with a success message and the number of files deleted.
3584
+
3585
+
The API call will report a 400 (BAD REQUEST) error if any of the files specified do not exist or are not in the latest version of the specified dataset.
3586
+
The ``fileIds``in the JSON payload should be an array of file IDs that you want to delete from the dataset.
Copy file name to clipboardExpand all lines: doc/sphinx-guides/source/container/running/demo.rst
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,8 @@ To stop the containers hit ``Ctrl-c`` (hold down the ``Ctrl`` key and then hit t
29
29
30
30
To start the containers, run ``docker compose up``.
31
31
32
+
.. _starting-over:
33
+
32
34
Deleting Data and Starting Over
33
35
-------------------------------
34
36
@@ -46,6 +48,8 @@ Starting Fresh
46
48
47
49
For this exercise, please start fresh by stopping all containers and removing the ``data`` directory.
48
50
51
+
.. _demo-persona:
52
+
49
53
Creating and Running a Demo Persona
50
54
+++++++++++++++++++++++++++++++++++
51
55
@@ -137,6 +141,29 @@ In the example below of configuring :ref:`:FooterCopyright` we use the default u
137
141
138
142
One you make this change it should be visible in the copyright in the bottom left of every page.
139
143
144
+
Root Collection Customization (Alias, Name, etc.)
145
+
+++++++++++++++++++++++++++++++++++++++++++++++++
146
+
147
+
Before running ``docker compose up`` for the first time, you can customize the root collection by placing a JSON file in the right place.
148
+
149
+
First, in the "demo" directory you created (see :ref:`demo-persona`), create a subdirectory called "config":
150
+
151
+
``mkdir demo/config``
152
+
153
+
Next, download :download:`dataverse-complete.json <../../_static/api/dataverse-complete.json>` and put it in the "config" directory you just created. The contents of your "demo" directory should look something like this:
154
+
155
+
.. code-block:: bash
156
+
157
+
% find demo
158
+
demo
159
+
demo/config
160
+
demo/config/dataverse-complete.json
161
+
demo/init.sh
162
+
163
+
Edit ``dataverse-complete.json`` to have the values you want. You'll want to refer to :ref:`update-dataverse-api` in the API Guide to understand the format. In that documentation you can find optional parameters as well.
164
+
165
+
To test your JSON file, run ``docker compose up``. Again, this only works when you are running ``docker compose up`` for the first time. (You can always start over. See :ref:`starting-over`.)
0 commit comments