Skip to content

Commit 12c9ba3

Browse files
committed
Added: docs for listing templates
1 parent 1efcc34 commit 12c9ba3

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,6 +1400,25 @@ The fully expanded example above (without environment variables) looks like this
14001400
14011401
curl -H "X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -X GET "https://demo.dataverse.org/api/access/dataverseFeaturedItemImage/1"
14021402
1403+
List Templates of a Collection
1404+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1405+
1406+
Lists the templates for a given Dataverse collection ``id``:
1407+
1408+
.. code-block:: bash
1409+
1410+
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
1411+
export SERVER_URL=https://demo.dataverse.org
1412+
export ID=1
1413+
1414+
curl -H "X-Dataverse-key:$API_TOKEN" -X GET "$SERVER_URL/api/dataverses/{ID}/templates"
1415+
1416+
The fully expanded example above (without environment variables) looks like this:
1417+
1418+
.. code-block:: bash
1419+
1420+
curl -H "X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -X GET "https://demo.dataverse.org/api/dataverses/1/templates"
1421+
14031422
Datasets
14041423
--------
14051424

0 commit comments

Comments
 (0)