[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 245
  • Last Modified:

REST Design

Consider this scenario

Sensor asset streaming ‘live’ media (media = ‘video’).
‘live’ media can be archived (client driven).  
Archived media can be searched (There’s metadata so keyword searches can be performed)
Archived media can be streamed (effectively this video on demand)


At issue, I’m struggling to define resource representations that make a clear distinction  between ‘live’ video and ‘video on demand’ (archived media being streamed)

 

1.     Get live media  
GET /livemedia
2.     Get live media based on Keyword  
GET /livemedia?q={keyword}  
3.     Get archived media    
GET /archivedmedia
4.     Get archived media based on Keyword,etc (timestamp)
 
GET /archivedmedia?q={keyword}}&ts={timestamp}  

5.     Stream archived media (hence video on demand) using uuid from response in 3 and 4 above…    
POST /mediaondemand/{uuid}  

The representation in 5) now introduced  
GET /mediaondemand  

An alternate representation considered is as follows eliminates the 'archived media' representation:

1.     Get live stream
GET /stream/live
2.     Get live stream based on Keyword  
GET /stream/live/{keyword}  
3.     Get on-demand stream    
GET /stream/on-demand
4.     Get on-demand stream based on Keyword,etc (timestamp)
 
GET /stream/on-demand/{keyword}&ts={timestamp}


5.     Stream archived media on-demand (hence video on demand) using uuid from response in 3 and 4 above…    
POST /stream/on-demand/{uuid}  

6.  Search for 'archived media'.
GET /search?={keyword}

Thoughts on the above?  I’m open to alternate composites and representations.
0
forums_mp
Asked:
forums_mp
1 Solution
 
Bob LearnedCommented:
You can drive yourself crazy if you try to get the perfect "distinction".  

How important is it to get the perfect combination?  

I like this section:

1.     Get live media  
GET /livemedia
2.     Get live media based on Keyword  
GET /livemedia?q={keyword}  
3.     Get archived media    
GET /archivedmedia
4.     Get archived media based on Keyword,etc (timestamp)
 
GET /archivedmedia?q={keyword}}&ts={timestamp}  
5.     Stream archived media (hence video on demand) using uuid from response in 3 and 4 above…    
POST /mediaondemand/{uuid}
0
 
Scott Fell, EE MVEDeveloperCommented:
+1 "You can drive yourself crazy if you try to get the perfect "distinction".
http:#a39963731 That looks good

<<no points>>
0

Featured Post

When ransomware hits your clients, what do you do?

MSPs: Endpoint security isn’t enough to prevent ransomware.
As the impact and severity of crypto ransomware attacks has grown, Webroot has fought back, not just by building a next-gen endpoint solution capable of preventing ransomware attacks but also by being a thought leader.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now