API in action from two sites, one using the other data

44 views
Skip to first unread message

Dean D. Babic

unread,
Nov 17, 2023, 4:27:50 AM11/17/23
to Jam.py Users Mailing List
Hi, 
to demonstrate how can we get values from one site and use it on another, 
here is what we can do from ie. command line first:

curl -k https://msaccess.pythonanywhere.com/ext/expenses -d "[]" -H  "Content-Type: application/json"

This will reply with the result. So we know that work ok.
However, what if we need to use that exact value on some other Jam 
application?

If is very easy. Have a look at:

on Catalogs/API, by click on button "Fetch from API", the "Value" will fetch Actual Amount from above link and present it on the view.

It will even nicely display the error if the other site is down.

So what you can do is download both sites Export, run one on port 8080 and second on 8081, and change the endpoint to http://127.0.0.1:8081/ext (if 8081 is the msaccess app from where we fetching the Actual Amount).

Enjoy

Reply all
Reply to author
Forward
0 new messages