beautypg.com

Getuptime(callbackfunction), Getpn(callbackfunction) – Grandstream GXP2200 GMI Web Service Guide User Manual

Page 6

background image

GXP2200 GMI WEB SERVICE GUIDE V1.0

Page 5 of 38

• 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=login&username=admin&secret=123&form

at=json&jsoncallback=?

Return

1. HTTP request return:
• Login successful

"{"res": "success", "msg" : "authentication accepted"}"

• Login failed if username or password is missing or incorrect

"{"res": "error", "msg" : "authentication failed"}"

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

2. getUptime(callbackFunction)

Description

Retrieve current system up time

Parameters

callbackFunction: Call back function

HTTP Request

• url: "http://"+ ip + "/manager?"
• action: "uptime"
• 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=uptime&format=json&jsoncallback=?

Return

1. HTTP request return:
• Return successful

"{"res": "success", "day": "1", "hour" : "12", "min" : "23", "sec" : "45"}"

• Return failed

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

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

3. getPN(callbackFunction)

Description

Retrieve GXP2200 P/N number

Parameters

callbackFunction: Call back function