Red5 Documentation

Shared Objects

Shared objects are collaboration points for Red5 Pro applications. These are mostly used for chats, games, etc. used to update real-time data to all connected clients. Shared objects are also known as server-side cookies.

getSharedObjects

Description

Returns a list of shared object names in the specified application.

REQUEST

  • URI:
    http://{host}:5080/api/v1/applications/{appname}/sharedobjects?accessToken={security-token}
  • Method: GET
  • Parameters:
Property Type Description Required Default
appname Path Param Application name Required
scope Query Param Application sub-scope path Optional
accessToken Query Param Security token Required if token security is enabled

RESPONSE

  • Failure: HTTP CODE 404 or 500 or 401
    See failure status code table for more information on error cause.
  • Data:
{
  "status": "error",
  "code": <http-status-code>,
  "message": <error-message>",
  "timestamp": <server-timestamp>
}
  • Success: HTTP CODE 200 - OK
  • Data:

Example

REQUEST

  • URI:
    http://localhost:5080/api/v1/applications/live/sharedobjects?accessToken=xyz123
  • Method: GET
  • Data:

RESPONSE

  • Success: HTTP CODE 200 - OK
  • Data:
{
  "status": "success",
  "code": 200,
  "data": [
    "BallControl"
  ],
  "timestamp": 1467211887976
}

getSharedObjectStatistics

Description

Returns statistics for a requested SharedObject.

REQUEST

  • URI:
    http://{host}:5080/api/v1/applications/{appname}/sharedobjects/{soname}?accessToken={security-token}
  • Method: GET
  • Parameters:
Property Type Description Required Default
appname Path Param Application name Required
soname Path Param Shared object name Required
scope Query Param Application sub-scope path Optional
accessToken Query Param Security token Required if token security is enabled

RESPONSE

  • Failure: HTTP CODE 404 or 500 or 401
    See failure status code table for more information on error cause.
  • Data:
{
  "status": "error",
  "code": <http-status-code>,
  "message": <error-message>",
  "timestamp": <server-timestamp>
}

Example

REQUEST

  • URI:
    http://localhost:5080/api/v1/applications/live/sharedobjects/BallControl?accessToken=xyz123
  • Method: GET
  • Data:

RESPONSE

  • Success: HTTP CODE 200 - OK
  • Data:
{
  "status": "success",
  "code": 200,
  "data": {
    "name": "BallControl",
    "persistent": false,
    "version": 1,
    "active_listeners": 1,
    "total_listeners": 1,
    "max_listeners": 1,
    "total_changes": 0,
    "total_deletes": 0,
    "totalSends": 0
  },
  "timestamp": 1467211947486
}