POST /{prefix}/auth
fields: jwt={jwt}
Success Response:
{
"token":""
}
jwt ref
jwt example
GET /{prefix}/ws/{app_key}?token={token}
GET /{prefix}/ping
Success Response:
pong
GET /{app_key}/channels
Sucess Response:
["channel1","channel2","channel3"...]
GET /{app_key}/channels/count
Sucess Response:
{
"count":3
}
GET /{app_key}/online
Sucess Response:
["user_id","user_id","user_id"...]
GET /{app_key}/online/count
Sucess Response:
{
"count":3
}
GET /{app_key}/online/bychannel/{channel}
Sucess Response:
["user_id","user_id","user_id"...]
GET /{app_key}/online/bychannel/{channel}/count
Sucess Response:
{
"count":3
}
POST /{api}/push/{app_key}
key | value | description |
---|---|---|
data | {"key":"value"} | string or json |
event | event | string |
channel_pattern | ^App | regexp or string |
Sucess Response:
{
"total":1,
"pattern":"^App"
}
POST /{api}/push_batch/{app_key}
key | value | description |
---|---|---|
batch_data | [{"channel":"public","event":"notify","data":"test"},{"channel":"public","event":"notify","data":{"username":"test"}}] | json |
Sucess Response:
{
"total":2,
"cap":102456 //byte
}
POST /{api}/push/{app_key}/{channel}/{event}
key | value | description |
---|---|---|
data | {"key":"value"} | string or json |
Sucess Response:
{
"channel":"",
"event":"",
"data":""
}
POST /{api}/push_batch/{app_key}
key | value | description |
---|---|---|
batch_data | [{"channel":"public","event":"notify","data":"test"},{"channel":"public","event":"notify","data":{"username":"test"}}] | json |
Sucess Response:
{
"total":2,
"cap":102456 //byte
}
POST /{api}/push/user/{app_key}/{user_id}
key | value | description |
---|---|---|
data | {"key":"value"} | string or json |
Sucess Response:
{
"user_id":"",
"data":""
}
POST /{api}/push/socket/{app_key}/{socket_id}
key | value | description |
---|---|---|
data | {"key":"value"} | string or json |
Sucess Response:
{
"socket_id":"",
"data":""
}
POST /{api}/reload/channel/user/{app_key}/{user_id}
key | value | description |
---|---|---|
data | ["gg","ff"] | json |
Sucess Response:
{
"user_id":"",
"data":"["gg","ff"]"
}
POST /{api}/add/channel/user/{app_key}/{user_id}
key | value | description |
---|---|---|
data | aa | string |
Sucess Response:
{
"user_id":"",
"data":"aa"
}
POST /{api}/decode?data={jwt}
Sucess Response:
{
"gusher":{
"channels":[],
"user_id":"",
"app_key":"",
"remotes":{
"cmd1":true,
"cmd2":true
}
}
}
GET /{prefix}/ping
Success Response:
pong
- note1: if channels slice have "*" char that user can sub all channels
- note2: support * like test = tst or app = apple