Class BroadcastRestService

java.lang.Object
io.antmedia.rest.RestServiceBase
io.antmedia.rest.BroadcastRestService

@Component @Path("/v2/broadcasts") public class BroadcastRestService extends RestServiceBase
  • Field Details

  • Constructor Details

    • BroadcastRestService

      public BroadcastRestService()
  • Method Details

    • createBroadcast

      @POST @Consumes("application/json") @Path("/create") @Produces("application/json") public jakarta.ws.rs.core.Response createBroadcast(Broadcast broadcast, @QueryParam("autoStart") boolean autoStart)
    • deleteBroadcast

      @DELETE @Consumes("application/json") @Path("/{id}") @Produces("application/json") public Result deleteBroadcast(@PathParam("id") String id, @QueryParam("deleteSubtracks") Boolean deleteSubtracks)
      Overrides:
      deleteBroadcast in class RestServiceBase
    • deleteBroadcasts

      @Deprecated @DELETE @Consumes("application/json") @Path("/bulk") @Produces("application/json") public Result deleteBroadcasts(String[] streamIds)
      Deprecated.
      Use #deleteBroadcastsBulk(String[]) for compliance
      Overrides:
      deleteBroadcasts in class RestServiceBase
    • deleteBroadcastsBulk

      @DELETE @Consumes("application/json") @Path("/") @Produces("application/json") public Result deleteBroadcastsBulk(@QueryParam("ids") String streamIds)
    • getBroadcast

      @GET @Path("/{id}") @Produces("application/json") public jakarta.ws.rs.core.Response getBroadcast(@PathParam("id") String id)
    • getBroadcastList

      @GET @Path("/list/{offset}/{size}") @Produces("application/json") public List<Broadcast> getBroadcastList(@PathParam("offset") int offset, @PathParam("size") int size, @QueryParam("type_by") String typeBy, @QueryParam("sort_by") String sortBy, @QueryParam("order_by") String orderBy, @QueryParam("search") String search)
    • updateBroadcast

      @PUT @Consumes("application/json") @Path("/{id}") @Produces("application/json") public Result updateBroadcast(@PathParam("id") String id, BroadcastUpdate broadcast)
      Overrides:
      updateBroadcast in class RestServiceBase
    • getDuration

      @GET @Consumes("application/json") @Path("/duration") @Produces("application/json") public Result getDuration(@QueryParam("url") String url)
    • updateSeekTime

      @PUT @Consumes("application/json") @Path("/{id}/seek-time/{seekTimeMs}") @Produces("application/json") public Result updateSeekTime(@PathParam("id") String id, @PathParam("seekTimeMs") long seekTimeMs)
    • addEndpointV2

      @Deprecated @POST @Consumes("application/json") @Path("/{id}/endpoint") @Produces("application/json") public Result addEndpointV2(@PathParam("id") String id, @QueryParam("rtmpUrl") String rtmpUrl)
      Deprecated.
    • addEndpointV3

      @POST @Consumes("application/json") @Path("/{id}/rtmp-endpoint") @Produces("application/json") public Result addEndpointV3(@PathParam("id") String id, Endpoint endpoint, @QueryParam("resolutionHeight") int resolutionHeight)
    • logRtmpEndpointInfo

      private void logRtmpEndpointInfo(String id, Endpoint endpoint, boolean result)
    • removeEndpoint

      @Deprecated @DELETE @Consumes("application/json") @Path("/{id}/endpoint") @Produces("application/json") public Result removeEndpoint(@PathParam("id") String id, @QueryParam("rtmpUrl") String rtmpUrl)
      Deprecated.
      Overrides:
      removeEndpoint in class RestServiceBase
    • removeEndpointV2

      @DELETE @Consumes("application/json") @Path("/{id}/rtmp-endpoint") @Produces("application/json") public Result removeEndpointV2(@PathParam("id") String id, @QueryParam("endpointServiceId") String endpointServiceId, @QueryParam("resolutionHeight") int resolutionHeight)
    • removeRTMPEndpointProcess

      private Result removeRTMPEndpointProcess(Broadcast broadcast, Endpoint endpoint, int resolutionHeight, String id)
    • getRtmpUrlFromList

      private Endpoint getRtmpUrlFromList(String endpointServiceId, Broadcast broadcast)
    • getDetectionListV2

      @GET @Path("/{id}/detections/{offset}/{size}") @Produces("application/json") public List<TensorFlowObject> getDetectionListV2(@PathParam("id") String id, @PathParam("offset") int offset, @PathParam("size") int size)
    • getObjectDetectedTotal

      @GET @Path("/{id}/detections/count") @Produces("application/json") public BroadcastRestService.SimpleStat getObjectDetectedTotal(@PathParam("id") String id)
    • importLiveStreams2StalkerV2

      @POST @Path("/import-to-stalker") @Produces("application/json") public Result importLiveStreams2StalkerV2()
    • getTotalBroadcastNumberV2

      @GET @Path("/count") @Produces("application/json") public BroadcastRestService.SimpleStat getTotalBroadcastNumberV2()
    • getTotalBroadcastNumberV2

      @GET @Path("/count/{search}") @Produces("application/json") public BroadcastRestService.SimpleStat getTotalBroadcastNumberV2(@PathParam("search") String search)
    • getAppLiveStatistics

      @GET @Path("/active-live-stream-count") @Produces("application/json") public BroadcastRestService.SimpleStat getAppLiveStatistics()
    • getTokenV2

      @GET @Path("/{id}/token") @Produces("application/json") public jakarta.ws.rs.core.Response getTokenV2(@PathParam("id") String streamId, @QueryParam("expireDate") long expireDate, @QueryParam("type") String type, @QueryParam("roomId") String roomId)
    • getJwtTokenV2

      @GET @Path("/{id}/jwt-token") @Produces("application/json") public jakarta.ws.rs.core.Response getJwtTokenV2(@PathParam("id") String streamId, @QueryParam("expireDate") long expireDate, @QueryParam("type") String type, @QueryParam("roomId") String roomId)
    • validateTokenV2

      @POST @Consumes("application/json") @Path("/validate-token") @Produces("application/json") public Result validateTokenV2(Token token)
    • revokeTokensV2

      @DELETE @Consumes("application/json") @Path("/{id}/tokens") @Produces("application/json") public Result revokeTokensV2(@PathParam("id") String streamId)
    • listTokensV2

      @GET @Path("/{id}/tokens/list/{offset}/{size}") @Produces("application/json") public List<Token> listTokensV2(@PathParam("id") String streamId, @PathParam("offset") int offset, @PathParam("size") int size)
    • listSubscriberV2

      @GET @Path("/{id}/subscribers/list/{offset}/{size}") @Produces("application/json") public List<Subscriber> listSubscriberV2(@PathParam("id") String streamId, @PathParam("offset") int offset, @PathParam("size") int size)
    • listSubscriberStatsV2

      @GET @Path("/{id}/subscriber-stats/list/{offset}/{size}") @Produces("application/json") @Deprecated(since="2.12.0", forRemoval=true) public List<SubscriberStats> listSubscriberStatsV2(@PathParam("id") String streamId, @PathParam("offset") int offset, @PathParam("size") int size)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getConnectionEvents

      @GET @Path("/{id}/connection-events/{offset}/{size}") @Produces("application/json") public List<ConnectionEvent> getConnectionEvents(@PathParam("id") String streamId, @PathParam("offset") int offset, @PathParam("size") int size, @QueryParam("subscriberId") String subscriberId)
    • addSubscriber

      @POST @Consumes("application/json") @Path("/{id}/subscribers") @Produces("application/json") public Result addSubscriber(@PathParam("id") String streamId, Subscriber subscriber)
    • getTOTP

      @GET @Consumes("application/json") @Path("/{id}/subscribers/{sid}/totp") @Produces("application/json") public Result getTOTP(@PathParam("id") String streamId, @PathParam("sid") String subscriberId, @QueryParam("type") String type)
    • deleteSubscriber

      @DELETE @Consumes("application/json") @Path("/{id}/subscribers/{sid}") @Produces("application/json") public Result deleteSubscriber(@PathParam("id") String streamId, @PathParam("sid") String subscriberId)
    • blockSubscriber

      @PUT @Consumes("application/json") @Path("/{id}/subscribers/{sid}/block/{seconds}/{type}") @Produces("application/json") public Result blockSubscriber(@PathParam("id") String streamId, @PathParam("sid") String subscriberId, @PathParam("seconds") int seconds, @PathParam("type") String blockType)
    • revokeSubscribers

      @DELETE @Consumes("application/json") @Path("/{id}/subscribers") @Produces("application/json") public Result revokeSubscribers(@PathParam("id") String streamId)
    • getBroadcastStatistics

      @GET @Path("/{id}/broadcast-statistics") @Produces("application/json") public RestServiceBase.BroadcastStatistics getBroadcastStatistics(@PathParam("id") String id)
      Overrides:
      getBroadcastStatistics in class RestServiceBase
    • getBroadcastTotalStatistics

      @GET @Path("/total-broadcast-statistics") @Produces("application/json") public RestServiceBase.AppBroadcastStatistics getBroadcastTotalStatistics()
      Overrides:
      getBroadcastTotalStatistics in class RestServiceBase
    • getWebRTCLowLevelSendStats

      @GET @Path("/webrtc-send-low-level-stats") @Produces("application/json") public BroadcastRestService.WebRTCSendStats getWebRTCLowLevelSendStats()
    • getWebRTCLowLevelReceiveStats

      @GET @Path("/webrtc-receive-low-level-stats") @Produces("application/json") public BroadcastRestService.WebRTCReceiveStats getWebRTCLowLevelReceiveStats()
    • getRTMPToWebRTCStats

      @GET @Path("/{id}/rtmp-to-webrtc-stats") @Produces("application/json") public RTMPToWebRTCStats getRTMPToWebRTCStats(@PathParam("id") String id)
    • getWebRTCClientStatsListV2

      @GET @Path("/{stream_id}/webrtc-client-stats/{offset}/{size}") @Produces("application/json") public List<WebRTCClientStats> getWebRTCClientStatsListV2(@PathParam("offset") int offset, @PathParam("size") int size, @PathParam("stream_id") String streamId)
    • filterBroadcastListV2

      @Deprecated @GET @Consumes("application/json") @Path("/filter-list/{offset}/{size}/{type}") @Produces("application/json") public List<Broadcast> filterBroadcastListV2(@PathParam("offset") int offset, @PathParam("size") int size, @PathParam("type") String type, @QueryParam("sort_by") String sortBy, @QueryParam("order_by") String orderBy)
      Deprecated.
    • enableRecording

      @PUT @Consumes("application/json") @Path("/{id}/recording/{recording-status}") @Produces("application/json") public Result enableRecording(@PathParam("id") String streamId, @PathParam("recording-status") boolean enableRecording, @QueryParam("recordType") String recordType, @QueryParam("resolutionHeight") int resolutionHeight)
    • getCameraErrorV2

      @GET @Consumes("application/json") @Path("/{streamId}/ip-camera-error") @Produces("application/json") public Result getCameraErrorV2(@PathParam("streamId") String streamId)
    • startStreamSourceV2

      @POST @Consumes("application/json") @Path("/{id}/start") @Produces("application/json") public Result startStreamSourceV2(@PathParam("id") String id)
    • playNextItem

      @POST @Consumes("application/json") @Path("/playlists/{id}/next") @Produces("application/json") public Result playNextItem(@PathParam("id") String id, @QueryParam("index") Integer index)
      Overrides:
      playNextItem in class RestServiceBase
    • stopStreamingV2

      @POST @Consumes("application/json") @Path("/{id}/stop") @Produces("application/json") public Result stopStreamingV2(@PathParam("id") String id, @QueryParam("stopSubtracks") Boolean stopSubtracks)
    • searchOnvifDevicesV2

      @GET @Path("/onvif-devices") @Produces("application/json") public String[] searchOnvifDevicesV2()
    • getOnvifDeviceProfiles

      @GET @Path("/{id}/ip-camera/device-profiles") @Produces("application/json") public String[] getOnvifDeviceProfiles(@PathParam("id") String id)
      Overrides:
      getOnvifDeviceProfiles in class RestServiceBase
    • moveIPCamera

      @POST @Path("/{id}/ip-camera/move") @Produces("application/json") public Result moveIPCamera(@PathParam("id") String id, @QueryParam("valueX") Float valueX, @QueryParam("valueY") Float valueY, @QueryParam("valueZ") Float valueZ, @QueryParam("movement") String movement)
    • stopMove

      @POST @Path("/{id}/ip-camera/stop-move") @Produces("application/json") public Result stopMove(@PathParam("id") String id)
    • createConferenceRoomV2

      @POST @Consumes("application/json") @Path("/conference-rooms") @Produces("application/json") @Deprecated(since="2.9.1", forRemoval=true) public jakarta.ws.rs.core.Response createConferenceRoomV2(ConferenceRoom room)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • editConferenceRoom

      @PUT @Consumes("application/json") @Path("/conference-rooms/{room_id}") @Produces("application/json") @Deprecated(since="2.9.1", forRemoval=true) public jakarta.ws.rs.core.Response editConferenceRoom(@PathParam("room_id") String roomId, ConferenceRoom room)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • deleteConferenceRoomV2

      @DELETE @Consumes("application/json") @Path("/conference-rooms/{room_id}") @Produces("application/json") @Deprecated(since="2.9.1", forRemoval=true) public Result deleteConferenceRoomV2(@PathParam("room_id") String roomId)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • addSubTrack

      @POST @Consumes("application/json") @Path("/{id}/subtrack") @Produces("application/json") public Result addSubTrack(@PathParam("id") String id, @QueryParam("id") String subTrackId)
    • removeSubTrack

      @DELETE @Consumes("application/json") @Path("/{id}/subtrack") @Produces("application/json") public Result removeSubTrack(@PathParam("id") String id, @QueryParam("id") String subTrackId)
    • getStreamInfo

      @GET @Consumes("application/json") @Path("/{id}/stream-info") @Produces("application/json") public BasicStreamInfo[] getStreamInfo(@PathParam("id") String streamId)
    • sendMessage

      @POST @Consumes("application/json") @Path("/{id}/data") @Produces("application/json") public Result sendMessage(String message, @PathParam("id") String id)
    • getConferenceRoomList

      @GET @Path("/conference-rooms/list/{offset}/{size}") @Produces("application/json") @Deprecated(since="2.9.1", forRemoval=true) public List<ConferenceRoom> getConferenceRoomList(@PathParam("offset") int offset, @PathParam("size") int size, @QueryParam("sort_by") String sortBy, @QueryParam("order_by") String orderBy, @QueryParam("search") String search)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getConferenceRoom

      @GET @Path("/conference-rooms/{roomId}") @Produces("application/json") public jakarta.ws.rs.core.Response getConferenceRoom(@PathParam("roomId") String id)
    • getRoomInfo

      @GET @Consumes("application/json") @Path("/conference-rooms/{room_id}/room-info") @Produces("application/json") @Deprecated(since="2.9.1", forRemoval=true) public RootRestService.RoomInfo getRoomInfo(@PathParam("room_id") String roomId, @QueryParam("streamId") String streamId)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      roomId -
      streamId -
      Returns:
    • addStreamToTheRoomDeprecated

      @PUT @Consumes("application/json") @Path("/conference-rooms/{room_id}/add") @Produces("application/json") @Deprecated(since="2.6.2", forRemoval=true) public Result addStreamToTheRoomDeprecated(@PathParam("room_id") String roomId, @QueryParam("streamId") String streamId)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • addStreamToTheRoom

      @PUT @Consumes("application/json") @Path("/conference-rooms/{room_id}/{streamId}") @Produces("application/json") @Deprecated(since="2.9.1", forRemoval=true) public Result addStreamToTheRoom(@PathParam("room_id") String roomId, @PathParam("streamId") String streamId)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • deleteStreamFromTheRoomDeprecated

      @PUT @Consumes("application/json") @Path("/conference-rooms/{room_id}/delete") @Produces("application/json") @Deprecated(since="2.6.2", forRemoval=true) public Result deleteStreamFromTheRoomDeprecated(@PathParam("room_id") String roomId, @QueryParam("streamId") String streamId)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • deleteStreamFromTheRoom

      @DELETE @Consumes("application/json") @Path("/conference-rooms/{room_id}/{streamId}") @Produces("application/json") @Deprecated(since="2.9.1", forRemoval=true) public Result deleteStreamFromTheRoom(@PathParam("room_id") String roomId, @PathParam("streamId") String streamId)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getWebRTCViewerList

      @Deprecated(since="2.7.0", forRemoval=true) @GET @Path("/webrtc-viewers/list/{offset}/{size}") @Produces("application/json") public List<WebRTCViewerInfo> getWebRTCViewerList(@PathParam("offset") int offset, @PathParam("size") int size, @QueryParam("sort_by") String sortBy, @QueryParam("order_by") String orderBy, @QueryParam("search") String search)
      Deprecated, for removal: This API element is subject to removal in a future version.
      use subscriber rest methods, it will be deleted next versions
      Parameters:
      offset -
      size -
      sortBy -
      orderBy -
      search -
      Returns:
    • stopPlaying

      @Deprecated(since="2.7.0", forRemoval=true) @POST @Consumes("application/json") @Path("/webrtc-viewers/{webrtc-viewer-id}/stop") @Produces("application/json") public Result stopPlaying(@PathParam("webrtc-viewer-id") String viewerId)
      Deprecated, for removal: This API element is subject to removal in a future version.
      use subscriber rest methods, it will be deleted next versions
      Parameters:
      viewerId -
      Returns:
    • addID3Data

      @POST @Consumes("application/json") @Path("/{stream_id}/id3") @Produces("application/json") public Result addID3Data(@PathParam("stream_id") String streamId, String data)
    • addSEIData

      @POST @Consumes("application/json") @Path("/{stream_id}/sei") @Produces("application/json") public Result addSEIData(@PathParam("stream_id") String streamId, String data)