Loading...
Problem
Submissions
Details
Requirements
API Design
External API
1.Retrieve Video
METHOD: GET
Endpoint: /videos/{video_id}
Path Variables:
video_id: str: id of video
Response
Success:
status: ENUM: SUCCESS
status_code: int: 200
video: blob: the video itself
video_metadata: object: the metadata of the video
Video not found
status: ENUM: ERROR
status_code: int: 404
message: str: video not found. It might be deleted or limited access
Bad service
status: ENUM: ERROR
status_code: int: 503
message: str: log that can be used for root cause analysis
Internal API
1.Increase View
METHOD: PATCH
Endpoint: /increase_view/{video_id}
Path Variables:
video_id: str: id of video
Body:
views: int: number of view increase
Response
Success
status: ENUM: SUCCESS
status_code: 200
Video not found
status: ENUM: ERROR
status_code: int: 404
message: str: Video not found. It is possible that it might be deleted or limited
Access denied
status: ENUM: ERROR
status_code: int: 403
message: str: no permission allowViewUpdate for update video
High-Level Design
Detailed Component Design
View Verification Algorithm