beautypg.com

Gethardware(callbackfunction) – Grandstream GXP2200 GMI Web Service Guide User Manual

Page 7

background image

GXP2200 GMI WEB SERVICE GUIDE V1.0

Page 6 of 38

HTTP Request

• url: "http://"+ ip + "/manager?"
• action: "pn"
• format: "json"
• jsoncallback: "?" (This is the HTTP request for the call back function, usually used in

AJAX and JQuery)

• For example:

http://192.168.121.230/manager?action=pn&format=json&jsoncallback=?

Return

1. HTTP request return:
• Return successful

"{"res": "success", "pn": "9620001902A"}"

• Return failed

"{"res": "error", "msg" : "can't get pn version"}"

2. callbackFunction(data) will process the data returned from HTTP request

4. getHardware(callbackFunction)

Description

Retrieve GXP2200 Hardware version

Parameters

callbackFunction: Call back function

HTTP Request

• url: "http://"+ ip + "/manager?"
• action: "hardware"
• format: "json"
• jsoncallback: "?" (This is the HTTP request for the call back function, usually used

in AJAX and JQuery)

For example:

http://192.168.121.230/manager?action=hardware&format=json&jsoncallback=?

Return

1. HTTP request return:

Return successful

"{"res": "success", "hardware": "V2.0A"}"

Return failed

"{"res": "error", "msg" : "can't get hardware version"}"

2. callbackFunction(data) will process the data returned from HTTP request