Question

REST Service to fetch Multiple records at a time.

Hi all,

I have a requirement like this. I need to select a Disease name from a drop down list in one application and the list of doctors should be fetched from another application using the rest service. I implemented this with the help of Rest service but all i could get is one single record.

For ex : if I select "Heart Diseases", I have to get list of doctors available.. but I could get only one single record since I made the disease a primary key.

Somebody look into this. TIA.

Comments

Keep up to date on this post and subscribe to comments

March 20, 2019 - 5:55pm

Are you creating Service-REST or Connect-REST. Please send screenshots of your rule configuration.

Pega
March 25, 2019 - 2:53pm

Assuming you are creating a suite of REST services, you have:

GET /doctors -> returns a list of doctors, which can be filtered by those with experience against a given disease; you'll probably want other filter criteria as well such as proximity, whether they are accepting new patients, etc.  Filter criteria takes the form of query parameters; i.e. if we are dealing with heart disease the URL would be GET /doctors?disease=heart

GET /doctors/{ID} -> returns details about the specified doctor