Comment on page
Channel Online
Lists all online users of a channel if the channel's id is provided, otherwise it gets all online users of all channels. It only supports the query parameter for Query and Fields.
URL | Requires Auth | HTTP Method |
---|---|---|
/api/v1/channels.online | yes | GET |
Argument | Example | Required | Description |
---|---|---|---|
query | {"_id":"5HmCfpoB7jp2uibTC"} | Optional |
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
https://localhost:3000/api/v1/channels.online
{
"online": [
{
"_id": "47cRd58HnWwpqxhaZ",
"username": "test"
},
{
"_id": "BsxzC22xQ43taWdff",
"username": "uniqueusername"
}
],
"success": true
}
This example shows how to filter using channel's id.
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
http://localhost:3000/api/v1/channels.online?query={"_id": "5HmCfpoB7jp2uibTC"}
{
"online": [
{
"_id": "47cRd58HnWwpqxhaZ",
"username": "test"
}
],
"success": true
}
Version | Description |
---|---|
0.52.0 | Added |
Last modified 5mo ago