Movetodefault(ctid, callbackfunction) – Grandstream GXP2200 GMI Web Service Guide User Manual
Page 19

GXP2200 GMI WEB SERVICE GUIDE V1.0
Page 18 of 38
Return
1. HTTP request return:
• Remove successful
"{"res": "success"}"
• Remove failed
"{"res" : "error", "msg": "remove group failed" }"
• Return data failed
"{"res": "error", "msg" : "can't remove group"}"
• Parameters in wrong format (GMI version 9 or newer)
"{"res" : "error", "msg": "wrong format" }"
• Database operation error (GMI version 9 or newer)
"{"res" : "error", "msg": "0" }"
2. callbackFunction(data) will process the data returned from HTTP request
Note
The default group and blacklist cannot be removed. The gpID of the default group is 0;
the gpID of the blacklist is 100.
20. moveToDefault(ctID, callbackFunction)
Description
Move the contact to default phonebook group
Parameters
• ctID: Contact ID
• callbackFunction: Call back function
HTTP Request
• url: "http://"+ ip + "/manager?"
• action: "movetodefault"
• contactID: ctID
• 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=movetodefault&contactID=1&format=json&j
soncallback=?
Return
1. HTTP request return:
• Move successful
"{"res": "success"}"
• Move failed
"{"res" : "error", "msg": "move contact to default failed" }"
• Return data failed
"{"res": "error", "msg" : "can't move contact to default"}" //dbus returns null
• "contactID" is empty