-
Notifications
You must be signed in to change notification settings - Fork 491
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'IQSS/develop' into DANS/bag-ore-updates
- Loading branch information
Showing
16 changed files
with
216 additions
and
1,462 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Implemented the following new endpoints: | ||
|
||
- getZipDownloadLimit (/api/info/zipDownloadLimit): Get the configured zip file download limit. The response contains the long value of the limit in bytes. | ||
|
||
- getMaxEmbargoDurationInMonths (/api/info/settings/:MaxEmbargoDurationInMonths): Get the maximum embargo duration in months, if available, configured through the database setting :MaxEmbargoDurationInMonths. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
========== | ||
API Design | ||
========== | ||
|
||
API design is a large topic. We expect this page to grow over time. | ||
|
||
.. contents:: |toctitle| | ||
:local: | ||
|
||
Paths | ||
----- | ||
|
||
A reminder `from Wikipedia <https://en.wikipedia.org/wiki/Uniform_Resource_Identifier>`_ of what a path is: | ||
|
||
.. code-block:: bash | ||
userinfo host port | ||
┌──┴───┐ ┌──────┴──────┐ ┌┴┐ | ||
https://[email protected]:123/forum/questions/?tag=networking&order=newest#top | ||
└─┬─┘ └─────────────┬────────────┘└───────┬───────┘ └────────────┬────────────┘ └┬┘ | ||
scheme authority path query fragment | ||
Exposing Settings | ||
~~~~~~~~~~~~~~~~~ | ||
|
||
Since Dataverse 4, database settings have been exposed via API at http://localhost:8080/api/admin/settings | ||
|
||
(JVM options are probably available via the Payara REST API, but this is out of scope.) | ||
|
||
Settings need to be exposed outside to API clients outside of ``/api/admin`` (which is typically restricted to localhost). Here are some guidelines to follow when exposing settings. | ||
|
||
- When you are exposing a database setting as-is: | ||
|
||
- Use ``/api/info/settings`` as the root path. | ||
|
||
- Append the name of the setting including the colon (e.g. ``:DatasetPublishPopupCustomText``) | ||
|
||
- Final path example: ``/api/info/settings/:DatasetPublishPopupCustomText`` | ||
|
||
- If the absence of the database setting is filled in by a default value (e.g. ``:ZipDownloadLimit`` or ``:ApiTermsOfUse``): | ||
|
||
- Use ``/api/info`` as the root path. | ||
|
||
- Append the setting but remove the colon and downcase the first character (e.g. ``zipDownloadLimit``) | ||
|
||
- Final path example: ``/api/info/zipDownloadLimit`` | ||
|
||
- If the database setting you're exposing make more sense outside of ``/api/info`` because there's more context (e.g. ``:CustomDatasetSummaryFields``): | ||
|
||
- Feel free to use a path outside of ``/api/info`` as the root path. | ||
|
||
- Given additional context, append a shortened name (e.g. ``/api/datasets/summaryFieldNames``). | ||
|
||
- Final path example: ``/api/datasets/summaryFieldNames`` | ||
|
||
- If you need to expose a JVM option (MicroProfile setting) such as ``dataverse.api.allow-incomplete-metadata``: | ||
|
||
- Use ``/api/info`` as the root path. | ||
|
||
- Append a meaningful name for the setting (e.g. ``incompleteMetadataViaApi``). | ||
|
||
- Final path example: ``/api/info/incompleteMetadataViaApi`` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.