From 94f9b1b3cd33ea50f17e569ac201bf537f08b721 Mon Sep 17 00:00:00 2001 From: Hrafn Malmquist Date: Sat, 30 Sep 2023 01:32:05 +0100 Subject: [PATCH] Add search exposed config endpoint --- configuration.md | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/configuration.md b/configuration.md index 77d70eef..95258373 100644 --- a/configuration.md +++ b/configuration.md @@ -3,7 +3,7 @@ ## Main Endpoint **/api/config/properties** -As we don't have yet an use case to iterate over all the configuration properties the main endpoint is not implemented and a 405 error code is returned according to our [general error response codes](README.md#Error codes). +As we don't have yet an use case to iterate over all the configuration properties the main endpoint is not implemented and a 405 error code is returned according to our [general error response codes](README.md#Error-Codes). ## Single property **/api/config/properties/<:property>** @@ -11,6 +11,7 @@ As we don't have yet an use case to iterate over all the configuration propertie This endpoint provides functionality to retrieve certain (configurable) configuration properties. The DSpace server will have a whitelist of properties that can be retrieved by this endpoint. +For example: ```json { @@ -21,5 +22,40 @@ The DSpace server will have a whitelist of properties that can be retrieved by t } ``` -* 200 OK - if the operation succeed -* 404 Not found - if the property doesn't exist or isn't configured to be retrieved \ No newline at end of file +* 200 OK - if the operation succeeded +* 404 Not found - if the property doesn't exist or isn't configured to be exposed + +## Search methods +### top +**/api/config/properties/search/exposed** + +The supported parameters are: +* page, size [see pagination](README.md#Pagination) + +This endpoint returns all exposed configuration variables. + +For example: + +```json +[{ + "name": "google.analytics.key", + "values": [ + "UA-XXXXXX-X" + ] +}, +{ + "name": "websvc.opensearch.autolink", + "values": [ + true + ] +}, +{ + "name": "orcid.authorize-url", + "values": [ + "https://sandbox.orcid.org/oauth/authorize" + ] +}] +``` + +* 200 OK - if the operation succeeded +* 404 Not found - if no property is configured to be exposed \ No newline at end of file