hi saif sheikh ,
lets start how to consume ApI in very simple way then we work in big apis.
lets try to consume the API .
1. we need the url of xyz api , i have this (https://catfact.ninja/fact). first Try in any browser ,is it working well or not.
if it returns ({"fact":"A cat's normal pulse is 140-240 beats per minute, with an average of 195.","length":73}) means it is working.
2. lets consume it now.
1. go to Logic tab >> Rest
2. right click and select consume api >> Add single method
3. new API window will open for url , make sure method should be GET and copy the url{https://catfact.ninja/fact}
4. and click on test see the response must be 200/ok
5. click on copy to body. and finish.
6. copy the response for dataaction output.(logic portion is done).
7. now in Interface tab,fetch data action. which is having one output , now copy the response here, and delete the pre output.
8. now follow as given image below and set the values.
9. after that drag and drop the fact to the screen.
10 . at last make one client Action to refresh the dataaction as given in Image.