RADAR-base / RADAR-RestApi

RESTful interface to access near real-time data
Apache License 2.0
2 stars 0 forks source link

Resolve get subjects issue #43

Closed yatharthranjan closed 7 years ago

yatharthranjan commented 7 years ago

This PR is to resolve the issue #33 and is in accordance with the guidelines specified in #42

Some major changes are as follows-

The following endpoints are active-

The following have been implemented but do not provided intended results because of this issue of MP issue 18. Once this issue is resolved, this should work.

A separate endpoint (/mp) has been created for exposing data retrieved from the MP for now. This can later be merged into (/api) Here {id} of subject in Rest-API = {login} of subject in MP All of this data is retrieved from the MP and handled and exposed through REST-API.

yatharthranjan commented 7 years ago

@dennyverbeeck I understand what you are saying but the data fetched from MP needs to be formatted in Rest API to make it consistent. For example, the login in MP is subjectId in Rest API. Also the data fetched from MP is just of the subjects. This information will be used by the REST API to query the MongoDb for more results using the subject data received from MP. This is just to get subject information from MP so that the Rest API does not use the find() query on MongoDb as it is not performant. The requirement here is not to just output the data from MP endpoint. We also want to process it and use it for other purposes. What do you think?

dennyverbeeck commented 7 years ago

Aha ok, there were always discussions about 'forwarding requests to MP', i did not know there were requirements to translate some of the properties as well. Ok never mind then :smile: Btw, not sure if you know about it but, all the way at the bottom of the Readme for MP there is a small section on generating a complete client for MP automatically. Sorry if you didn't know about it, i didn't realize it. But it can be useful moving forward!

yatharthranjan commented 7 years ago

@dennyverbeeck I saw the client after someone mentioned it in a meeting, but by then I had already implemented this. We can look into it when we need more functionality but for now I think this PR should suffice. Thanks for the feedback. The client seems really helpful 👍

afolarin commented 7 years ago

@blootsvoets if you have a spare moment could you please review this one.