Business Page API

LocalUpgrade’s JSON API allows you to retrieve and manipulate business login content using HTTP requests.

There are two main goals:

  • Provide a simple, consistent external interface who retrieving login whois.
  • Create a stable, understandable internal implementation of logins.

Status: OK
Version: 1.1.1
Controller: Core

Requests use a simple REST-style HTTP GET or POST. To invoke the API, include a non-empty query value for json in the URL.

JSON API operates in two modes:

Implicit mode is triggered by setting the json query var to a non-empty value on any page. The content that would normally appear on that page is returned in JSON format.

Explicit mode is triggered by setting json to a known method string. Request methods for a complete method listing.

Implicit mode examples:

http://localupgrade.com/?json=1
http://localupgrade.com/?p=40&json=1
http://localupgrade.com/tag/lookup/?json=1

Explicit mode examples:

http://localupgrade.com/?json=get_recent_posts
http://localupgrade.com/?json=get_post&post_id=40
http://localupgrade.com/?json=get_tag_posts&tag_slug=security

User-friendly:

http://localupgrade.com/api/get_recent_posts/
http://localupgrade.com/api/get_post/?post_id=40
http://localupgrade.com/api/get_tag_posts/?tag_slug=security

The 1.0 release of the LocalUpgrade JSON API introduces a modular controller system. This allows developers to flexibly add features to their own application and give users more control over which methods they have enabled.