Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1GET https://api.school.edu.au/students/101 | AA request to an API-based data interface that asks the school system to hand back the record for one student | |
| 2students_export.csv | BA file-based data interface where one system saves data in an agreed format for another system to read | |
| 3An interface defines the output format, so the receiving system knows exactly how the data will be structured | C{"studentId": 101, "name": "Ava", "yearLevel": 12} | |
| 4An interface controls who can use it, so a system must prove who it is before it can take data | DThe interface has no rule about who can use it. Anyone can take sensitive data, so access should be limited to approved, authenticated systems. | |
| 5Sender saves marks.csv with columns Name, Mark, Year. Receiver expects Year, Name, Mark. | EThe two systems have not agreed on the interface format. The column order differs, so the receiver will read the wrong data into each field. | |
| 6A public API returns every student's address and health notes to any system that asks, with no login. | FAuthorization: Bearer abc123token |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
data interface — The agreed point where one system gives data to, or takes data from, another. It sets the format and rules of the exchange, such as a file or an API.with open("orders.csv") as f:
rows = list(csv.reader(f))url = "https://api.school.au/marks"
reply = requests.get(url)record = {"id": 7, "mark": 88}
output = json.dumps(record)with open("export.csv", "w") as f:
f.write("id,mark\n")headers = {"Authorization": "Bearer " + key}
reply = requests.get(url, headers=headers)