Incoming JSON query for data
-
I have a problem which I can’t find any specific answer, so I hope someone can help.
The problem is that I want to create a JSON interface so that an external application can enquire internal data and also update internal data. I’m not interested in searching/creating posts etc.
This is a WP site which uses Gravity Forms and an external MySQL db for the tournament data. It is a Billiards tournament management site and is located at – https://wbeventsonline.com/
The important point is by “internal data” I mean a MySQL db external to the normal WP db. The MySQL db actually sits alongside the WP one, probably same server. PHP code accesses both db’s.
Ex1: The external app wants a list of tournaments from our site. I want to respond to this request and send back something like the data in – https://wbeventsonline.com/?page_id=130 in a JSON object.
Ex2: The external app wants to update the score in a particular match. I want to take the JSON request, extract the data and update our external db with this.
I realise that ex1 is a GET and ex2 an UPDATE operation.
Is there an easy way to implement this ?
I will be most grateful for a helpful reply.
- You must be logged in to reply to this topic.