Beginner Flashcards
What does REST stand for?
Representational State Transfer
True or False: REST APIs are stateless.
True
Fill in the blank: REST APIs use ________ for communication.
HTTP
Which HTTP method is used to retrieve data from a server?
GET
What is the purpose of the HTTP POST method?
To send data to the server to create a new resource.
True or False: In REST, each resource is identified by a unique URI.
True
What is a common format for data exchange in REST APIs?
JSON
Multiple Choice: Which of the following is NOT a characteristic of REST APIs?
A) Statelessness
B) Layered System
C) Use of WebSockets
D) Cacheable responses
C) Use of WebSockets
What does the HTTP status code 404 indicate?
Not Found
Short Answer: Name one advantage of using REST APIs.
Scalability, simplicity, or ease of use.
True or False: REST APIs use HTTP methods to perform actions on resources.
True
Fill in the blank: The four main HTTP methods used in REST APIs are GET, POST, PUT, and _____?
DELETE
What is the purpose of the GET method in a REST API?
To retrieve data from the server.
Which HTTP status code indicates a successful request?
200 OK
What is the difference between PUT and PATCH in REST APIs?
PUT updates a resource completely, while PATCH updates a resource partially.
Multiple choice: Which of the following is not a REST architectural constraint? A) Statelessness B) Cacheability C) Layered System D) Statefulness
D) Statefulness
What does it mean for a REST API to be stateless?
Each request from the client must contain all the information needed to understand and process the request.
True or False: REST APIs can only return data in JSON format.
False
What is the main advantage of using REST APIs?
They are simple to use and can be easily consumed by different clients.
Fill in the blank: In REST, resources are identified by _____?
URIs (Uniform Resource Identifiers)
What is HATEOAS in the context of REST?
Hypermedia as the Engine of Application State, where clients interact with the API through hypermedia links.
Multiple choice: Which HTTP method would you use to create a new resource? A) GET B) POST C) PUT D) DELETE
B) POST
True or False: A REST API can have multiple representations of a resource.
True
What is the purpose of the DELETE method in a REST API?
To remove a resource from the server.
What is a common format for sending data in REST APIs?
JSON (JavaScript Object Notation)
Fill in the blank: REST APIs are designed to be _____ and can be consumed by any client that understands HTTP.
platform-independent
True or False: In REST APIs, the server maintains the client state.
False
What does the status code 404 indicate in a REST API?
That the requested resource was not found.
Multiple choice: Which of the following is a characteristic of REST? A) Client-server architecture B) Use of SOAP C) Stateful operations D) Binary data only
A) Client-server architecture