You are an AI Assistant.
system
calcualte rest end points based on this info : ce. The
following could be the definitions of the APIs for uploading and searching videos:
Parameters:
api_dev_key (string): The API developer key of a registered account. This will be
used to, among other things, throttle users based on their allocated quota.
video_title (string): Title of the video.
vide_description (string): Optional description of the video.
84
tags (string[]): Optional tags for the video.
category_id (string): Category of the video, e.g., NAME_1, NAME_2, People, etc.
default_language (string): For example English, Mandarin, Hindi, etc.
recording_details (string): Location where the video was recorded.
video_contents (stream): Video to be uploaded.
Returns: (string)
A successful upload will return HTTP 202 (request accepted) and once the video
encoding is completed the user is notified through email with a link to access the
video. We can also expose a queryable API to let users know the current status of
their uploaded video.
Parameters:
api_dev_key (string): The API developer key of a registered account of our service.
search_query (string): A string containing the search terms.
user_location (string): Optional location of the user performing the search.
maximum_videos_to_return (number): Maximum number of results returned in
one request.
page_token (string): This token will specify a page in the result set that should be
returned.
Returns: (JSON)
A JSON containing information about the list of video resources matching the search
query. Each video resource will have a video title, a thumbnail, a video creation date,
and a view count.
Parameters:
api_dev_key (string): The API developer key of a registered account of our service.
video_id (string): A string to identify the video.
offset (number): We should be able to stream video from any offset; this offset would
be a time in seconds from the beginning of the video. If we support playing/pausing
a video from multiple devices, we will need to store the offset on the server. This will
enable the users to start watching a video on any device from the same point where
they left off.
codec (string) & resolution(string): We should send the codec and resolution info in
the API from the client to support play/pause from multiple devices. Imagine you
are watching a video on your TV’s Netflix app, paused it, and started watching it on
85
your phone’s Netflix app. In this case, you would need codec and resolution, as both
these devices have a different resolution and use a different codec.
Returns: (STREAM)
A me
user
Here are some sample REST endpoints based on the given information:

Upload Video:
POST /videos
Parameters:
api_dev_key: string 
video_title: string
vide_description: string 
tags: string[]
category_id: string
default_language: string
recording_details: string
video_contents: file

Returns: 
202 Accepted

Check Upload Status:
GET /videos/{video_id}/status
Parameters: 
api_dev_key: string
video_id: string

Returns:
200 OK
{
"status": "ENCODING"|"READY"|"ERROR", 
"progress": 0-100  // During ENCODING
"error": "..."   // If status is ERROR
}

Search Videos:
GET /search
Parameters:
api_dev_key: string
search_query: string 
user_location: string 
maximum_videos_to_return: number
page_token: string  

Returns: 
200 OK
{
"videos": [
{
"id": string,
"title": string, 
"thumbnail_url": string, 
"published_at": date,
"view_count": number 
}
],
"next_page_token": string  // If more results available  
}

Stream Video: 
GET /videos/{video_id}
Parameters:
api_dev_key: string
video_id: string
offset: number  
codec: string
resolution: string

Returns:
200 OK
{Streaming Video Content}
assistant