Support Query Parameters for Backend Systems #56
juliapampus
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As discussed with @jpieperbeck and @ronjaquensel.
Problem: Most APIs are based on specific query parameters for API calls. There is a need for connecting an IDS connector to such parameter-driven data souces. Contrary to how the DSC currently works, it is rather non-economical to create one IDS resource per one possible access url (including fixed query parameters). Instead, the data consumer must be able to somehow "control" the backend API of the provider within its data request.
Target implementation (first draft):
The data provider has to add an endpoint description to the resource. Therfore, we will use the
ids:EndpointDocumentation
attribute ofids:Endpoints
. Problem with this approach: Theids:EndpointDocumentation
describes a resource's connector endpoint, which is not the actual underlying endpoint of the backend system. This raises the question of whether the API description is correctly placed at this point. In addition, the API description has to be accessible to the consumer somewhere. For a first implementation, this will be ignored.The source object needs a documentation attribute that is mapped at
IdsUtils::getAsResource
for the ids communication.The data consumer passes query parameters and headers within an
ArtifactRequestMessage
as a key-value-map. Currently, the payload is empty, so we can easily use it. A request could possibly look as follows:@RequestBody
atRequestController::requestArtifact
. Pass it as payload to theArtifactMessageService
when sending the message.ArtifactMessageHandler
need to read the payload and pass it to theResourceService
to then implement its interpretation atHttpUtils::sendHttpsGetRequest
. Either check for query parameters or add an extra source type in advance.Beta Was this translation helpful? Give feedback.
All reactions