GET (Events) Parameters

GET takes two parameters:

  • all (default = false)—if true, all events since eventid are returned. If false, MessageEvents sent from the consumer (by the PUT call) are omitted from the returned events list.

    For example: https://<ServerIP>:<Port>/ccp/rest/chat?eventid=0&all=false

  • eventid (default = 0)— When first called, eventid is set to 0. Subsequent calls identify the eventid of the last processed event. The call will return events that occurred since the specified eventid. It is normal for there to be gaps in the eventids that are returned.

Event

Description and child events

MessageEvent

A chat message sent from the agent:

  • id: sequential id of the event.

  • from: sender of the message.

  • body: URL-encoded body of the message.

PresenceEvent

A user joined or left the session:

  • id: sequential id of the event.

  • from: user who joined/left the room.

  • status: joined|left.

TypingEvent

  • id: sequential id of the event.

  • from : user who joined the room.

  • status : indicates the typing status. It can either be "composing" or "paused".

    Note

    The Typing Status provided is case sensitive and has to either of the two as mentioned above. Any other value provided will not be accepted.

StatusEvent

Chat session status:

  • id: sequential id of the event.

  • status: status information.

    • chat_finished: the chat is finished with no problems (not currently used).

    • chat_finished_error: the chat is finished due to an error; this is not recoverable (not currently used).

    • chat_issue: there is an issue with the chat session; this may be recoverable.

    • chat_ok: the chat session is ok again

      .
  • detail: If the XMPP Server fails, a StatusEvent will be sent with status set to chat_issue and detail set to XMPP Server is down.