Skip to content

Commit

Permalink
Add search exposed config endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
J4bbi committed Sep 30, 2023
1 parent 128f6bf commit 94f9b1b
Showing 1 changed file with 39 additions and 3 deletions.
42 changes: 39 additions & 3 deletions configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
## 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>**

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
{
Expand All @@ -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
* 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

0 comments on commit 94f9b1b

Please sign in to comment.