Grandstream GXP2200 GMI Web Service Guide User Manual
Page 23

GXP2200 GMI WEB SERVICE GUIDE V1.0
Page 22 of 38
http://192.168.121.230/phonebook/phonebook.xml
2. Import phonebook
(1) Upload the local phonebook.xml to the phone first.
Then use the HTTP POST method to send the phonebook content.
HTTP request header:
http://192.168.121.230/upload?type=phonebook&format=json
(2) Import phonebook
• url: "http://" + ip +"/manager?"
• action: "putportphbk"
• flag: "1"
• opmode: "0"
• portEncode: "UTF-8"
• portType: "0"
• portReplace: "0"
• portClear: "1"
• format: "json"
• jsoncallback: "?"
• For example:
http://192.168.121.230/manager?action=putportphbk&opmode=0&flag=1&portType
=0&portEncode=UTF-8&portReplace=0&portClear=1&format=json&jsoncallback=?
Return
1. HTTP request return:
• "putportphbk": Import successful
"{"res": "success", "flag":"1"}"
• "putportphbk": Import failed
"{"res" : "error", "msg" : "configuration file not found"}"
• "savephbk": Save successful
"{"res": "success"}"
2. callbackFunction(data) will process the data returned from HTTP request
Note
1. If the HTTP request returns "savephbk" successfully, users could send HTTP
requests to check whether the phonebook.xml saving process is done. For example:
http://192.168.121.230/manager?action=portphbkresponse&format=json
Return:
• Saving done:
"{"res": "success", "phbkresponse":"0"}"
• Saving in process:
"{"res": "success", "phbkresponse":"1"}"
2. If the HTTP request returns "putportphbk" successfully, users could send HTTP
requests to check whether the phonebook.xml import process is done. For example: