Skip to content

Latest commit

 

History

History
37 lines (23 loc) · 2.14 KB

read-08.md

File metadata and controls

37 lines (23 loc) · 2.14 KB

APIs

What does REST stand for?

REST stands for representational state transfer and was created by computer scientist Roy Fielding. An API is a set of definitions and protocols for building and integrating application software

REST APIs are designed around a?

REST or RESTful API design (Representational State Transfer) is designed to take advantage of existing protocols. While REST can be used over nearly any protocol, it usually takes advantage of HTTP when used for Web APIs. ... REST API Design was defined by Dr. Roy Fielding in his 2000 doctorate dissertation.

What is an identifer of a resource? Give an example

A Uniform Resource Identifier (URI) is a unique sequence of characters that identifies a logical or physical resource used by web technologies. ... A URL provides the location of the resource. A URI identifies the resource by name at the specified location or URL.

What are the most common HTTP verbs?

The primary or most-commonly-used HTTP verbs (or methods, as they are properly called) are POST, GET, PUT, PATCH, and DELETE. These correspond to create, read, update, and delete (or CRUD) operations, respectively.

What should the URIs be based on?

The URI comprises: A non-empty scheme component followed by a colon ( : ), consisting of a sequence of characters beginning with a letter and followed by any combination of letters, digits, plus ( + ), period ( . ), or hyphen ( - ).

Give an example of a good URI

The example of a good URL is ". gov and . org"

What does it mean to have a ‘chatty’ web API? Is this a good or a bad thing?

A chatty API, as defined by Reese, is any API that requires consumer to do more than a single call to perform a single, common operation. The details of what constitutes chatty, of course, depend on what people might reasonably want to do with the API.

What status code does a successful GET request return?

2xx Successful

What status code does an unsuccessful GET request return?

400 Bad Request is returned.

What status code does a successful POST request return?

2xx Successful

What status code does a successful DELETE request return?

HTTP response code 200 (OK)