Getgroupcount(callbackfunction) – Grandstream GXP2200 GMI Web Service Guide User Manual
Page 13
GXP2200 GMI WEB SERVICE GUIDE V1.0
Page 12 of 38
HTTP Request
• url: "http://"+ ip + "/manager?"
• action: "getcontact"
• contactID: ""
• groupID: ""
• contactName: ""
• 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=getcontact&contactID=&groupID=&contact
Name=&format=json&jsoncallback=?
Return
1. HTTP request return:
• Return successful
"{"res": "success", "msg":
[{"contactID":"0","contactName":"xxx","groupID":"0","work":"8819","home":"",
"mobile":"","fax":"","photo":"","email":""},
{“contactID":"1","contactName":"grandstream","groupID":"0","work":"3587","home":""
, "mobile":"","fax":"","photo":"","email":""}]}"
• No contacts
"{"res": "error", "msg" : "0"}"
• Return failed
"{"res": "error", "msg" : "can't get contacts information"}"
• Parameters in wrong format (GMI version 9 or newer)
"{"res": "error", "msg" : "wrong format"}"
2. callbackFunction(data) will process the data returned from HTTP request
13. getGroupCount(callbackFunction)
Description
Retrieve the number of groups in phonebook
Parameters
callbackFunction: Call back function
HTTP Request
• url: "http://"+ ip + "/manager?"
• action: "getgroupcount"
• 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=getgroupcount&format=json&jsoncallback=
?