Welcome

Spotlight

Searches for users or rooms that are visible to the user.

WARNING: It will only return rooms that user didn’t join yet.

URL Requires Auth HTTP Method
/api/v1/spotlight yes GET

Example Call

curl -H "X-Auth-Token: 6eWs4ECxUITYYoZ_bAYK5OE2srkxAepQqQA1cGGv3jK" \
     -H "X-User-Id: hvzu8z6mHFigiXy6Y" \
     http://localhost:3000/api/v1/spotlight?query=foobar

Example Call

curl -H "X-Auth-Token: 6eWs4ECxUITYYoZ_bAYK5OE2srkxAepQqQA1cGGv3jK" \
     -H "X-User-Id: hvzu8z6mHFigiXy6Y" \
     http://localhost:3000/api/v1/spotlight?query=@foobar

Example Call

curl -H "X-Auth-Token: 6eWs4ECxUITYYoZ_bAYK5OE2srkxAepQqQA1cGGv3jK" \
     -H "X-User-Id: hvzu8z6mHFigiXy6Y" \
     http://localhost:3000/api/v1/spotlight?query=#foobar

Query Parameters

Argument Example Required Description
query john Required The term to be searched. Supports ‘#’ for channels and ‘@’ for users

Example Result

{
  "users": [
    {
      "_id": "pimenta.bot",
      "name": "pimentaBOT",
      "username": "pimenta.bot",
      "status": "online"
    }
  ],
  "rooms": [],
  "success": true
}

Change Log

Version Description
0.64.0 Added support to ‘#’ and ‘@’ searches, for channels and users respectively.
0.61.0 Added.