General Flashcards
What does REST stand for?
Representational State Transfer
What is a REST API?
An API that conforms to the constraints of the REST architectural style and allows for interaction with RESTful web services.
What are the main HTTP methods used in REST?
GET, POST, PUT, DELETE, PATCH
What is the purpose of the GET method?
To retrieve data from a server.
What does the POST method do?
To send data to a server to create a new resource.
When is the PUT method used?
To update an existing resource or create it if it does not exist.
What is the DELETE method used for?
To remove a resource from the server.
What is the PATCH method?
To apply partial modifications to a resource.
What is a resource in REST?
An object or representation of something that can be accessed or manipulated via a URL.
What is an endpoint in REST?
A specific URL where a resource can be accessed or an action can be performed.
What is meant by statelessness in REST?
Each request from client to server must contain all the information needed to understand and process the request, without relying on any stored context on the server.
What is JSON?
JavaScript Object Notation, a lightweight data-interchange format used in REST APIs for data representation.
What is the role of HTTP headers in REST APIs?
They convey additional information about the request or response, such as content type, authentication tokens, and caching directives.
What does the status code 200 mean?
OK - The request has succeeded.
What does the status code 404 signify?
Not Found - The server can’t find the requested resource.
What is HATEOAS?
Hypermedia As The Engine Of Application State, a constraint of REST that ensures clients interact with the application entirely through provided hypermedia links.
What is CORS?
Cross-Origin Resource Sharing, a security feature implemented by browsers to control how resources on a web page can be requested from another domain.
What does idempotent mean in the context of REST methods?
An operation that can be applied multiple times without changing the result beyond the initial application. Examples are GET, PUT, and DELETE.
What is a RESTful web service?
A web service that adheres to the REST architectural constraints and principles.
What is URI?
Uniform Resource Identifier, a string of characters that unambiguously identifies a particular resource.
What does CRUD stand for in the context of REST?
Create, Read, Update, Delete
What is an API key?
A unique identifier used to authenticate a client making API requests.
What is OAuth?
An open standard for access delegation commonly used to grant websites or applications limited access to a user’s information without exposing passwords.
What is the purpose of the OPTIONS HTTP method?
To describe the communication options for the target resource.