REST Flashcards

1
Q

What does REST stand for?

A

REpresentational State Transfer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Who first introduced REST

A

Roy Fielding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is REST?

A

Architectural style for distributed hypermedia.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the six constraints that must be satisfied for an interface to be RESTful?

A
  1. Uniform Interface
  2. Stateless
  3. Cacheable
  4. Client-Server
  5. Layered-System
  6. Code on Demand (optional)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the Uniform Interface constraint in REST?

A

The interface must be a uniform way of interacting with a given server irrespective of device or type of application (web, mobile, app).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the four guidelines of Uniform Interface in REST?

A
  1. Resource based.
  2. Manipulation of resources through representations.
  3. Self descriptive message.
  4. Hypermedia as the engine of application state (HATEOAS)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the Resource based guideline for the Uniform Interface constraint?

A

Individual resources are identified in requests (E.g. API/users).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the Manipulation of resources through representations guideline for the Uniform Interface constraint?

A

Client has representation of resource and and it contains enough information to modify or delete the resource on the server (E.g. client has user id).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the Self descriptive message guideline for the Uniform Interface constraint?

A

Each message has enough information to describe how to process the message so the server can easily process the request.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the Hypermedia as the engine of application state guideline for the Uniform Interface constraint?

A

If links need to be included in responses, clients can discover other resources easily.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the Stateless constraint in REST?

A

The necessary state to handle the request is contained within the request itself and server should not store anything related to the session.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a potential drawback of Stateless constraint

A

Can require more bandwidth as client must send more data with request.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly