0
0
Rest APIprogramming~10 mins

Why REST APIs exist - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to show why REST APIs are useful for communication between systems.

Rest API
A REST API allows different systems to [1] data over the internet.
Drag options to blanks, or click blank then click option'
Ahide
Bexchange
Cdelete
Dignore
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing words that mean stopping or hiding data.
2fill in blank
medium

Complete the code to explain how REST APIs use HTTP methods.

Rest API
REST APIs use HTTP methods like GET and POST to [1] actions on resources.
Drag options to blanks, or click blank then click option'
Aignore
Bblock
Cperform
Ddelay
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing words that mean stopping or not doing anything.
3fill in blank
hard

Fix the error in the sentence explaining REST API benefits.

Rest API
REST APIs help systems to [1] data in a way that is platform dependent.
Drag options to blanks, or click blank then click option'
Aexchange
Bstore
Cignore
Dsend
Attempts:
3 left
💡 Hint
Common Mistakes
Saying REST APIs are platform dependent.
4fill in blank
hard

Fill both blanks to complete the dictionary comprehension explaining REST API data filtering.

Rest API
filtered_data = {item: data[item] for item in data if data[item] [1] [2]
Drag options to blanks, or click blank then click option'
A>
B10
C<
D5
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong comparison operator or number.
5fill in blank
hard

Fill all three blanks to complete the dictionary comprehension that creates a new dictionary with uppercase keys and values greater than 5.

Rest API
result = [1]: [2] for [3], [2] in data.items() if [2] > 5
Drag options to blanks, or click blank then click option'
Akey.upper()
Bvalue
Ckey
Ditem
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong variable names or not converting keys to uppercase.