Make REST services simpler
davutcavdar opened this issue · 0 comments
davutcavdar commented
- 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.