diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst index 94c74c1b9d5..0287e0d1dff 100644 --- a/doc/sphinx-guides/source/api/native-api.rst +++ b/doc/sphinx-guides/source/api/native-api.rst @@ -21,9 +21,11 @@ Create a Dataverse ~~~~~~~~~~~~~~~~~~ Generates a new dataverse under ``$id``. Expects a JSON content describing the dataverse, as in the example below. -If ``$id`` is omitted, a root dataverse is created. ``$id`` can either be a dataverse id (long) or a dataverse alias (more robust). :: +If ``$id`` is omitted, a root dataverse is created. ``$id`` can either be a dataverse id (long) or a dataverse alias (more robust). In the example below, "root" is the id, which means that the dataverse will be created as a child of the root dataverse:: - POST http://$SERVER/api/dataverses/$id?key=$apiKey +``export id=root` + +``curl -H "X-Dataverse-key:$API_TOKEN" -X POST $SERVER_URL/api/dataverses/$id --upload-file dataverse-complete.json`` Download the :download:`JSON example <../_static/api/dataverse-complete.json>` file and modified to create dataverses to suit your needs. The fields ``name``, ``alias``, and ``dataverseContacts`` are required. The controlled vocabulary for ``dataverseType`` is diff --git a/src/main/resources/db/migration/V4.14.0.1__5822-export-var-meta.sql b/src/main/resources/db/migration/V4.14.0.1__5822-export-var-meta.sql index 7c43ac29d4d..e65f52c7c91 100644 --- a/src/main/resources/db/migration/V4.14.0.1__5822-export-var-meta.sql +++ b/src/main/resources/db/migration/V4.14.0.1__5822-export-var-meta.sql @@ -1,2 +1,2 @@ ALTER TABLE variablemetadata -ADD COLUMN postquestion text; +ADD COLUMN IF NOT EXISTS postquestion text;