Managing Datasets and Dataverses


Delete a Dataverse

Dataverses have to be empty to delete them. Navigate to the dataverse and click “Edit” and then “Delete Dataverse” to delete it. To delete a dataverse via API, see the Native API section of the API Guide.

Move a Dataverse

Moves a dataverse whose id is passed to a new dataverse whose id is passed. The dataverse alias also may be used instead of the id. If the moved dataverse has a guestbook, template, metadata block, link, or featured dataverse that is not compatible with the destination dataverse, you will be informed and given the option to force the move and remove the association. Only accessible to superusers.

curl -H "X-Dataverse-key: $API_TOKEN" -X POST http://$SERVER/api/dataverses/$id/move/$destination-id

Add Dataverse RoleAssignments to Child Dataverses

Recursively assigns the users and groups having a role(s),that are in the set configured to be inheritable via the :InheritParentRoleAssignments setting, on a specified dataverse to have the same role assignments on all of the dataverses that have been created within it. The response indicates success or failure and lists the individuals/groups and dataverses involved in the update. Only accessible to superusers.

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

Configure a Dataverse to store all new files in a specific file store

To direct new files (uploaded when datasets are created or edited) for all datasets in a given dataverse, the store can be specified via the API as shown below, or by editing the ‘General Information’ for a Dataverse on the Dataverse page. Only accessible to superusers.

curl -H "X-Dataverse-key: $API_TOKEN" -X PUT -d $storageDriverLabel http://$SERVER/api/admin/dataverse/$dataverse-alias/storageDriver

The current driver can be seen using:

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

and can be reset to the default store with:

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

The available drivers can be listed with:

curl -H "X-Dataverse-key: $API_TOKEN" http://$SERVER/api/admin/dataverse/storageDrivers


Move a Dataset

Superusers can move datasets using the dashboard. See also Dashboard.

Moves a dataset whose id is passed to a dataverse whose alias is passed. If the moved dataset has a guestbook or a dataverse link that is not compatible with the destination dataverse, you will be informed and given the option to force the move (with forceMove=true as a query parameter) and remove the guestbook or link (or both). Only accessible to users with permission to publish the dataset in the original and destination dataverse.

curl -H "X-Dataverse-key: $API_TOKEN" -X POST http://$SERVER/api/datasets/$id/move/$alias

Mint a PID for a File That Does Not Have One

In the following example, the database id of the file is 42:

export FILE_ID=42
curl http://localhost:8080/api/admin/$FILE_ID/registerDataFile

Mint PIDs for Files That Do Not Have Them

If you have a large number of files, you might want to consider miniting PIDs for files individually using the registerDataFile endpoint above in a for loop, sleeping between each registration:

curl http://localhost:8080/api/admin/registerDataFileAll

Mint a New DOI for a Dataset with a Handle

Mints a new identifier for a dataset previously registered with a handle. Only accessible to superusers.

curl -H "X-Dataverse-key: $API_TOKEN" -X POST http://$SERVER/api/admin/$dataset-id/reregisterHDLToPID

Send Dataset metadata to PID provider

Forces update to metadata provided to the PID provider of a published dataset. Only accessible to superusers.

curl -H "X-Dataverse-key: $API_TOKEN" -X POST http://$SERVER/api/datasets/$dataset-id/modifyRegistrationMetadata

Check for Unreserved PIDs and Reserve Them

See PIDs in the API Guide for details.

Make Metadata Updates Without Changing Dataset Version

As a superuser, click “Update Current Version” when publishing. (This option is only available when a ‘Minor’ update would be allowed.)

Diagnose Constraint Violations Issues in Datasets

To identify invalid data values in specific datasets (if, for example, an attempt to edit a dataset results in a ConstraintViolationException in the server log), or to check all the datasets in the Dataverse for constraint violations, see Dataset Validation in the Native API section of the User Guide.