All Products
Document Center


Last Updated: Sep 07, 2018


Get the number of real-time online users of the live stream.

Request parameters

Parameters Type Required or not Example values Description
Action String Yes DescribeLiveStreamOnlineUserNum

The name of this interface. Value: DescribeLiveStreamOnlineUserNum

DomainName String Yes

Your CDN domain name.

AppName String No testApp

Name of the app, which the live stream belongs to.

HlsSwitch String No true

hls switch.

StreamName String No testStream

Name of the live stream.

Return parameters

Parameters Type Example values Description
TotalUserNumber Long 2

Total number of users of all the streams.


Number of users of each live stream.

  └StreamUrl String rtmp://

URL of the live stream.

  └UserNumber Long 2

Number of online users of the live stream.

  └Time String 2015-12-01T17:37:00Z

Statistic time.

  • UTC time, format: 2015-12-01T17:37:00Z.

RequestId String 40A4F36D-A7CC-473A-88E7-154F92242566

The ID of the job request.


Request example

  1.<Public Request Parameter>

For more information, see Public Request Parameter.

Normal return example

JSON format

  1. {
  2. "OnlineUserInfo":{
  3. "LiveStreamOnlineUserNumInfo":[
  4. {
  5. "StreamUrl":"rtmp://",
  6. "UserNumber":2
  7. },
  8. {
  9. "StreamUrl":"rtmp://",
  10. "UserNumber":5
  11. }
  12. ]
  13. },
  14. "RequestId":"16A96B9A-F203-4EC5-8E43-CB92E68F4CD8",
  15. "TotalUserNumber":7
  16. }

Exception return example

JSON format

  1. {
  2. "Code":"InternalError",
  3. "HostId":"",
  4. "Message":"The request processing has failed due to some unknown error.",
  5. "RequestId":"6EBD1AC4-C34D-4AE1-963E-B688A228BE31"
  6. }

Error code

For more information about error code of this product, see Error code.