RESTful Realtime Functions
Contents
The RESTful resources that manage live co-browse sessions are sub-resources of <cobrowse-app>/rest/live. For example, http://127.0.0.1:8700/cobrowse/rest/live
Create Session
Request URL | /sessions |
---|---|
HTTP Method | POST |
Description | Creates a new Co-browse session. |
Response:
{
"sessionToken": "845800826",
"sessionServerName": "Co-browse_Server"
}
The HTTP response has a cookie, gcbSessionServer, which should stick further HTTP requests to the server hosting the created session.
Get Session
This API call is subject to CORS control as configured in [cross-origin] allowedOrigins. The request must have either Origin or Referer header with a whitelisted Origin.
Request URL | /sessions/{id} |
---|---|
HTTP Method | GET |
Description | Returns live session public data. The main purpose is to determine which server the session is hosted on (this is needed to integrate the agent Co-browse plug-in with the Co-browse cluster). The id is the live session ID. |
Response:
{
"sessionToken": "845800826",
"sessionServerName": "Co-browse_Server",
"sessionServerUrl": "https://cobrowse-node/cobrowse" // serverUrl option value, may be absent
}
Important
sessionServerUrl is returned only if the serverUrl option is set for the node. This is used for URL-based stickiness.Stop Session
Request URL | /users/{userToken}/session/stop |
---|---|
HTTP Method | GET |
Description | Initiates Co-browse session deactivation for the Controller's session. userToken is the Controller's userToken. |
Response
{
"activationTime": 1368722791040, // UTC time stamp in ms
"deactivationTime": 1368722820929 // UTC time stamp in ms
}
Health Check
Request URL | /health |
---|---|
HTTP Method | GET |
Description | Checks if the the Co-browse Server node is alive and ready to handle requests. |
This resource is useful for Load Balancing. You may also use this resource to check if any server is a live before showing the Co-browsing button in the user's browser.
Important
This resource is not a subresource of <cobrowse-app>/rest/live. The full URL may have a format like http://127.0.0.1:8700/cobrowse/health.Response:
This resource replies with an empty response and a 200 OK HTTP status if the node is alive and ready.
This page was last edited on February 11, 2019, at 17:17.
Comments or questions about this documentation? Contact us for support!