HQU JSON Web Services

HQU plugins can be invoked from multiple language by responding with JSON data.

Requests are sent to HQ via a regular HTTP request:

curl https://hqadmin:hqadmin@localhost:7443/hqu/myplugin/edator/viewUser.hqu?name=JoeBob

and result in JSON objects:

/* {"Name": "JoeBob", "Id": 32321 }

Easy-returning JSON from controllers

HQU will automatically encode the result of any Controller method into JSON, provided it is set with setJSONMethods(). The result of the action must be a map (key / value pairs), but can contain values of most types.

class EdatorController extends BaseController {
    EdatorController() {
        setJSONMethods(['viewUser', 'newUser'])
    }

    def viewUser(params) {
        def user = myFindUser(params)
        [ Name: user.name, Id: user.id ]
    }

    def newUser(params){ ... }
}

Browse Space

- Pages
- News
- Labels
- Attachments
- Bookmarks
- Mail
- Advanced
- Activity

Explore Confluence

- Popular Labels
- Notation Guide

Your Account

Log In

or Sign Up  

Other Features

Add Content


System Monitoring Software
SourceForge.net Logo