November 14, 2019 at 10:21 am #56012
I would be curious to test accessing the map data from an external app. Do you have documentation on the V8 REST API that you could share?November 14, 2019 at 10:27 am #56013
We don’t have any formal documentation, but if you go to your
wp-jsonendpoint you can see a description of what endpoints are available, for instance https://wpgmaps.com/wp-json
If you’re looking to read marker data you can do so by visiting
/wp-json/wpgmza/v1/markers/, for instance https://wpgmaps.com/wp-json/wpgmza/v1/markers/1234
If you want to see how to do anything specific that our plugin does, for example, category filtering, I’d recommend you go to Maps -> Settings -> Advanced and temporarily enable “Disable Compressed Path Variables”. This will turn off the advanced compression for caching, and allow you to read the request parameters in the Network panel. If you filter on
wpgmza/v1in the Network panel there, you’ll be able to inspect the outgoing REST requests.
Does that help?
– PerryNovember 14, 2019 at 11:11 am #56015
The json endpoint is not exactly human-readable, is there some tool or similar to pretty-print the stuff? And can I extract just maps stuff, the link seemed to include like “everything” you run on your site?November 14, 2019 at 11:15 am #56016
To access it from an external system (over HTTP), do you know which plugins I would need?November 19, 2019 at 9:26 am #56139
I’m really sorry for the delay in responding to this, for some reason this ticket was still marked pending,
There are several Chrome plugins that format JSON in real time, you could also use a tool like Notepad++ with the JSTool plugin to format that.
To see just our endpoints, please visit https://wpgmaps.com/wp-json/wpgmza/v1 or the equivalent URL on your target site.
You can access the API in a variety of ways, you could use an app like Postman for running tests, you could use raw cURL, cURL through PHP, or any HTTP client.
Does that help?
You must be logged in to reply to this topic.