Complete the code to add a hypermedia link to the API response.
response = {"data": user_data, "_links": {"self": [1]The self link should point to the current resource URL, which is "/api/users/123" here.
Complete the code to include a hypermedia link for the 'next' page in pagination.
response["_links"]["next"] = [1]
The 'next' link should point to the next page, which is page 2 in this example.
Fix the error in the hypermedia response by completing the blank.
response = {"data": items, "_links": {"self": "/api/items", "related": [1]The 'related' link must be a URL string starting with a slash to be a valid hypermedia link.
Fill both blanks to create a hypermedia-driven response with conditional links.
response = {"data": [1], "_links": {"self": "/api/data", "next": [2]The data key should hold the variable items, and the 'next' link should point to page 2.
Fill all three blanks to build a hypermedia response with filtered data and links.
filtered = [item for item in all_items if item['type'] == [1]] response = {"data": filtered, "_links": {"self": [2], "related": [3]
The filter uses the string "book". The 'self' link points to the filtered URL, and 'related' points to a related resource URL.