Advanced queries with RumbleTalk API

The advanced query options are used to adjust requests for specific information from all your group chats.
You can combine any of the query options. e.g. limit=10&orderBy=name.
Note: some routes, like read messages, support different options


Limit and offset

Using the limit and offset parameters, you can request different subsets of collections.

GET
https://api.rumbletalk.com/{path}?limit={limitValue}&offset={offsetValue}

Query parameters

  • Parameter
  • Type
  • Description
  • limit
  • integer
  • The maximum number of results to return
    Default: 500
    Maximum: 2000
  • offset
  • integer
  • The offset in the collection to start the query from
    Default: 0

cURL example

In this example we will request the 10 messages of a chat room, starting in index 201.
i.e the records in places 201, 201, ... 210

curl \ -X GET \ "https://api.rumbletalk.com/chats/123/messages?limit=10&offset=201" \ -H "Authorization: Bearer <token>"

Response example

{ "status": true, "count": 10, "data": [ { "messageId": 12345, "time": 1458846012, "userId": 12, "image": "", "userName": "Jake", "text": "Hi!" }, { "messageId": 12346, "time": 1458846018, "userId": 2, "image": "", "userName": "John", "text": "Hello Jake!" }, ... ] }

Order by

Using the orderBy parameter, we can order the requested collection by some* of the paramters

GET
https://api.rumbletalk.com/{path}?orderBy={value}

Query parameters

  • Parameter
  • Type
  • Description
  • orderBy
  • string
  • The name of a parameter to order by;
    Prefix the name with a minus sign "-" to reverse the order; e.g: "-name".

cURL example

In this example we will request our group chat rooms, ordered by name.

curl \ -X GET \ "https://api.rumbletalk.com/chats?orderBy=name" \ -H "Authorization: Bearer <token>"

Response example

{ "status": true, "count": 5, "data": [ { "id": 145423, "name": My Chat, ... }, { "id": 1220, "name": RumbleChat, ... }, ... ] }

Using the search parameter, we can search our collections by specific parameter values.
Every route has a subset of parameters that the request can be filtered by

GET
https://api.rumbletalk.com/{path}?search={value}

Query parameters

  • Parameter
  • Type
  • Description
  • search
  • string
  • A URL encoded string of pairs (separated by &) of search terms.
    e.g. the following query will be limited to having the text of "Hello World!" (case insensitive) between the dates of 2018-07-04 19:00:00 and 2018-07-04 20:23:25
    text=Hello World!&time$1530720000:1530725005
    Available operators are:
    = equals to
    != not equals to
    > greater than
    >= equal or greater than
    < less than
    <= equal or less than
    ~ contains the string
    $: between the values separated by ":"
    * all string operations are case insensitive

cURL example

In this example we will request all of messages containing the string "hello", that were sent between 2018-07-04 19:00:00 and 2018-07-04 20:23:25

curl \ -X GET \ "https://api.rumbletalk.com/chats/123/messages?search=text~hello&time$1530720000:1530725005" \ -H "Authorization: Bearer <token>"

Response example

{ "status": true, "count": 5, "data": [ { "messageId": 145423, "text": "Hello Cindy", "time": 1530720015 ... }, { "messageId": 145500, "text": "I've tried the hello world one", "time": 1530720315 ... } ... ] }

Query your request

Using the query parameter, we can search for a specific phrase within the queryable* parameters of the route.

GET
https://api.rumbletalk.com/{path}?query={value}

Query parameters

  • Parameter
  • Type
  • Description
  • query
  • string
  • The value by which to query the request;
    *The query option returns all of the records that contain the phrase in any of the record's parameters

cURL example

In this example we will request the messages of a chat, that contain the phrase "william".

curl \ -X GET \ "https://api.rumbletalk.com/chats/123/messages?query=william" \ -H "Authorization: Bearer <token>"

Response example

{ "status": true, "count": 4, "data": [ { "messageId": 12345, "time": 1458846012, "userId": 12, "image": "", "userName": "William Johnson", "text": "Hi there!" }, { "messageId": 12345, "time": 1458846012, "userId": 12, "image": "", "userName": "Tim Marrik", "text": "Hi William! How are you today?" }, ... ] }