beautypg.com

Removemessage(id, flag, callbackfunction) – Grandstream GXP2200 GMI Web Service Guide User Manual

Page 26

background image

GXP2200 GMI WEB SERVICE GUIDE V1.0

Page 25 of 38

HTTP Request

• url: "http://"+ ip + "/manager?"
• action: "senddraftmessage"
• messageID: "12"
• 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=senddraftmessage&messageID=12&forma

t=json&jsoncallback=?

Return

HTTP request return:
• Send successful

"{"res": "success"}"

• Send failed

"{"res" : "error", "msg" : "send new message failed"}"

26. removeMessage(id, flag, callbackFunction)

Description

Remove message

Parameters

• flag: Remove type. 1 - remove all messages from Inbox, Outbox or Draft box; 2 -

remove one message

• id: Message identifier.

flag=1, id=0 - remove all messages in Inbox

flag=1, id=1 - remove all messages in Outbox

flag=1, id=2 - remove all messages in Draftbox

flag=0, id is the message ID - remove message with message ID = id

• callbackFunction: Call back function

HTTP Request

• url: "http://"+ ip + "/manager?"
• action: "removemessage"
• ID: "1"
• flag: "1"
• 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=removemessage&ID=1&flag=1&format=jso

n&jsoncallback=?

Return

1. HTTP request return:
• Remove successful

"{"res": "success"}"