beautypg.com

Getvendor(callbackfunction), Getproduct(callbackfunction) – Grandstream GXP2200 GMI Web Service Guide User Manual

Page 8

background image

GXP2200 GMI WEB SERVICE GUIDE V1.0

Page 7 of 38

5. getVendor(callbackFunction)

Description

Retrieve GXP2200 vendor information (login is not required)

Parameters

callbackFunction: Call back function

HTTP Request

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

Return

1. HTTP request return:
• Return successful

"{"res": "success", "vendor": "Grandstream Networks, Inc."}"

• Return failed

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

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

6. getProduct(callbackFunction)

Description

Retrieve GXP2200 product information (login is not required)

Parameters

callbackFunction: Call back function

HTTP Request

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

Return

1. HTTP request return:
• Return successful

"{"res": "success", "product": "GXP2200"}"

• Return failed

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

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