Documentation on V8 REST API

New home Forums Pro Add-on General queries Documentation on V8 REST API

This topic contains 4 replies, has 2 voices, and was last updated by  Perry 3 weeks ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #56012

    boatsRus
    Member

    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?

    #56013

    Perry
    Moderator

    Hi Hakan

    We don’t have any formal documentation, but if you go to your wp-json endpoint 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/v1 in the Network panel there, you’ll be able to inspect the outgoing REST requests.

    Does that help?

    Kind regards
    – Perry

    #56015

    boatsRus
    Member

    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?

    #56016

    boatsRus
    Member

    To access it from an external system (over HTTP), do you know which plugins I would need?

    #56139

    Perry
    Moderator

    Hi Hakan

    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?

    Kind regards
    – Perry

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.