Jump to content
  • 0

Rest API, createBroadcast


Lluis Semper
 Share

Question

Hi, I am using the REST API and call the createBroadcast enpoint '/v2/broadcasts/create'.

 

This works fine, it creates the broadcast and I can see in in the ANT Dashboard.

My problem comes when I try to add rtmp endpoints to that broadcast.

 

When I call the createBroadcast endpoint I can pass options. I pass an EndPointList which contains Enpoint Objects. 

 

The response of the REST API is the following one:

[0] Broadcast {
[0]   streamId: 'live-60911a5d28364a3c65159ac0-event-742536e9b14f60849a934c408fc7dfeed7c5',
[0]   status: 'created',
[0]   type: 'liveStream',
[0]   name: null,
[0]   description: null,
[0]   publish: true,
[0]   date: 1620215849199,
[0]   plannedStartDate: 0,
[0]   plannedEndDate: 0,
[0]   duration: 0,
[0]   endPointList: [
[0]     Endpoint {
[0]       type: null,
[0]       broadcastId: null,
[0]       streamId: 'live-60911a5d28364a3c65159ac0-event-742536e9b14f60849a934c408fc7dfeed7c5',
[0]       rtmpUrl: 'rtmp://aasd.co/qwewe',
[0]       name: null,
[0]       endpointServiceId: null,
[0]       serverStreamId: null
[0]     }
[0]   ],
[0]   publicStream: true,
[0]   is360: false,
[0]   listenerHookURL: 'https://xxxxxxxx/webhook',
[0]   category: null,
[0]   ipAddr: null,
[0]   username: null,
[0]   password: null,
[0]   quality: null,
[0]   speed: 0,
[0]   streamUrl: null,
[0]   originAdress: 'xx.x.x.xx',
[0]   mp4Enabled: 0,
[0]   webMEnabled: 0,
[0]   expireDurationMS: 0,
[0]   rtmpURL: 'rtmp://xx.x.x.x/live/live-60911a5d28364a3c65159ac0-event-742536e9b14f60849a934c408fc7dfeed7c5',
[0]   zombi: false,
[0]   pendingPacketSize: 0,
[0]   hlsViewerCount: 0,
[0]   webRTCViewerCount: 0,
[0]   rtmpViewerCount: 0,
[0]   startTime: 0,
[0]   receivedBytes: 0,
[0]   bitrate: 0,
[0]   userAgent: 'N/A',
[0]   latitude: null,
[0]   longitude: null,
[0]   altitude: null,
[0]   mainTrackStreamId: null,
[0]   subTrackStreamIds: null,
[0]   absoluteStartTimeMs: 0,
[0]   webRTCViewerLimit: -1,
[0]   hlsViewerLimit: -1
[0] }
Everything seems fine from the response but I can not find the RTMP endpoints in ANT Dashboard.

 

If I call 'POST /v2/broadcasts/{id}/rtmp-endpoint' endpoint everything works fine and it creates the endpoint. I can see them in the ANT Dashboard.

 

My question is if I can add the rtmpEndpoints in the broadcast creation. And if it is posible I would appreciatte some pointers of how to do it, or if I have any parameter missing. 

 

Kind Regards

 

Lluis

Link to comment
Share on other sites

  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

3 answers to this question

Recommended Posts

  • 0

Hi,

Have a good day.

Your endPointList should as below:
  • endPointList
    [
    • {
      • status: "created",
      • type: "generic",
      • broadcastId: null,
      • streamId: null,
      • rtmpUrl: "rtmp://localhost/LiveApp/streamID",
      • name: null,
      • endpointServiceId: "customOPTjAE",
      • serverStreamId: null,
      }
    ],
So, endpointServiceId, status, type and rtmpUrl parameters should be filled. Please change your endPointList as above. 

I hope, it's clear.

Best Regards,
Selim

Link to comment
Share on other sites

 Share

×
×
  • Create New...