What does API stand for?
API stands for Application Programming Interface, a system that enables two applications to communicate and exchange data or services.
How does an API function like a waiter?
An API acts as a messenger: it delivers your request to another system (like a database) and returns the system’s response, similar to how a waiter delivers orders between a customer and kitchen.
What does API documentation provide?
API documentation lists valid requests, expected responses, and data formats—similar to a restaurant menu defining available items.
What is a JavaScript API?
A JavaScript API is an interface that allows JavaScript code to dynamically access and modify web content or communicate with external services.
What does REST stand for?
REST stands for Representational State Transfer, an architectural style for designing networked APIs using standard HTTP methods.
What are the four CRUD operations?
CRUD stands for Create, Read, Update, and Delete—the four basic operations used to manage data.
Match CRUD operations with their HTTP methods
Create → POST; Read → GET; Update → PUT; Delete → DELETE
What does a POST request do in a REST API?
A POST request creates a new resource on the server, such as adding a new customer record.
What does a GET request do in a REST API?
A GET request retrieves data from the server, such as customer information.
What does a PUT request do in a REST API?
A PUT request updates an existing resource on the server with new data.
What does a DELETE request do in a REST API?
A DELETE request removes a specific resource from the server, such as deleting a customer.
What data formats are commonly used in REST APIs?
JSON and XML are common data formats used for sending and receiving information between clients and servers.
What is the purpose of an ‘id’ in REST URLs?
An ‘id’ uniquely identifies a resource, allowing requests like GET, PUT, or DELETE to target a specific item.
What is an example of a POST request URL in a banking API?
POST api/customers — creates a new customer record in the system.
What is an example of a GET request URL in a banking API?
GET api/customers/{id} — retrieves information about a specific customer.
What is an example of a PUT request body for updating customer info?
{ "first_name": "Thomas", "last_name": "Watson" }
What does the DOM API do?
The DOM (Document Object Model) API connects web pages to scripts by representing the page structure in memory, enabling dynamic modification.
Why is the DOM API important?
It allows JavaScript to add, remove, or change elements, styles, and content dynamically on a web page.
What is XMLHttpRequest (XHR)?
A JavaScript API that retrieves data from a server without reloading the entire page.
How is XMLHttpRequest used in AJAX?
It enables asynchronous updates, letting parts of a webpage refresh dynamically while users continue interacting with the rest of the page.
Why is XMLHttpRequest significant for user experience?
It supports seamless, real-time data updates without full page reloads, improving interactivity.
Where can you find documentation for XMLHttpRequest?
On the Mozilla Developer Network (MDN): https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
What does AJAX stand for?
AJAX stands for Asynchronous JavaScript and XML, a technique for building dynamic web applications using asynchronous server requests.
What are advanced JavaScript APIs?
They are specialized APIs—like those for graphics, storage, geolocation, and multimedia—that extend browser capabilities.