{"openapi":"3.0.1","info":{"title":"Ant Media Server REST API Reference","description":"Ant Media Server REST API Reference","contact":{"name":"Ant Media Info","url":"https://antmedia.io","email":"contact@antmedia.io"},"license":{"name":"Apache 2.0","url":"http://www.apache.org"},"version":"V2.0"},"externalDocs":{"url":"https://antmedia.io"},"servers":[{"url":"https://test.antmedia.io:5443/Sandbox/rest/","description":"test server"}],"paths":{"/v2/broadcasts/{id}/rtmp-endpoint":{"post":{"summary":"Adds a third party RTMP end point to the stream","description":"It supports adding after broadcast is started. Resolution can be specified to send a specific adaptive resolution. If an URL is already added to a stream, trying to add the same RTMP URL will return false.","operationId":"addEndpointV3","parameters":[{"name":"id","in":"path","description":"Broadcast id","required":true,"schema":{"type":"string"}},{"name":"resolutionHeight","in":"query","description":"Resolution height of the broadcast that is wanted to send to the RTMP endpoint. ","schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"RTMP url of the endpoint that stream will be republished. If required, please encode the URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Endpoint"}}},"required":true},"responses":{"200":{"description":"Add RTMP endpoint response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}},"delete":{"summary":"Remove third-party RTMP end point from the stream","description":"For the stream that is broadcasting, it will stop immediately.","operationId":"removeEndpointV2","parameters":[{"name":"id","in":"path","description":"Broadcast id","required":true,"schema":{"type":"string"}},{"name":"endpointServiceId","in":"query","description":"RTMP url of the endpoint that will be stopped.","required":true,"schema":{"type":"string"}},{"name":"resolutionHeight","in":"query","description":"Resolution specifier if endpoint has been added with resolution. Only applicable if user added RTMP endpoint with a resolution speficier. Otherwise won't work and won't remove the endpoint.","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Remove RTMP endpoint response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/{stream_id}/id3":{"post":{"description":"Add ID3 data to HLS stream at the moment","operationId":"addID3Data","parameters":[{"name":"stream_id","in":"path","description":"the id of the stream","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"ID3 data.","content":{"application/json":{"schema":{"type":"string"}}}},"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/{stream_id}/sei":{"post":{"description":"Add SEI data to HLS stream at the moment","operationId":"addSEIData","parameters":[{"name":"stream_id","in":"path","description":"the id of the stream","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"SEI data.","content":{"application/json":{"schema":{"type":"string"}}}},"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/{id}/subtrack":{"post":{"summary":"Add a subtrack to a main track (broadcast)","description":"Adds a subtrack to a main track (broadcast).","operationId":"addSubTrack","parameters":[{"name":"id","in":"path","description":"Broadcast id(main track)","required":true,"schema":{"type":"string"}},{"name":"id","in":"query","description":"Subtrack Stream Id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Result of adding a subtrack","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}},"delete":{"summary":"Delete a subtrack from a main track (broadcast)","description":"Deletes a subtrack from a main track (broadcast).","operationId":"removeSubTrack","parameters":[{"name":"id","in":"path","description":"Broadcast id(main track)","required":true,"schema":{"type":"string"}},{"name":"id","in":"query","description":"Subtrack Stream Id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Result of deleting a subtrack","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/{id}/subscribers":{"post":{"summary":"Add Subscriber to the requested stream","description":"Adds a subscriber to the requested stream. If the subscriber's type is 'publish', they can also play the stream, which is critical in conferencing. If the subscriber's type is 'play', they can only play the stream. If 'b32Secret' is not set, it will default to the AppSettings. The length of 'b32Secret' should be a multiple of 8 and use base32 characters A?Z, 2?7.","operationId":"addSubscriber","parameters":[{"name":"id","in":"path","description":"The id of the stream","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Subscriber to be added to this stream","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscriber"}}},"required":true},"responses":{"200":{"description":"Result of adding a subscriber","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}},"delete":{"summary":"Removes all subscribers related to the requested stream","description":"Deletes all subscriber data associated with the specified stream including ConnectionEvents.","operationId":"revokeSubscribers","parameters":[{"name":"id","in":"path","description":"the id of the stream","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Result of removing all subscribers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/{id}/subscribers/{sid}/block/{seconds}/{type}":{"put":{"summary":"Block specific subscriber","description":"Blocks a specific subscriber, enhancing security especially when used with TOTP streaming. The subscriber is blocked for a specified number of seconds from the moment this method is called.","operationId":"blockSubscriber","parameters":[{"name":"id","in":"path","description":"the id of the stream","required":true,"schema":{"type":"string"}},{"name":"sid","in":"path","description":"the id of the subscriber","required":true,"schema":{"type":"string"}},{"name":"seconds","in":"path","description":"seconds to block the user","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"type","in":"path","description":"block type it can be 'publish', 'play' or 'publish_play'","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Result of blocking the subscriber","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/create":{"post":{"description":"Creates a Broadcast, IP Camera or Stream Source and returns the full broadcast object with rtmp address and other information. The different between Broadcast and IP Camera or Stream Source is that Broadcast is ingested by Ant Media ServerIP Camera or Stream Source is pulled by Ant Media Server","operationId":"createBroadcast","parameters":[{"name":"autoStart","in":"query","description":"Only effective if stream is IP Camera or Stream Source. If it's true, it starts automatically pulling stream. Its value is false by default","schema":{"type":"boolean"}}],"requestBody":{"description":"Broadcast object. Set the required fields, it may be null as well.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Broadcast"}}}},"responses":{"400":{"description":"If stream id is already used in the data store, it returns error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"200":{"description":"Returns the created stream","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Broadcast"}}}}}}},"/v2/broadcasts/{id}":{"get":{"description":"Get broadcast object","operationId":"getBroadcast","parameters":[{"name":"id","in":"path","description":"id of the broadcast","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Return the broadcast object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Broadcast"}}}},"404":{"description":"Broadcast object not found"}}},"put":{"description":"Updates the Broadcast objects fields if it's not null. The updated fields are as follows: name, description, userName, password, IP address, streamUrl of the broadcast. It also updates the social endpoints","operationId":"updateBroadcast","parameters":[{"name":"id","in":"path","description":"Broadcast id","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Broadcast object with the updates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastUpdate"}}}},"responses":{"200":{"description":"If it's updated, success field is true. If it's not updated, success field is false."}}},"delete":{"summary":"Delete broadcast from data store and stop if it's broadcasting","operationId":"deleteBroadcast","parameters":[{"name":"id","in":"path","description":" Id of the broadcast","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"If it's deleted, success is true. If it's not deleted, success if false.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Broadcast"}}}}}}},"/v2/broadcasts":{"delete":{"description":"Delete multiple broadcasts from data store and stop if they are broadcasting","operationId":"deleteBroadcastsBulk","parameters":[{"name":"ids","in":"query","description":"Comma-separated stream Ids","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"If it's deleted, success is true. If it's not deleted, success if false.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Broadcast"}}}}}}},"/v2/broadcasts/{id}/subscribers/{sid}":{"delete":{"summary":"Delete specific subscriber from data store","description":"Deletes a specific subscriber from the data store for the selected stream.","operationId":"deleteSubscriber","parameters":[{"name":"id","in":"path","description":"the id of the stream","required":true,"schema":{"type":"string"}},{"name":"sid","in":"path","description":"the id of the subscriber","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Result of deleting the subscriber","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/{id}/recording/{recording-status}":{"put":{"summary":"Set stream specific recording setting","description":"This setting overrides the general Mp4 and WebM Muxing Setting for a specific stream.","operationId":"enableRecording","parameters":[{"name":"id","in":"path","description":"the id of the stream","required":true,"schema":{"type":"string"}},{"name":"recording-status","in":"path","description":"Change recording status. If true, starts recording. If false stop recording","required":true,"schema":{"type":"boolean"}},{"name":"recordType","in":"query","description":"Record type: 'mp4' or 'webm'. It's optional parameter.","schema":{"type":"string"}},{"name":"resolutionHeight","in":"query","description":"Resolution height of the broadcast that is wanted to record. ","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Result of setting stream specific recording","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/active-live-stream-count":{"get":{"summary":"Return the active live streams","description":"Retrieves the currently active live streams.","operationId":"getAppLiveStatistics","responses":{"200":{"description":"Active live streams","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleStat"}}}}}}},"/v2/broadcasts/list/{offset}/{size}":{"get":{"description":"Gets the broadcast list from database. It returns max 50 items at a time","operationId":"getBroadcastList","parameters":[{"name":"offset","in":"path","description":"This is the offset of the list, it is useful for pagination. If you want to use sort mechanism, we recommend using Mongo DB.","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"size","in":"path","description":"Number of items that will be fetched. If there is not enough item in the datastore, returned list size may less then this value","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"type_by","in":"query","description":"Type of the stream. Possible values are \"liveStream\", \"ipCamera\", \"streamSource\", \"VoD\"","schema":{"type":"string"}},{"name":"sort_by","in":"query","description":"Field to sort. Possible values are \"name\", \"date\", \"status\"","schema":{"type":"string"}},{"name":"order_by","in":"query","description":"\"asc\" for Ascending, \"desc\" Descending order","schema":{"type":"string"}},{"name":"search","in":"query","description":"Search parameter, returns specific items that contains search string","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Broadcast"}}}}}}}},"/v2/broadcasts/{id}/broadcast-statistics":{"get":{"summary":"Get the broadcast live statistics","description":"Retrieves live statistics of the broadcast, including total RTMP watcher count, total HLS watcher count, and total WebRTC watcher count.","operationId":"getBroadcastStatistics","parameters":[{"name":"id","in":"path","description":"the id of the stream","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Broadcast live statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastStatistics"}}}}}}},"/v2/broadcasts/total-broadcast-statistics":{"get":{"summary":"Get total broadcast live statistics","description":"Retrieves total live statistics of the broadcast, including total HLS watcher count and total WebRTC watcher count.","operationId":"getBroadcastTotalStatistics","responses":{"200":{"description":"Total broadcast live statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastStatistics"}}}}}}},"/v2/broadcasts/{streamId}/ip-camera-error":{"get":{"summary":"Get IP Camera Error after connection failure","description":"Checks for an error after a connection failure with an IP camera. Returning true indicates an error; false indicates no error.","operationId":"getCameraErrorV2","parameters":[{"name":"streamId","in":"path","description":"StreamId of the IP Camera Streaming.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"IP Camera error status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/{id}/connection-events/{offset}/{size}":{"get":{"summary":"Retrieve all subscriber statistics of the requested stream. Deprecated ","description":"Fetches comprehensive statistics for all subscribers of the specified stream.","operationId":"getConnectionEvents","parameters":[{"name":"id","in":"path","description":"the id of the stream","required":true,"schema":{"type":"string"}},{"name":"offset","in":"path","description":"the starting point of the list","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"size","in":"path","description":"size of the return list (max:50 )","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"subscriberId","in":"query","description":"subscriberId to filter the connections events","schema":{"type":"string"}}],"responses":{"200":{"description":"List of subscriber statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberStats"}}}}}}},"/v2/broadcasts/{id}/detections/{offset}/{size}":{"get":{"summary":"Retrieve detected objects from the stream","description":"Fetches detected objects from the stream, using specified offset and size parameters.","operationId":"getDetectionListV2","parameters":[{"name":"id","in":"path","description":"the id of the stream","required":true,"schema":{"type":"string"}},{"name":"offset","in":"path","description":"starting point of the list","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"size","in":"path","description":"total size of the return list","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"List of detected TensorFlow objects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TensorFlowObject"}}}}}}},"/v2/broadcasts/duration":{"get":{"description":"Gets the durations of the stream url in milliseconds","operationId":"getDuration","parameters":[{"name":"url","in":"query","description":"Url of the stream that its duration will be returned","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"If operation is successful, duration will be in dataId field and success field is true. If it's failed, errorId has the error code(-1: duration is not available, -2: url is not opened, -3: cannot get stream info) and success field is false","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/{id}/jwt-token":{"get":{"description":"Generates JWT token for specified stream. It's not required to let the server generate JWT. Generally JWT tokens should be generated on the client side.","operationId":"getJwtTokenV2","parameters":[{"name":"id","in":"path","description":"The id of the stream","required":true,"schema":{"type":"string"}},{"name":"expireDate","in":"query","description":"The expire time of the token. It's in unix timestamp seconds.","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"type","in":"query","description":"Type of the JWT token. It may be play or publish ","required":true,"schema":{"type":"string"}},{"name":"roomId","in":"query","description":"Room Id that token belongs to. It's not mandatory ","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"400":{"description":"When there is an error in creating token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/{id}/detections/count":{"get":{"summary":"Get total number of detected objects","description":"Retrieves the total count of objects detected.","operationId":"getObjectDetectedTotal","parameters":[{"name":"id","in":"path","description":"id of the stream","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Total number of detected objects","content":{"application/json":{"schema":{"type":"integer","format":"int64"}}}}}}},"/v2/broadcasts/{id}/ip-camera/device-profiles":{"get":{"summary":"Get the Profile List for an ONVIF IP Camera","description":"Retrieves the profile list for an ONVIF IP camera.","operationId":"getOnvifDeviceProfiles","parameters":[{"name":"id","in":"path","description":"The id of the IP Camera","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Profile list for the ONVIF IP camera","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2/broadcasts/{id}/rtmp-to-webrtc-stats":{"get":{"summary":"Get RTMP to WebRTC Path Stats","description":"Retrieves general statistics for the RTMP to WebRTC path.","operationId":"getRTMPToWebRTCStats","parameters":[{"name":"id","in":"path","description":"the id of the stream","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"RTMP to WebRTC path statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RTMPToWebRTCStats"}}}}}}},"/v2/broadcasts/{id}/stream-info":{"get":{"summary":"Get stream information","description":"Returns the stream information including width, height, bitrates, and video codec.","operationId":"getStreamInfo","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stream information","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2/broadcasts/{id}/subscribers/{sid}/totp":{"get":{"description":"Return TOTP for the subscriberId, streamId, type. This is a helper method. You can generate TOTP on your end.If subscriberId is not in the database, it generates TOTP from the secret in the AppSettings. Secret code is for the subscriberId not in the database secretCode = Base32.encodeAsString({secretFromSettings(publishsecret or playsecret according to the type)} + {subscriberId} + {streamId} + {type(publish or play)} + {Number of X to have the length multiple of 8}'+' means concatenating the strings. There is no explicit '+' in the secretCode ","operationId":"getTOTP","parameters":[{"name":"id","in":"path","description":"The id of the stream that TOTP will be generated","required":true,"schema":{"type":"string"}},{"name":"sid","in":"path","description":"The id of the subscriber that TOTP will be generated ","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","description":"The type of token. It's being used if subscriber is not in the database. It can be publish, play","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/{id}/token":{"get":{"description":"Generates random one-time token for specified stream","operationId":"getTokenV2","parameters":[{"name":"id","in":"path","description":"The id of the stream","required":true,"schema":{"type":"string"}},{"name":"expireDate","in":"query","description":"The expire time of the token. It's in unix timestamp seconds","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"type","in":"query","description":"Type of the token. It may be play or publish ","required":true,"schema":{"type":"string"}},{"name":"roomId","in":"query","description":"Room Id that token belongs to. It's not mandatory ","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"400":{"description":"When there is an error in creating token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/count":{"get":{"summary":"Get the total number of broadcasts","description":"Retrieves the total number of broadcasts.","operationId":"getTotalBroadcastNumberV2","responses":{"200":{"description":"Total number of broadcasts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleStat"}}}}}}},"/v2/broadcasts/count/{search}":{"get":{"summary":"Get the number of broadcasts based on search criteria","description":"Retrieves the number of broadcasts matching the specified search criteria.","operationId":"getTotalBroadcastNumberV2_1","parameters":[{"name":"search","in":"path","description":"Search parameter to get the number of items including it ","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Number of broadcasts for searched items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleStat"}}}}}}},"/v2/broadcasts/{stream_id}/webrtc-client-stats/{offset}/{size}":{"get":{"summary":"Get WebRTC Client Statistics","description":"Retrieves WebRTC client statistics, including audio bitrate, video bitrate, target bitrate, video sent period, etc.","operationId":"getWebRTCClientStatsListV2","parameters":[{"name":"offset","in":"path","description":"offset of the list","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"size","in":"path","description":"Number of items that will be fetched","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"stream_id","in":"path","description":"the id of the stream","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"WebRTC client statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebRTCClientStats"}}}}}}},"/v2/broadcasts/webrtc-receive-low-level-stats":{"get":{"summary":"Get WebRTC Low Level Receive Stats","description":"Retrieves general statistics for WebRTC low level receive operations.","operationId":"getWebRTCLowLevelReceiveStats","responses":{"200":{"description":"WebRTC low level receive statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebRTCReceiveStats"}}}}}}},"/v2/broadcasts/webrtc-send-low-level-stats":{"get":{"summary":"Get WebRTC Low Level Send Stats","description":"Retrieves general statistics for WebRTC low level send operations.","operationId":"getWebRTCLowLevelSendStats","responses":{"200":{"description":"WebRTC low level send statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebRTCSendStats"}}}}}}},"/v2/broadcasts/import-to-stalker":{"post":{"summary":"Import Live Streams to Stalker Portal","description":"Imports live streams into the Stalker Portal.","operationId":"importLiveStreams2StalkerV2","responses":{"200":{"description":"Import operation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/{id}/subscriber-stats/list/{offset}/{size}":{"get":{"summary":"Retrieve all subscriber statistics of the requested stream. Deprecated use connection-events method. ","description":"Fetches comprehensive statistics for all subscribers of the specified stream. Deprecated use connection-events method. This method is kept for backward compatibility and getting old records. New records saved and retrieved with connection-events method because there is a schema design causes performance issues","operationId":"listSubscriberStatsV2","parameters":[{"name":"id","in":"path","description":"the id of the stream","required":true,"schema":{"type":"string"}},{"name":"offset","in":"path","description":"the starting point of the list","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"size","in":"path","description":"size of the return list (max:50 )","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"List of subscriber statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberStats"}}}}},"deprecated":true}},"/v2/broadcasts/{id}/subscribers/list/{offset}/{size}":{"get":{"summary":"Get all subscribers of the requested stream","description":"It does not return subscriber-stats. Please use subscriber-stats method","operationId":"listSubscriberV2","parameters":[{"name":"id","in":"path","description":"the id of the stream","required":true,"schema":{"type":"string"}},{"name":"offset","in":"path","description":"the starting point of the list","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"size","in":"path","description":"size of the return list (max:50 )","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"List of subscribers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscriber"}}}}}}},"/v2/broadcasts/{id}/tokens/list/{offset}/{size}":{"get":{"summary":"Get all tokens of requested stream","operationId":"listTokensV2","parameters":[{"name":"id","in":"path","description":"the id of the stream","required":true,"schema":{"type":"string"}},{"name":"offset","in":"path","description":"the starting point of the list","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"size","in":"path","description":"size of the return list (max:50 )","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"List of tokens","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}}}}},"/v2/broadcasts/{id}/ip-camera/move":{"post":{"summary":"Move IP Camera","description":"Supports continuous, relative, and absolute movement. By default, it's a relative move. Movement parameters should be provided according to the movement type. Generally, the following values are used: For Absolute move, value X and value Y are between -1.0f and 1.0f. Zoom value is between 0.0f and 1.0f. For Relative move, value X, value Y, and Zoom Value are between -1.0f and 1.0f. For Continuous move, value X, value Y, and Zoom Value are between -1.0f and 1.0f.","operationId":"moveIPCamera","parameters":[{"name":"id","in":"path","description":"The id of the IP Camera","required":true,"schema":{"type":"string"}},{"name":"valueX","in":"query","description":"Movement in X direction. If not specified, it's assumed to be zero. Valid ranges between -1.0f and 1.0f for all movements ","schema":{"type":"number","format":"float"}},{"name":"valueY","in":"query","description":"Movement in Y direction. If not specified, it's assumed to be zero. Valid ranges between -1.0f and 1.0f for all movements ","schema":{"type":"number","format":"float"}},{"name":"valueZ","in":"query","description":"Movement in Zoom. If not specified, it's assumed to be zero. Valid ranges for relative and continous move is between -1.0f and 1.0f. For absolute move between 0.0f and 1.0f ","schema":{"type":"number","format":"float"}},{"name":"movement","in":"query","description":"Movement type. It can be absolute, relative or continuous. If not specified, it's relative","schema":{"type":"string"}}],"responses":{"200":{"description":"Result of moving the IP camera","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/playlists/{id}/next":{"post":{"summary":"Specify the next playlist item to play by index","description":"Sets the next playlist item to be played, based on its index. This method is applicable only to playlists.","operationId":"playNextItem","parameters":[{"name":"id","in":"path","description":"The id of the playlist stream.","required":true,"schema":{"type":"string"}},{"name":"index","in":"query","description":"The next item to play. If it's not specified or it's -1, it plays next item. If it's number, it skips that item in the playlist to play. The first item index is 0. ","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Result of specifying the next playlist item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/{id}/tokens":{"delete":{"summary":"Removes all tokens related with requested stream","operationId":"revokeTokensV2","parameters":[{"name":"id","in":"path","description":"the id of the stream","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Removal of tokens response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/onvif-devices":{"get":{"summary":"Get Discovered ONVIF IP Cameras","description":"Performs a discovery within the internal network to automatically retrieve information about ONVIF-enabled cameras.","operationId":"searchOnvifDevicesV2","responses":{"200":{"description":"Result of discovering ONVIF IP cameras","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/{id}/data":{"post":{"summary":"Send message to stream participants via Data Channel","description":"Sends a message to stream participants through the Data Channel in a WebRTC stream.","operationId":"sendMessage","parameters":[{"name":"id","in":"path","description":"Broadcast id","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Message through Data Channel which will be sent to all WebRTC stream participants","content":{"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"Result of sending the message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/{id}/start":{"post":{"summary":"Start streaming sources","description":"Initiates streaming for sources such as IP Cameras, Stream Sources, and PlayLists.","operationId":"startStreamSourceV2","parameters":[{"name":"id","in":"path","description":"the id of the stream. The broadcast type should be IP Camera or Stream Source otherwise it does not work","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Result of starting streaming sources","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/{id}/ip-camera/stop-move":{"post":{"description":"Stop move for IP Camera","operationId":"stopMove","parameters":[{"name":"id","in":"path","description":"the id of the IP Camera","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/{id}/stop":{"post":{"summary":"Stop streaming for the active stream","description":"Terminates streaming for the active stream, including both ingested (RTMP, WebRTC) and pulled stream sources (IP Cameras and Stream Sources).","operationId":"stopStreamingV2","parameters":[{"name":"id","in":"path","description":"the id of the broadcast.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Result of stopping the active stream","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/{id}/seek-time/{seekTimeMs}":{"put":{"description":"Seeks the playing stream source, vod or playlist on the fly. It accepts seekTimeMs parameter in milliseconds","operationId":"updateSeekTime","parameters":[{"name":"id","in":"path","description":"Broadcast id","required":true,"schema":{"type":"string"}},{"name":"seekTimeMs","in":"path","description":"Seek time in milliseconds","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/broadcasts/validate-token":{"post":{"summary":"Perform validation of token for requested stream","description":"If validated, success field is true, not validated success field is false","operationId":"validateTokenV2","requestBody":{"description":"Token to be validated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}},"required":true},"responses":{"200":{"description":"Token validation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/filters/create":{"post":{"summary":"Creates or update the filter","operationId":"create","requestBody":{"description":"Filter object with the updates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilterConfiguration"}}}},"responses":{"200":{"description":"Filter created or updated"}}}},"/v2/filters/room-mcu-filter/{roomId}":{"post":{"summary":"Creates MCU filter for non MCU room","operationId":"createMCU","parameters":[{"name":"roomId","in":"path","description":"Room Id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"MCU filter created for room"}}},"delete":{"summary":"Deletes MCU filter for non MCU room","operationId":"deleteMCU","parameters":[{"name":"roomId","in":"path","description":"Room Id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"MCU filter deleted for room"}}}},"/v2/filters/{id}":{"delete":{"summary":"Delete the filter according to the filterId","operationId":"delete","parameters":[{"name":"id","in":"path","description":"Filter id for deleting filter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Filter deleted"}}}},"/v2/filters/list/{offset}/{size}":{"get":{"summary":"Returns the list of filters effective in the application","operationId":"getFilters","parameters":[{"name":"offset","in":"path","description":"This is the offset of the list, it is useful for pagination. If you want to use sort mechanism, we recommend using Mongo DB.","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"size","in":"path","description":"Number of items that will be fetched. If there is not enough item in the datastore, returned list size may less then this value","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"List of filters returned"}}}},"/v2/filters/mcu-filter/{id}":{"delete":{"summary":"Reset the default MCU filter","operationId":"resetMCUFilter","parameters":[{"name":"id","in":"path","description":"Filter object with the updates","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Default MCU filter reset"}}}},"/v2/filters/mcu-filter":{"put":{"summary":"Set a filter specific to the MCU room","operationId":"setCustomMCUFilter","requestBody":{"description":"Filter object with the updates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilterConfiguration"}}}},"responses":{"200":{"description":"Custom MCU filter set"}}}},"/v2/filters/mcu-plugin-type":{"put":{"summary":"Set the plugin type of the MCU function","operationId":"setPluginType","parameters":[{"name":"type","in":"query","description":"Change the plugin type for a filter: synchronous | asynchronous (default) | lastpoint","schema":{"type":"string"}}],"responses":{"200":{"description":"MCU plugin type set"}}}},"/v2/push-notification/subscriber-auth-token":{"get":{"operationId":"getSubscriberAuthenticationToken","parameters":[{"name":"subscriberId","in":"query","schema":{"type":"string"}},{"name":"timeoutSeconds","in":"query","schema":{"type":"integer","format":"int32"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/push-notification/subscribers":{"post":{"operationId":"sendPushNotification","parameters":[{"name":"serviceName","in":"query","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushNotificationToSubscribers"}}}},"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/push-notification/topics/{topic}":{"post":{"operationId":"sendPushNotification_1","parameters":[{"name":"topic","in":"path","required":true,"schema":{"type":"string"}},{"name":"serviceName","in":"query","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}}},"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/version":{"get":{"summary":"Returns the Ant Media Server Version","description":"Retrieves the version information of the Ant Media Server.","operationId":"getVersion","responses":{"200":{"description":"Ant Media Server Version","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Version"}}}}}}},"/v2/vods/{id}":{"get":{"summary":"VoD file from database","description":"Retrieves a VoD file from the database by its ID.","operationId":"getVoD","parameters":[{"name":"id","in":"path","description":"ID of the VoD file","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"VoD file retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoD"}}}},"404":{"description":"VoD file not found"}}},"delete":{"summary":"Delete specific VoD File","description":"Deletes a specific VoD file from the database by its ID.","operationId":"deleteVoD","parameters":[{"name":"id","in":"path","description":"ID of the VoD file","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"VoD file deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"404":{"description":"VoD file not found"}}}},"/v2/vods":{"delete":{"summary":"Delete bulk VoD Files based on Vod Id","description":"Deletes multiple VoD files from the database by their IDs.","operationId":"deleteVoDsBulk","parameters":[{"name":"ids","in":"query","description":"Comma-separated IDs of the VoD files","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"VoD files deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/vods/count":{"get":{"summary":"Get the total number of VoDs","description":"Retrieves the total number of VoD files in the database.","operationId":"getTotalVodNumber","responses":{"200":{"description":"Total number of VoDs retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleStat"}}}}}}},"/v2/vods/count/{search}":{"get":{"summary":"Get the partial number of VoDs depending on the searched items","description":"Retrieves the number of VoD files that include the specified search parameter.","operationId":"getTotalVodNumber_1","parameters":[{"name":"search","in":"path","description":"Search parameter to get the number of items including it","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Partial number of VoDs retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleStat"}}}}}}},"/v2/vods/list/{offset}/{size}":{"get":{"summary":"Get the VoD list from database","description":"Retrieves the list of VoD files from the database. It returns up to 50 items. You can use offset value to get result page by page.","operationId":"getVodList","parameters":[{"name":"offset","in":"path","description":"Offset of the list","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"size","in":"path","description":"Number of items that will be fetched","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"sort_by","in":"query","description":"Field to sort. Possible values are 'name', 'date'","schema":{"type":"string"}},{"name":"order_by","in":"query","description":"'asc' for Ascending, 'desc' for Descending order","schema":{"type":"string"}},{"name":"streamId","in":"query","description":"ID of the stream to filter the results by stream ID","schema":{"type":"string"}},{"name":"search","in":"query","description":"Search string","schema":{"type":"string"}}],"responses":{"200":{"description":"VoD list retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoD"}}}}}}},"/v2/vods/directory":{"post":{"summary":"Import VoD files from a directory and make them streamable.","description":"Imports VoD files from a directory to the datastore and links them to the streams.","operationId":"importVoDs","parameters":[{"name":"directory","in":"query","description":"The full path of the directory that VoD files will be imported to the datastore and linked to the streams","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"VoD files imported successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}},"delete":{"summary":"Unlinks VoD path from streams directory and delete the database record.","description":"Deletes the database record associated with the specified directory, without deleting the files themselves.","operationId":"unlinksVoD","parameters":[{"name":"directory","in":"query","description":"The full path of the directory from which imported VoD files will be deleted from the database","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"VoD records unlinked successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/vods/import-to-stalker":{"post":{"summary":"Import VoDs to Stalker Portal","description":"Imports VoDs to the Stalker Portal.","operationId":"importVoDsToStalker","responses":{"200":{"description":"VoDs imported successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/v2/vods/create":{"post":{"summary":"Upload external VoD file to Ant Media Server","description":"Uploads an external VoD file to Ant Media Server.","operationId":"uploadVoDFile","parameters":[{"name":"name","in":"query","description":"Name of the VoD File","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"object","description":"VoD file"}}}}}},"responses":{"200":{"description":"VoD file uploaded successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}}},"components":{"schemas":{"Result":{"type":"object","properties":{"success":{"type":"boolean","description":"The result of the operation"},"message":{"type":"string","description":"The message of the operation result"},"dataId":{"type":"string","description":"The id of the record if operation is about adding a record"},"errorId":{"type":"integer","description":"The id of error of the operation result","format":"int32"}},"description":"The basic result class"},"Endpoint":{"type":"object","properties":{"status":{"type":"string","description":"Status of the RTMP muxer, possible values are started, finished, failed, broadcasting, {@link IAntMediaStreamHandler#BROADCAST_STATUS_*}"},"type":{"type":"string","description":"The service name like facebook, periscope, youtube or generic"},"rtmpUrl":{"type":"string","description":"The RTMP URL of the endpoint"},"endpointServiceId":{"type":"string","description":"The endpoint service id, this field holds the id of the endpoint"}},"description":"The endpoint class, such as Facebook, Twitter or custom RTMP endpoints"},"Subscriber":{"type":"object","properties":{"subscriberId":{"type":"string","description":"The subscriber id of the subscriber"},"streamId":{"type":"string","description":"The stream id of the token"},"b32Secret":{"type":"string","description":"Secret code of the subscriber","writeOnly":true},"type":{"type":"string","description":"Type of subscriber (play or publish). Pay attention that 'publish' type can also play the streams for making easy to join video conferencing"},"connected":{"type":"boolean","description":"Is subscriber connected"},"currentConcurrentConnections":{"type":"integer","description":"Count of subscriber usage","format":"int32"},"concurrentConnectionsLimit":{"type":"integer","description":"Count of subscriber usage","format":"int32"},"blockedType":{"type":"string"},"blockedUntilUnitTimeStampMs":{"type":"integer","format":"int64"},"registeredNodeIp":{"type":"string"},"avgVideoBitrate":{"type":"integer","description":"Average video bitrate for a subscriber","format":"int64"},"avgAudioBitrate":{"type":"integer","description":"Average audio bitrate for a subscriber","format":"int64"}},"description":"The time based token subscriber class. This keeps which subscriber can access to which stream and which TOTP"},"Broadcast":{"type":"object","properties":{"streamId":{"type":"string","description":"the id of the stream"},"status":{"type":"string","description":"the status of the stream","enum":["finished","broadcasting","created","preparing","error","failed"]},"playListStatus":{"type":"string","description":"The status of the playlist. It's usable if type is playlist","enum":["finished","broadcasting","created","preparing","error","failed"]},"type":{"type":"string","description":"the type of the stream","enum":["liveStream","ipCamera","streamSource","VoD","playlist"]},"publishType":{"type":"string","description":"The publish type of the stream. It's read-only and its value updated on the server side","enum":["WebRTC","RTMP","Pull"]},"name":{"type":"string","description":"the name of the stream"},"description":{"type":"string","description":"the description of the stream"},"publish":{"type":"boolean","description":"it is a video filter for the service, this value is controlled by the user, default value is true in the db"},"date":{"type":"integer","description":"the date when record is created in milliseconds","format":"int64"},"plannedStartDate":{"type":"integer","description":"the planned start date","format":"int64"},"plannedEndDate":{"type":"integer","description":"the planned end date","format":"int64"},"duration":{"type":"integer","description":"the duration of the stream in milliseconds","format":"int64"},"endPointList":{"type":"array","description":"the list of endpoints such as Facebook, Twitter or custom RTMP endpoints ","items":{"$ref":"#/components/schemas/Endpoint"}},"playListItemList":{"type":"array","description":"the list broadcasts in the playlis. This list has values when the broadcast type is playlist","items":{"$ref":"#/components/schemas/PlayListItem"}},"publicStream":{"type":"boolean","description":"the identifier of whether stream is public or not"},"is360":{"type":"boolean","description":"the identifier of whether stream is 360 or not"},"listenerHookURL":{"type":"string","description":"the url that will be notified when stream is published, ended and muxing finished"},"category":{"type":"string","description":"the category of the stream"},"ipAddr":{"type":"string","description":"the IP Address of the IP Camera or publisher"},"username":{"type":"string","description":"the user name of the IP Camera"},"password":{"type":"string","description":"the password of the IP Camera"},"quality":{"type":"string","description":"the quality of the incoming stream during publishing"},"speed":{"type":"number","description":"the speed of the incoming stream, for better quality and performance it should be around 1.00","format":"double"},"streamUrl":{"type":"string","description":"the stream URL for fetching stream, especially should be defined for IP Cameras or Cloud streams"},"originAdress":{"type":"string","description":"the origin address server broadcasting"},"mp4Enabled":{"type":"integer","description":"MP4 muxing whether enabled or not for the stream, 1 means enabled, -1 means disabled, 0 means no settings for the stream","format":"int32"},"webMEnabled":{"type":"integer","description":"WebM muxing whether enabled or not for the stream, 1 means enabled, -1 means disabled, 0 means no settings for the stream","format":"int32"},"seekTimeInMs":{"type":"integer","description":"Initial time to start playing. It can be used in VoD file or stream sources that has seek support","format":"int64"},"conferenceMode":{"type":"string","description":"Conference mode. It's used if this broadcast has some specific modes. It's created for backward compatibility. It will be deleted."},"subtracksLimit":{"type":"integer","description":"Number of subtracks that is allowed to be created for the broadcast. It's usefult for limiting number of conference attendees. Default value is -1 and it means no limit","format":"int32"},"expireDurationMS":{"type":"integer","description":"the expire time in milliseconds For instance if this value is 10000 then broadcast should be started in 10 seconds after it is created.If expire duration is 0, then stream will never expire","format":"int32"},"rtmpURL":{"type":"string","description":"the RTMP URL where to publish live stream to"},"zombi":{"type":"boolean","description":"is true, if a broadcast that is not added to data store through rest service or management console It is false by default"},"pendingPacketSize":{"type":"integer","description":"the number of audio and video packets that is being pending to be encoded in the queue ","format":"int32"},"hlsViewerCount":{"type":"integer","description":"the number of HLS viewers of the stream","format":"int32"},"dashViewerCount":{"type":"integer","description":"the number of DASH viewers of the stream","format":"int32"},"webRTCViewerCount":{"type":"integer","description":"the number of WebRTC viewers of the stream","format":"int32"},"rtmpViewerCount":{"type":"integer","description":"the number of RTMP viewers of the stream","format":"int32"},"startTime":{"type":"integer","description":"the publishing start time of the stream","format":"int64"},"receivedBytes":{"type":"integer","description":"the received bytes until now","format":"int64"},"bitrate":{"type":"integer","description":"the received bytes / duration","format":"int64"},"userAgent":{"type":"string","description":"User - Agent"},"latitude":{"type":"string","description":"latitude of the broadcasting location"},"longitude":{"type":"string","description":"longitude of the broadcasting location"},"altitude":{"type":"string","description":"altitude of the broadcasting location"},"mainTrackStreamId":{"type":"string","description":"If this broadcast is a track of a WebRTC stream. This variable is Id of that stream."},"subTrackStreamIds":{"type":"array","description":"If this broadcast is main track. This variable hold sub track ids.","items":{"type":"string","description":"If this broadcast is main track. This variable hold sub track ids."}},"absoluteStartTimeMs":{"type":"integer","description":"Absolute start time in milliseconds - unix timestamp. It's used for measuring the absolute latency","format":"int64"},"webRTCViewerLimit":{"type":"integer","description":"Number of the allowed maximum WebRTC viewers for the broadcast","format":"int32"},"hlsViewerLimit":{"type":"integer","description":"Number of the allowed maximum HLS viewers for the broadcast","format":"int32"},"dashViewerLimit":{"type":"integer","description":"Number of the allowed maximum DASH viewers for the broadcast","format":"int32"},"subFolder":{"type":"string","description":"Name of the subfolder that will contain stream files"},"currentPlayIndex":{"type":"integer","description":"Current playing index for playlist types","format":"int32"},"metaData":{"type":"string","description":"Meta data filed for the custom usage"},"playlistLoopEnabled":{"type":"boolean","description":"the identifier of playlist loop status"},"updateTime":{"type":"integer","format":"int64"},"role":{"type":"string","description":"Broadcast role for selective playback"},"hlsParameters":{"$ref":"#/components/schemas/HLSParameters"},"autoStartStopEnabled":{"type":"boolean","description":"The identifier of whether stream should start/stop automatically. It's effective for Stream Sources/IP Cameras. If there is no viewer after certain amount of seconds, it will stop. If there is an user want to watch the stream, it will start automatically"},"encoderSettingsList":{"type":"array","description":"The list of encoder settings","items":{"$ref":"#/components/schemas/EncoderSettings"}},"anyoneWatching":{"type":"boolean"}},"description":"The basic broadcast class"},"EncoderSettings":{"type":"object","properties":{"height":{"type":"integer","format":"int32"},"videoBitrate":{"type":"integer","format":"int32"},"audioBitrate":{"type":"integer","format":"int32"},"forceEncode":{"type":"boolean"}}},"HLSParameters":{"type":"object","properties":{"hlsTime":{"type":"string","description":"Duration of segments in m3u8 files in seconds"},"hlsListSize":{"type":"string","description":"Set the maximum number of playlist entries, If 0 the list file will contain all the segments"},"hlsPlayListType":{"type":"string","description":"Playlist type of m3u8 files, Can be 'event' or 'vod' or empty"}}},"PlayListItem":{"type":"object","properties":{"streamUrl":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"durationInMs":{"type":"integer","format":"int64"},"seekTimeInMs":{"type":"integer","format":"int64"}}},"SimpleStat":{"type":"object","properties":{"number":{"type":"integer","description":"the stat value","format":"int64"}},"description":"Simple generic statistics class to return single values"},"BroadcastStatistics":{"type":"object","properties":{"totalRTMPWatchersCount":{"type":"integer","description":"The total RTMP viewers of the stream","format":"int32"},"totalHLSWatchersCount":{"type":"integer","description":"The total HLS viewers of the stream","format":"int32"},"totalWebRTCWatchersCount":{"type":"integer","description":"The total WebRTC viewers of the stream","format":"int32"},"totalDASHWatchersCount":{"type":"integer","description":"The total DASH viewers of the stream","format":"int32"}}},"AppBroadcastStatistics":{"type":"object","properties":{"totalRTMPWatchersCount":{"type":"integer","description":"The total RTMP viewers of the stream","format":"int32"},"totalHLSWatchersCount":{"type":"integer","description":"The total HLS viewers of the stream","format":"int32"},"totalWebRTCWatchersCount":{"type":"integer","description":"The total WebRTC viewers of the stream","format":"int32"},"totalDASHWatchersCount":{"type":"integer","description":"The total DASH viewers of the stream","format":"int32"},"activeLiveStreamCount":{"type":"integer","description":"The total active live stream count","format":"int32"}}},"ConnectionEvent":{"type":"object","properties":{"timestamp":{"type":"integer","description":"the unix timestamp of the event in milliseconds","format":"int64"},"eventType":{"type":"string","description":"The type of the event. It can have connected or disconnected values"},"instanceIP":{"type":"string","description":"IP address of the instance that this event happened"},"type":{"type":"string","description":"Connection type. It can be publish or play"},"eventProtocol":{"type":"string","description":"Event protocol. It can be webrtc, hls, dash"},"streamId":{"type":"string","description":"Stream id of the event"},"subscriberId":{"type":"string","description":"Subscriber id of the event"}},"description":"Connection Event for the subscriber"},"SubscriberStats":{"type":"object","properties":{"subscriberId":{"type":"string","description":"The subscriber id of the subscriber"},"streamId":{"type":"string","description":"The stream id of the token"},"connectionEvents":{"type":"array","description":"List of connection events","items":{"$ref":"#/components/schemas/ConnectionEvent"}},"avgVideoBitrate":{"type":"integer","description":"Average video bitrate for a subscriber","format":"int64"},"avgAudioBitrate":{"type":"integer","description":"Average audio bitrate for a subscriber","format":"int64"}},"description":"Statistics for each subsciber to the stream"},"ObjectId":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int32"},"date":{"type":"string","format":"date-time"}},"description":"The id of the detected object"},"TensorFlowObject":{"type":"object","properties":{"dbId":{"$ref":"#/components/schemas/ObjectId"},"objectName":{"type":"string","description":"The name of the detected object"},"probability":{"type":"number","description":"The probability of the detected object","format":"float"},"detectionTime":{"type":"integer","description":"The time of the detected object","format":"int64"},"imageId":{"type":"string","description":"The id of the detected image"},"minX":{"type":"number","description":"The x coordinate of the upper-left corner of detected object frame","format":"double"},"minY":{"type":"number","description":"The y coordinate of the upper-left corner of detected object frame","format":"double"},"maxX":{"type":"number","description":"The x coordinate of the lower-right corner of detected object frame","format":"double"},"maxY":{"type":"number","description":"The y coordinate of the lower-right corner of detected object frame","format":"double"}},"description":"The TensorFlow detected object class"},"Token":{"type":"object","properties":{"tokenId":{"type":"string","description":"The token id"},"streamId":{"type":"string","description":"The stream id associated with the token"},"expireDate":{"type":"integer","description":"The expiration date of the token","format":"int64"},"type":{"type":"string","description":"The type of the token"},"roomId":{"type":"string","description":"The id of the conference room which requested streams belong to"}},"description":"The one-time token class"},"RTMPToWebRTCStats":{"type":"object","properties":{"streamId":{"type":"string"},"encoderCount":{"type":"integer","format":"int32"},"totalVideoIngestTime":{"type":"integer","format":"int64"},"totalIngestedVideoPacketCount":{"type":"integer","format":"int64"},"totalVideoDecodeTime":{"type":"integer","format":"int64"},"totalDecodedVideoFrameCount":{"type":"integer","format":"int64"},"totalVideoEncodeQueueTime":{"type":"integer","format":"int64"},"totalVideoEncodeTime":{"type":"integer","format":"int64"},"totalEncodedVideoPacketCount":{"type":"integer","format":"int64"},"totalVideoDeliveryTime":{"type":"integer","format":"int64"},"totalDeliveredVideoPacketCount":{"type":"integer","format":"int64"},"absoluteTotalIngestTime":{"type":"integer","format":"int64"},"absoluteTimeMs":{"type":"integer","format":"int64"},"absouteTotalLatencyUntilRTPPacketizingTimeMs":{"type":"integer","format":"int64"},"frameId":{"type":"integer","format":"int64"},"captureTimeMs":{"type":"integer","format":"int64"},"absoluteIngestTime":{"type":"integer","format":"int64","writeOnly":true}}},"BasicStreamInfo":{"type":"object","properties":{"videoHeight":{"type":"integer","format":"int32"},"videoWidth":{"type":"integer","format":"int32"},"videoBitrate":{"type":"integer","format":"int32"},"audioBitrate":{"type":"integer","format":"int32"},"videoCodec":{"type":"string","enum":["NoCodec","VP8","H264","PNG","H265","JPG","WEBP"]}}},"WebRTCAudioSendStats":{"type":"object","properties":{"audioPacketsSent":{"type":"integer","format":"int64"},"audioBytesSent":{"type":"integer"},"audioPacketsPerSecond":{"type":"integer","format":"int64"},"audioBytesSentPerSecond":{"type":"integer"},"timeMs":{"type":"integer","format":"int64"},"audioPacketsSentPerSecond":{"type":"integer","format":"int64","writeOnly":true}},"description":"Audio send stats"},"WebRTCClientStats":{"type":"object","properties":{"measuredBitrate":{"type":"integer","description":"The measured bitrate of the WebRTC Client","format":"int32"},"sendBitrate":{"type":"integer","description":"The sent bitrate of the WebRTC Client","format":"int32"},"videoFrameSendPeriod":{"type":"number","description":"The video frame sent period of the WebRTC Client","format":"double"},"audioFrameSendPeriod":{"type":"number","description":"The audio frame send period of the WebRTC Client","format":"double"},"clientId":{"type":"integer","description":"WebRTC Client Id which is basically hash of the object","format":"int32"},"videoPacketCount":{"type":"integer","description":"Number of video packets sent","format":"int64"},"audioPacketCount":{"type":"integer","description":"Number of audio packets sent","format":"int64"},"videoSentStats":{"$ref":"#/components/schemas/WebRTCVideoSendStats"},"audioSentStats":{"$ref":"#/components/schemas/WebRTCAudioSendStats"},"clientInfo":{"type":"string","description":"Free text information for the client"},"clientIp":{"type":"string","description":"WebRTC Client's ip address"}},"description":"WebRTC Client statistics."},"WebRTCVideoSendStats":{"type":"object","properties":{"videoFirCount":{"type":"integer","format":"int64"},"videoPliCount":{"type":"integer","format":"int64"},"videoNackCount":{"type":"integer","format":"int64"},"videoPacketsSent":{"type":"integer","format":"int64"},"videoFramesEncoded":{"type":"integer","format":"int64"},"videoBytesSent":{"type":"integer"},"videoPacketsSentPerSecond":{"type":"integer","format":"int64"},"videoBytesSentPerSecond":{"type":"integer"},"videoFramesEncodedPerSecond":{"type":"integer","format":"int64"},"timeMs":{"type":"integer","format":"int64"}},"description":"Video send stats"},"WebRTCAudioReceiveStats":{"type":"object","properties":{"audioPacketsReceived":{"type":"integer","format":"int64"},"audioBytesReceived":{"type":"integer"},"audioPacketsLost":{"type":"integer","format":"int32"},"audioJitter":{"type":"number","format":"double"},"audioFractionLost":{"type":"number","format":"double"},"audioPacketsReceivedPerSecond":{"type":"integer","format":"int64"},"audioBytesReceivedPerSecond":{"type":"integer"}},"description":"Audio receive stats"},"WebRTCReceiveStats":{"type":"object","properties":{"audioReceiveStats":{"$ref":"#/components/schemas/WebRTCAudioReceiveStats"},"videoReceiveStats":{"$ref":"#/components/schemas/WebRTCVideoReceiveStats"}},"description":"Aggregation of WebRTC Low Level Receive Stats"},"WebRTCVideoReceiveStats":{"type":"object","properties":{"videoFirCount":{"type":"integer","format":"int64"},"videoPliCount":{"type":"integer","format":"int64"},"videoNackCount":{"type":"integer","format":"int64"},"videoPacketsReceived":{"type":"integer","format":"int64"},"videoPacketsLost":{"type":"integer","format":"int32"},"videoFractionLost":{"type":"number","format":"double"},"videoFrameReceived":{"type":"integer","format":"int64"},"videoBytesReceived":{"type":"integer"},"videoPacketsReceivedPerSecond":{"type":"integer","format":"int64"},"videoBytesReceivedPerSecond":{"type":"integer"},"videoFrameReceivedPerSecond":{"type":"integer","format":"int64"}},"description":"Video receive stats"},"WebRTCSendStats":{"type":"object","properties":{"audioSendStats":{"$ref":"#/components/schemas/WebRTCAudioSendStats"},"videoSendStats":{"$ref":"#/components/schemas/WebRTCVideoSendStats"}},"description":"Aggregation of WebRTC Low Level Send Stats"},"BroadcastUpdate":{"type":"object","properties":{"streamId":{"type":"string"},"status":{"type":"string"},"playListStatus":{"type":"string"},"type":{"type":"string"},"publishType":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"publish":{"type":"boolean"},"date":{"type":"integer","format":"int64"},"plannedStartDate":{"type":"integer","format":"int64"},"plannedEndDate":{"type":"integer","format":"int64"},"duration":{"type":"integer","format":"int64"},"endPointList":{"type":"array","items":{"$ref":"#/components/schemas/Endpoint"}},"playListItemList":{"type":"array","items":{"$ref":"#/components/schemas/PlayListItem"}},"publicStream":{"type":"boolean"},"is360":{"type":"boolean"},"listenerHookURL":{"type":"string"},"category":{"type":"string"},"ipAddr":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"quality":{"type":"string"},"speed":{"type":"number","format":"double"},"streamUrl":{"type":"string"},"originAdress":{"type":"string"},"mp4Enabled":{"type":"integer","format":"int32"},"webMEnabled":{"type":"integer","format":"int32"},"seekTimeInMs":{"type":"integer","format":"int32"},"conferenceMode":{"type":"string"},"subtracksLimit":{"type":"integer","format":"int32"},"expireDurationMS":{"type":"integer","format":"int32"},"rtmpURL":{"type":"string"},"zombi":{"type":"boolean"},"pendingPacketSize":{"type":"integer","format":"int32"},"hlsViewerCount":{"type":"integer","format":"int32"},"dashViewerCount":{"type":"integer","format":"int32"},"webRTCViewerCount":{"type":"integer","format":"int32"},"rtmpViewerCount":{"type":"integer","format":"int32"},"startTime":{"type":"integer","format":"int64"},"receivedBytes":{"type":"integer","format":"int64"},"bitrate":{"type":"integer","format":"int64"},"userAgent":{"type":"string"},"latitude":{"type":"string"},"longitude":{"type":"string"},"altitude":{"type":"string"},"mainTrackStreamId":{"type":"string"},"subTrackStreamIds":{"type":"array","items":{"type":"string"}},"absoluteStartTimeMs":{"type":"integer","format":"int64"},"webRTCViewerLimit":{"type":"integer","format":"int32"},"hlsViewerLimit":{"type":"integer","format":"int32"},"dashViewerLimit":{"type":"integer","format":"int32"},"subFolder":{"type":"string"},"currentPlayIndex":{"type":"integer","format":"int32"},"metaData":{"type":"string"},"playlistLoopEnabled":{"type":"boolean"},"updateTime":{"type":"integer","format":"int64"},"role":{"type":"string"},"hlsParameters":{"$ref":"#/components/schemas/HLSParameters"},"autoStartStopEnabled":{"type":"boolean"},"encoderSettingsList":{"type":"array","items":{"$ref":"#/components/schemas/EncoderSettings"}}},"description":"This is the BroadcastUpdate and it's almost same with BroadcastUpdate with all default values are null. We update the fields in update method if it's not null.It makes this data up to date in race conditions."},"FilterConfiguration":{"type":"object","properties":{"filterId":{"type":"string"},"inputStreams":{"type":"array","items":{"type":"string"}},"outputStreams":{"type":"array","items":{"type":"string"}},"videoFilter":{"type":"string"},"audioFilter":{"type":"string"},"type":{"type":"string"},"videoEnabled":{"type":"boolean"},"audioEnabled":{"type":"boolean"}}},"PushNotificationToSubscribers":{"type":"object","properties":{"subscribers":{"type":"array","items":{"type":"string"}},"jsonMessage":{"type":"string"}}},"Version":{"type":"object","properties":{"versionName":{"type":"string","description":"Version of the software"},"versionType":{"type":"string","description":"Version type of the software (Community or Enterprise)"},"buildNumber":{"type":"string","description":"Build number(timestamp) of the software."}},"description":"The version class"},"VoD":{"type":"object","properties":{"streamName":{"type":"string","description":"The object id of the VoD"},"vodName":{"type":"string","description":"The name of the VoD"},"streamId":{"type":"string","description":"The stream id of the VoD"},"creationDate":{"type":"integer","description":"The creation date of the VoD","format":"int64"},"startTime":{"type":"integer","description":"The start time of the VoD recording in milliseconds (UTC- Unix epoch)","format":"int64"},"duration":{"type":"integer","description":"The duration of the VoD","format":"int64"},"fileSize":{"type":"integer","description":"The size of the VoD file in bytes","format":"int64"},"filePath":{"type":"string","description":"The path of the VoD"},"vodId":{"type":"string","description":"The id of the VoD"},"type":{"type":"string","description":"The type of the VoD, such as userVod, streamVod, uploadedVod"},"previewFilePath":{"type":"string","description":"The file path for the preview of the VoD"},"processStatus":{"type":"string","description":"The status of the VoD processing. It can be inqueue, processing, finished, failed"},"processStartTime":{"type":"integer","description":"The start time of the VoD processing in milliseconds (UTC- Unix epoch)","format":"int64","readOnly":true},"processEndTime":{"type":"integer","description":"The end time of the VoD processing in milliseconds","format":"int64","readOnly":true},"description":{"type":"string","description":"The description of the VoD."},"metadata":{"type":"string","description":"The metadata of the VoD."},"latitude":{"type":"string","description":"The latitude of the VoD."},"longitude":{"type":"string","description":"The longitude of the VoD."},"altitude":{"type":"string","description":"The altitude of the VoD."}},"description":"The recorded video-on-demand object class"}}}}