ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.

Home Page:https://antmedia.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make REST services simpler

davutcavdar opened this issue · comments

  • Simplify stream create method
  • Merge StreamSourceRestService and BroadcastRestServices based on same operations, create, update, delete etc.

Customer comment :

  • API doesn't follow RESTful principles (ie use POST for create, PUT for
    update and DELETE for deletion). Here's what I would expect from a modern
    API:
    Create: POST /broadcast/{id} where {id} is optional
    Update: PUT /broadcast/{id}
    Delete: DELETE /broadcast/{id}

Related methods would use same format, e.g.
Create endpoint: POST /broadcast/{id}/endpoint/{endpointId}
Update endpoint: PUT /broadcast/{id}/endpoint/{endpointId}
Delete endpoint: DELETE /broadcast/{id}/endpoint/{endpointId}

  • Stream creation endpoints are confusing, there are too many with slight
    variations: create, createProtalBroadcast, createWithSocial,
    createWithStreamID, addStreamSource. What if I want to create an external
    stream, with specified streamId and social endpoints? In my opinion one
    should be enough. Same applies to update. It's my understanding that
    /streamSource/updateCamInfo should be used to update stream source
    configuration, but the name is confusing and makes it sound like it only
    applies to IP cameras.