Skip to content

Commit ae83c27

Browse files
committed
add docs #8944
1 parent 2a87ae5 commit ae83c27

File tree

2 files changed

+35
-6
lines changed

2 files changed

+35
-6
lines changed

doc/sphinx-guides/source/admin/metadatacustomization.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,12 +386,16 @@ Metadata Block Setup
386386

387387
Now that you understand the TSV format used for metadata blocks, the next step is to attempt to make improvements to existing metadata blocks or create entirely new metadata blocks. For either task, you should have a Dataverse Software development environment set up for testing where you can drop the database frequently while you make edits to TSV files. Once you have tested your TSV files, you should consider making a pull request to contribute your improvement back to the community.
388388

389+
.. _exploring-metadata-blocks:
390+
389391
Exploring Metadata Blocks
390392
~~~~~~~~~~~~~~~~~~~~~~~~~
391393

392-
In addition to studying the TSV files themselves you might find the following highly experimental and subject-to-change API endpoints useful to understand the metadata blocks that have already been loaded into your Dataverse installation:
394+
In addition to studying the TSV files themselves you will probably find the :ref:`metadata-blocks-api` API helpful in getting a structured dump of metadata blocks in JSON format.
395+
396+
There are also a few older, highly experimental, and subject-to-change API endpoints under the "admin" API documented below but the public API above is preferred.
393397

394-
You can get a dump of metadata fields (yes, the output is odd, please open a issue) like this:
398+
You can get a dump of metadata fields like this:
395399

396400
``curl http://localhost:8080/api/admin/datasetfield``
397401

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

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3007,22 +3007,47 @@ The fully expanded example above (without environment variables) looks like this
30073007
30083008
curl https://demo.dataverse.org/api/info/apiTermsOfUse
30093009
3010+
.. _metadata-blocks-api:
3011+
30103012
Metadata Blocks
30113013
---------------
30123014
3015+
See also :ref:`exploring-metadata-blocks`.
3016+
30133017
Show Info About All Metadata Blocks
30143018
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30153019
3016-
|CORS| Lists brief info about all metadata blocks registered in the system::
3020+
|CORS| Lists brief info about all metadata blocks registered in the system.
3021+
3022+
.. code-block:: bash
3023+
3024+
export SERVER_URL=https://demo.dataverse.org
3025+
3026+
curl $SERVER_URL/api/metadatablocks
3027+
3028+
The fully expanded example above (without environment variables) looks like this:
3029+
3030+
.. code-block:: bash
30173031
3018-
GET http://$SERVER/api/metadatablocks
3032+
curl https://demo.dataverse.org/api/metadatablocks
30193033
30203034
Show Info About Single Metadata Block
30213035
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30223036
3023-
|CORS| Return data about the block whose ``identifier`` is passed. ``identifier`` can either be the block's id, or its name::
3037+
|CORS| Return data about the block whose ``identifier`` is passed, including allowed controlled vocabulary values. ``identifier`` can either be the block's database id, or its name (i.e. "citation").
3038+
3039+
.. code-block:: bash
3040+
3041+
export SERVER_URL=https://demo.dataverse.org
3042+
export IDENTIFIER=citation
3043+
3044+
curl $SERVER_URL/api/metadatablocks/$IDENTIFIER
3045+
3046+
The fully expanded example above (without environment variables) looks like this:
3047+
3048+
.. code-block:: bash
30243049
3025-
GET http://$SERVER/api/metadatablocks/$identifier
3050+
curl https://demo.dataverse.org/api/metadatablocks/citation
30263051
30273052
.. _Notifications:
30283053

0 commit comments

Comments
 (0)