beautypg.com

Movetodefault(ctid, callbackfuntion) – Grandstream GXV3275 GMI Web Service Guide User Manual

Page 19

background image

GXV3240/3275 GMI Web Service v1.9 User Guide

Page 18 of 44

"{"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.

moveToDefault(ctID, callbackFuntion)

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&fo
rmat=json&jsoncallback=?

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

"{"res" : "error", "msg": "ID is empty" }"

• 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

If the ctID is the default group ID, it won't be processed.

This manual is related to the following products: