Information about using the api/batch/migrate function call

Skip to first unread message

Janet McDougall - Australian Data Archive

Mar 14, 2017, 9:17:25 PM3/14/17
to Dataverse Users Community
Following my post "Importing Nesstar DDI & data into Dataverse 4x", Marina (webdev) has been testing some tools and has this question:

We have been exploring using different api functions to import our datasets into dataverse.

The GET api/batch/migrate function call looked promising ("Import single or multiple datasets that are in the local filesystem") but there does not seem to be any documentation to indicate the expected structure of the directory to import.

http://hostname:8080/api/batch/migrate?path="path_to_directory"&key="API_KEY"&dv="alias or id"&createDV="FALSE"

This calls the Java method:

class BatchImport getImport()
which eventually calls the class BatchServiceBean processFilePath() and/or the handleDirectory() method(s).


What is the expected import directory structure?
[Is each subdirectory expected to be the name of a dataverse with dataset subdirectories?
Or something different?]

What are the different file formats the function(s) is/are expecting in order to import the files in the correct way? .xml? .txt? etc.

Will a directory's .sav file be ingested as a data file?

We have tried different permutations and keep getting NullPointerExceptions so we would like to know how to use this batch API call.

example (is this correct?):

- top-directory
        - dataset 1
            - datafile
            - extra document 1
            - extra document 2
            - ...
        - dataset 2
            - ...
        - ...
        - dataset n
            - ...

Philip Durbin

Mar 14, 2017, 9:59:13 PM3/14/17
Thanks for the additional information. As I just mentioned in there was some recent chatter on this topic of importing DDI files in but it's not well supported. Maybe some who knows more about how it works can chime in. You're also welcome to email


You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
To view this discussion on the web visit
For more options, visit

Reply all
Reply to author
0 new messages