Skip to content

Commit 459f3f9

Browse files
committed
add JSON example #10520
1 parent 7129936 commit 459f3f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/sphinx-guides/source/api/native-api.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3651,15 +3651,15 @@ With all that said, we'll add a "software" type in the example below. This API e
36513651
36523652
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
36533653
export SERVER_URL=https://demo.dataverse.org
3654-
export JSON='{"name": "software"}'
3654+
export JSON='{"name":"software","linkedMetadataBlocks":["codeMeta20"],"availableLicenses":["MIT", "Apache-2.0"]}'
36553655
36563656
curl -H "X-Dataverse-key:$API_TOKEN" -H "Content-Type: application/json" "$SERVER_URL/api/datasets/datasetTypes" -X POST -d $JSON
36573657
36583658
The fully expanded example above (without environment variables) looks like this:
36593659
36603660
.. code-block:: bash
36613661
3662-
curl -H "X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "Content-Type: application/json" "https://demo.dataverse.org/api/datasets/datasetTypes" -X POST -d '{"name": "software"}'
3662+
curl -H "X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "Content-Type: application/json" "https://demo.dataverse.org/api/datasets/datasetTypes" -X POST -d '{"name":"software","linkedMetadataBlocks":["codeMeta20"],"availableLicenses":["MIT", "Apache-2.0"]}'
36633663
36643664
.. _api-delete-dataset-type:
36653665

0 commit comments

Comments
 (0)