Define REST API.
A web service that follows Representational State Transfer principles for communication.
What does CRUD stand for in REST APIs?
Create, Read, Update, Delete - the four basic operations.
True or false: REST APIs use HTTP methods for operations.
TRUE
Common methods include GET, POST, PUT, and DELETE.
Fill in the blank: URI stands for ______.
Uniform Resource Identifier.
What is the purpose of HTTP status codes?
To indicate the result of an HTTP request.
Define endpoint in REST APIs.
A specific URL where a client can access resources.
What does JSON stand for?
JavaScript Object Notation - a lightweight data interchange format.
True or false: REST APIs can only return JSON format.
FALSE
REST APIs can return XML, HTML, and other formats.
Fill in the blank: Stateless means each request from a client must contain ______.
All necessary information to understand the request.
What is a resource in REST?
An object or representation of data that can be accessed via a URI.
Define HATEOAS.
Hypermedia as the Engine of Application State; a constraint of REST.
What is the role of headers in REST API requests?
To provide metadata about the request or response.
True or false: REST APIs can be cached.
TRUE
Caching improves performance by storing responses.
Fill in the blank: API versioning is important for ______.
Maintaining compatibility as the API evolves.
What is the base URL?
The root address for accessing the API.
Define API key.
A unique identifier used to authenticate requests.
What is pagination in REST APIs?
The process of dividing a large dataset into smaller, manageable parts.
Fill in the blank: Rate limiting controls the number of ______.
Requests a user can make in a given time frame.
True or false: REST APIs are always synchronous.
FALSE
REST APIs can be designed for asynchronous communication.
What is a webhook?
A user-defined HTTP callback triggered by specific events.
Define CORS.
Cross-Origin Resource Sharing; a security feature for web applications.
What does OAuth provide?
A secure authorization framework for APIs.
True or false: REST APIs can only be accessed over HTTPS.
FALSE
REST APIs can also be accessed over HTTP.
Fill in the blank: Throttling is used to ______.
Limit the number of requests a client can make.