Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note: you will need to have jq installed. 


curl

...

-H

...

X-Dataverse-key:$API_TOKEN

...

"https://borealisdata.ca/api/search?q=*&subtree=$ALIAS&type=dataset&metadata_fields=citation:datasetContact&per_page=1000"

...

 |

...

jq

...

 '.data.items[]'

...

|

...

jq

...

'{'id':'.global_id',

...

'email':'.metadataBlocks.citation.fields[].value[].datasetContactEmail.value',

...

'name':'.metadataBlocks.citation.fields[].value[].datasetContactName.value',

...

'affiliation':'.metadataBlocks.citation.fields[].value[].datasetContactAffiliation.value'

...

}'

Bulk Uploading

When used in a script, API commands can be combined or used within loop structures to bulk upload data, such as multiple files within a folder. One example of this can be seen in this script, which can be used to create multiple datasets at a time within a collection.

...