Untitled spreadsheet - Sheet1 (1) Flashcards
What is REST?
REST stands for Representational State Transfer. It is an architectural style for networked hypermedia applications, often used in web services development.
What does API stand for?
API stands for Application Programming Interface. It’s a set of rules and protocols for building and interacting with software applications.
What is a RESTful API?
A RESTful API is an API that follows the principles of REST. It is designed to take advantage of existing protocols, often using HTTP methods to operate on resources.
What are the HTTP methods commonly used in a RESTful API?
The common HTTP methods used in a RESTful API are GET, POST, PUT, PATCH, DELETE.
What does the GET method do in a RESTful API?
The GET method is used to retrieve information from the given server using a given URI.
What does the POST method do in a RESTful API?
The POST method is used to send data to a server to create a new resource.
What does the PUT method do in a RESTful API?
The PUT method is used to update existing resource or create a new one if it does not exist.
What does the PATCH method do in a RESTful API?
The PATCH method is used to partially update a resource.
What does the DELETE method do in a RESTful API?
The DELETE method is used to delete a resource from the server.
What is a URI in context of a RESTful API?
URI stands for Uniform Resource Identifier. In RESTful APIs, it is used to identify resources.
What is a resource in a RESTful API?
A resource in a RESTful API is an abstraction of a piece of information, such as a document or a service, identifiable by a URI.
What is the status code for a successful GET request?
The status code for a successful GET request is 200 OK.
What is the status code for a successful POST request?
The status code for a successful POST request is 201 Created.
What is the status code for a successful DELETE request?
The status code for a successful DELETE request is 200 OK or 204 No Content if the response body is empty.
What does the status code 404 mean?
The status code 404 means Not Found. The server could not find the requested resource.
What does the status code 400 mean?
The status code 400 means Bad Request. The server could not understand the request due to invalid syntax.
What does the status code 500 mean?
The status code 500 means Internal Server Error. The server encountered an unexpected condition that prevented it from fulfilling the request.
What is idempotence in RESTful APIs?
Idempotence means that multiple identical requests should have the same effect as a single request. GET, PUT, DELETE methods are idempotent.
What is safety in RESTful APIs?
Safety refers to the characteristic of an operation not modifying resources. The GET method is safe.
What does CRUD stand for in RESTful API context?
CRUD stands for Create, Read, Update, Delete. It represents the four basic functions of persistent storage in RESTful APIs.
What is a payload in a RESTful API?
A payload in a RESTful API is the data sent with a HTTP request or received in the response.
What does HATEOAS mean in the context of RESTful APIs?
HATEOAS stands for Hypermedia as The Engine of Application State. It is a principle that allows client interact with a server entirely through hypermedia provided dynamically by application servers.
What is the Richardson Maturity Model?
The Richardson Maturity Model is a way to grade your API according to the constraints of the REST architecture. It has three levels: Level 0 (The Swamp of POX), Level 1 (Resources), Level 2 (HTTP Verbs), and Level 3 (Hypermedia Controls).
What is REST API versioning?
REST API versioning is the process of managing different versions of an API. It helps to make changes to APIs without breaking the compatibility with older clients.
What are some ways to implement REST API versioning?
Some ways to implement REST API versioning include URL versioning, parameter versioning, header versioning, and media type versioning.
What are some common media types used in REST APIs?
Some common media types used in REST APIs are application/json, application/xml, text/html, and text/plain.
What is content negotiation in RESTful APIs?
Content negotiation is the process where the client and server interact to determine the best representation of a resource, often based on the ‘Accept’ header of the HTTP request.
What is basic authentication in REST APIs?
Basic authentication is a method used to send a user name and password with a request in a REST API. It is often Base64 encoded.
What is OAuth in the context of REST APIs?
OAuth (Open Authorization) is an open standard for token-based authentication and authorization in REST APIs. It allows third-party services to exchange your information without you having to give away your password.
What is JWT in the context of REST APIs?
JWT (JSON Web Token) is a JSON-based open standard for creating access tokens that assert some number of claims.
What does the acronym CORS stand for?
CORS stands for Cross-Origin Resource Sharing. It is a mechanism that allows many resources (e.g., fonts, JavaScript, etc.) on a web page to be requested from another domain outside the domain from which the resource originated.
What is the purpose of OPTIONS method in REST APIs?
The OPTIONS method in REST APIs is used to describe the communication options for the target resource. It’s often used for CORS preflight requests.
What are response headers in a REST API?
Response headers are the headers that the server sends in response to a HTTP request. They define the operating parameters of an HTTP transaction.
What is the role of ‘Accept’ header in a REST API?
The ‘Accept’ header in a REST API is used by HTTP clients to tell the server what content types they’ll accept. The server will then send back a response, which will include a Content-Type header telling the client what the content type of the returned content actually is.
What is the role of ‘Content-Type’ header in a REST API?
The ‘Content-Type’ header in a REST API is used to indicate the media type of the resource. In responses, a Content-Type header tells the client what the content type of the returned content actually is.
What is pagination in REST APIs?
Pagination in REST APIs is a technique to effectively load and display a large number of resources by dividing them into manageable chunks or pages.
What is filtering in REST APIs?
Filtering in REST APIs is a way to request only those resources that meet certain criteria, reducing the amount of data that needs to be sent.
What is sorting in REST APIs?
Sorting in REST APIs allows clients to specify the order in which resources are returned, typically by means of a query parameter.
What is rate limiting in REST APIs?
Rate limiting in REST APIs is a technique for limiting network traffic. It sets a limit on how many requests a client can make to the API within a certain time period.