Forum Discussion

Nightingale's avatar
Nightingale
New Member
7 years ago

Dynamically lookup values from external sources

I've been faced with query scenario which I can't quite solve, and I hope the community can help me.

 

I have 2 web endpoints which I need to query to generate a flat dataset.

 

The first a gross list of user IDs, with a URL formatted as:

http://endpoint.local/users/123

And the output as:

["123","456","789"]

 

The second is a dynamic URL which the ID has to be appended to in order to fetch all information related that ID, for example

http://endpoint.local/users/123

And the output would be:

{"id":"123"
"status":"active"
"date":null
"manager":{"id":"456"
"status":"inactive"
"date":"/Date(1560785594000+0000)/"}
"email":"[email protected]"
"country":"Australia"}

 

I'm struggling with 2 things:

 

  1. How to lookup user IDs from the output of the 1st endpoint by dynamically appending each ID to the 2nd endpoint's URL
  2. How to handle nested JSON objects, such as the 'manager' part.

 

Any advice?

1 Reply

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Nightingale ,

     

    1. How to lookup user IDs from the output of the 1st endpoint by dynamically appending each ID to the 2nd endpoint's URL

    Would you please provide more details? If possible, please describe with examples.

     

    Besides, do you want to dynamically load dataset with parameters?

     

    Regards,

    Yuliana Gu