-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add search exposed config endpoint #240
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
{ | ||
|
@@ -21,5 +22,39 @@ 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 | ||
**/api/config/properties/search/isExposed** | ||
|
||
The supported parameters are: | ||
* page, size [see pagination](README.md#Pagination) | ||
|
||
This endpoint returns all exposed configuration variables. | ||
|
||
For example: | ||
|
||
```json | ||
[{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we need to follow the usual HAL format for resource collections having an embedded with the pagination information |
||
"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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should be an empty list but still 200. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not completely sure about the path
isExposed
but I'm not against it. Just adding this comment to share my thought. It was looking strange to me at a first look but I haven't found any direction in our naming convention https://github.com/DSpace/RestContract?tab=readme-ov-file#on-the-naming-of-endpointsI found that we have a lot of diversity in the way that search methods have been named so far