REST-201 Flashcards
Which arch style does REST belongs to ?
Distributed Hypermedia Systems
State the 6 REST Principles based on?
Stateless Caching Client-Server Uniform Interface Layered System Code on Demand(Optional and unimp)
Explain State-less?
The client should only know the state, the server should only care about the necessary details to give the respoinse
Explain Cachecable?
The server must present the details to cached the data or not
Explain Uniform Interface?
There are 4 uniform constraints
- Identification Of Resources
- Manipulation of Resources through representations.
- Self Descriptive Messages
- Hypermedia as the engine of application state
Explain Layered System?
Abstraction of Resource providers
Now it mean a Server A to recieve the request, and server B to give the data to A, And server C to authorize & authnticate
Why Resource Identifier in given importance?
The key abstraction is Resource, and each must be identifed by both the parties
What is Resource Representaion?
The state of a resource at any moment.
What is Media Type?
The data format of the resource
What should be common in all RESTFul apis?
They should folow a common naming, return type , XML , JSON and the like
Can a Resource may have sub collection?
Yes Like accounts/{accountId}/customers/{customerId}/
Can we use - or _ to make URI
- is best because it improves readeability
Should we use query naming convetions?
No, Better to use the Correct HTTP method
HTTP DELETE http://api.example.com/device-management/managed-devices/{id} //Delete device for given Id
Which method is by default cached and which one not?
GET : Cached,
POST: Nope
Unless specifeid
Say me the tags related to caching?
Expires: Fri, 20 May 2016 19:20:49 IST
Cache-Control: max-age=3532
Etag: The server associates this header to uniquly identify the resource
Last-Modified: