Ecs781p 5 Rest API
Ecs781p 5 Rest API
CLOUD COMPUTING
RESTful API
• REST style
• REST Architecture Style Constraints
Recap on REST
4
REST style
5
URI (Uniform Resource Identifier)
URI = scheme[userinfo@]host[:port]path[?query][#fragment]
https://[email protected]:123/forum/questions
/?tag=networking&order=newest#top
6
REST style
7
REST Style
8
REST Style
9
POST vs PUT
GET /modules/<module-id> ?
PUT /modules/<module-id> ?
DELETE /modules/<module-id> ?
Follow this URI design pattern for other more complicated examples
as well.
POST method
http://www.restfuljava.com
GET method
http://www.restfuljava.com
PUT method
http://www.restfuljava.com
Contents
• REST style
• REST Architecture Style Constraints
REST Architectural Style Constraints
13
REST Architecture Style Constraints
14
REST Architecture Style Constraints
15
REST Architecture Style Constraints: HATEOAS
17
HAETOS: Example 2
17
RESTful API Design: Example
2
from Jim Webber, REST in Practice: Hypermedia and Systems Architecture
19
RESTful API Design: Example
20
RESTful API Design: Example
21
RESTful API Design: Example
22
Application Web Servers
23
Application Web Servers
24
Application Web Servers
25
Application Web Servers
Request Handling
26
REST