API Method: GET messages by search

Searches for the phrase in the room.

Path:

/api/v2/rooms/#{room_id}/messages/search.#{format}

Formats:

xml, json

HTTP Method(s):

GET

Parameters:

  • text Required. The phrase to search for.
  • page Optional. Specifies the page of results to retrieve. Pagination starts from page 1 (by default).
  • per_page Optional. Specifies the number of messages to retrieve. Default value is 20. May not be greater than 200.

Usage examples:

$ curl -u api_token:x https://bigbang.jaconda.im/api/v2/rooms/developers/messages/search.xml?text=cheer

Response:

XML example:

<?xml version="1.0" encoding="UTF-8"?>
<messages>
  <message>
    <created-at type="datetime">2010-02-15T11:49:09Z</created-at>
    <id type="integer">528993</id>
    <sender-id>client@gmail.com</sender-id>
    <kind>chat</kind>
    <sender-name>Anton Mironov</sender-name>
    <text>Cheer up guys! It's gonna be fine</text>
    <updated-at type="datetime">2010-02-15T11:49:09Z</updated-at>
  </message>
</messages>