Foreword |
|
xiii | |
Introduction |
|
xv | |
1 Surfing the Web |
|
1 | (16) |
|
|
2 | (1) |
|
Resources and Representations |
|
|
2 | (1) |
|
|
3 | (1) |
|
|
3 | (3) |
|
|
4 | (1) |
|
Self-Descriptive Messages |
|
|
5 | (1) |
|
|
6 | (3) |
|
|
8 | (1) |
|
Episode 4: The Form and the Redirect |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
11 | (2) |
|
|
13 | (1) |
|
The Web Is Something Special |
|
|
14 | (1) |
|
Web APIs Lag Behind the Web |
|
|
15 | (1) |
|
|
16 | (1) |
2 A Simple API |
|
17 | (12) |
|
|
18 | (1) |
|
How to Read an HTTP Response |
|
|
18 | (2) |
|
|
20 | (1) |
|
|
21 | (1) |
|
|
22 | (2) |
|
HTTP POST: How Resources Are Born |
|
|
24 | (1) |
|
|
25 | (2) |
|
Application Semantics Create the Semantic Gap |
|
|
27 | (2) |
3 Resources and Representations |
|
29 | (16) |
|
A Resource Can Be Anything |
|
|
30 | (1) |
|
A Representation Describes Resource State |
|
|
30 | (1) |
|
Representations Are Transferred Back and Forth |
|
|
31 | (1) |
|
Resources with Many Representations |
|
|
32 | (1) |
|
The Protocol Semantics of HTTP |
|
|
33 | (9) |
|
|
34 | (1) |
|
|
35 | (1) |
|
|
36 | (1) |
|
|
37 | (1) |
|
|
37 | (1) |
|
|
38 | (1) |
|
|
39 | (1) |
|
|
40 | (1) |
|
|
40 | (1) |
|
|
41 | (1) |
|
Which Methods Should You Use? |
|
|
42 | (3) |
4 Hypermedia |
|
45 | (14) |
|
HTML as a Hypermedia Format |
|
|
46 | (3) |
|
|
49 | (1) |
|
|
50 | (1) |
|
|
51 | (1) |
|
|
52 | (3) |
|
|
52 | (1) |
|
Promises About the Response |
|
|
53 | (1) |
|
|
54 | (1) |
|
Beware of Fake Hypermedia! |
|
|
55 | (1) |
|
The Semantic Challenge: How Are We Doing? |
|
|
56 | (3) |
5 Domain-Specific Designs |
|
59 | (32) |
|
Maze+XML: A Domain-Specific Design |
|
|
60 | (1) |
|
|
61 | (4) |
|
|
62 | (2) |
|
Follow a Link to Change Application State |
|
|
64 | (1) |
|
|
65 | (2) |
|
|
67 | (1) |
|
|
68 | (4) |
|
|
72 | (2) |
|
|
74 | (2) |
|
|
76 | (1) |
|
Clients Do the Job They Want to Do |
|
|
77 | (1) |
|
|
77 | (3) |
|
|
80 | (3) |
|
The Fix (and the Flaw in the Fix) |
|
|
81 | (2) |
|
|
83 | (1) |
|
Meeting the Semantic Challenge |
|
|
83 | (1) |
|
Where Are the Domain-Specific Designs? |
|
|
83 | (3) |
|
|
84 | (1) |
|
Hypermedia in the Headers |
|
|
84 | (1) |
|
Steal the Application Semantics |
|
|
84 | (2) |
|
If You Can't Find a Domain-Specific Design, Don't Make One |
|
|
86 | (1) |
|
|
86 | (5) |
|
|
86 | (1) |
|
|
87 | (4) |
6 The Collection Pattern |
|
91 | (18) |
|
|
93 | (1) |
|
Collections Link to Items |
|
|
93 | (1) |
|
|
94 | (6) |
|
|
95 | (3) |
|
|
98 | (1) |
|
|
99 | (1) |
|
How a (Generic) Collection Works |
|
|
100 | (2) |
|
|
100 | (1) |
|
|
100 | (1) |
|
|
101 | (1) |
|
|
101 | (1) |
|
|
101 | (1) |
|
|
102 | (1) |
|
The Atom Publishing Protocol (AtomPub) |
|
|
102 | (4) |
|
AtomPub Plug-in Standards |
|
|
104 | (1) |
|
Why Doesn't Everyone Use AtomPub? |
|
|
105 | (1) |
|
The Semantic Challenge: How Are We Doing? |
|
|
106 | (3) |
7 Pure-Hypermedia Designs |
|
109 | (24) |
|
|
109 | (1) |
|
|
110 | (3) |
|
|
110 | (1) |
|
Plug-in Application Semantics |
|
|
111 | (2) |
|
|
113 | (1) |
|
|
114 | (2) |
|
|
116 | (1) |
|
|
117 | (5) |
|
Adding Application Semantics to Forms |
|
|
119 | (3) |
|
The Alternative to Hypermedia Is Media |
|
|
122 | (2) |
|
|
124 | (1) |
|
|
124 | (1) |
|
The Hypertext Application Language |
|
|
125 | (4) |
|
|
129 | (1) |
|
The Semantic Challenge: How Are We Doing? |
|
|
130 | (3) |
8 Profiles |
|
133 | (24) |
|
How Does A Client Find the Documentation? |
|
|
134 | (1) |
|
|
135 | (1) |
|
|
135 | (2) |
|
The profile Link Relation |
|
|
135 | (1) |
|
The profile Media Type Parameter |
|
|
136 | (1) |
|
Special-Purpose Hypermedia Controls |
|
|
136 | (1) |
|
Profiles Describe Protocol Semantics |
|
|
137 | (1) |
|
Profiles Describe Application Semantics |
|
|
138 | (3) |
|
|
138 | (1) |
|
|
139 | (1) |
|
|
140 | (1) |
|
XMDP: The First Machine-Readable Profile Format |
|
|
141 | (2) |
|
|
143 | (7) |
|
|
148 | (2) |
|
ALPS Doesn't Do Everything |
|
|
150 | (1) |
|
|
150 | (4) |
|
|
154 | (1) |
|
|
155 | (2) |
9 The Design Procedure |
|
157 | (42) |
|
Two-Step Design Procedure |
|
|
157 | (1) |
|
Seven-Step Design Procedure |
|
|
158 | (15) |
|
Step 1: List the Semantic Descriptors |
|
|
159 | (2) |
|
Step 2: Draw a State Diagram |
|
|
161 | (3) |
|
|
164 | (3) |
|
Step 4: Choose a Media Type |
|
|
167 | (2) |
|
|
169 | (1) |
|
|
169 | (1) |
|
|
170 | (3) |
|
Example: You Type It, We Post It |
|
|
173 | (4) |
|
List the Semantic Descriptors |
|
|
173 | (1) |
|
|
174 | (1) |
|
|
174 | (1) |
|
|
175 | (1) |
|
|
176 | (1) |
|
|
177 | (13) |
|
Resources Are Implementation Details |
|
|
177 | (1) |
|
Don't Fall into the Collection Trap |
|
|
178 | (1) |
|
Don't Start with the Representation Format |
|
|
179 | (1) |
|
URL Design Doesn't Matter |
|
|
180 | (2) |
|
Standard Names Are Probably Better Than Your Names |
|
|
182 | (1) |
|
If You Design a Media Type |
|
|
183 | (2) |
|
|
185 | (4) |
|
Don't Keep All the Hypermedia in One Place |
|
|
189 | (1) |
|
Adding Hypermedia to an Existing API |
|
|
190 | (2) |
|
Fixing Up an XML-Based API |
|
|
191 | (1) |
|
|
192 | (1) |
|
|
192 | (7) |
|
Episode 1: The Nonsense Representation |
|
|
192 | (2) |
|
|
194 | (2) |
|
|
196 | (3) |
10 The Hypermedia Zoo |
|
199 | (38) |
|
|
200 | (6) |
|
|
200 | (1) |
|
|
201 | (1) |
|
|
201 | (1) |
|
|
202 | (2) |
|
|
204 | (2) |
|
Collection Pattern Formats |
|
|
206 | (9) |
|
|
206 | (1) |
|
The Atom Publishing Protocol |
|
|
207 | (1) |
|
|
208 | (7) |
|
|
215 | (10) |
|
|
216 | (1) |
|
|
216 | (1) |
|
|
217 | (1) |
|
|
218 | (1) |
|
The Location and Content-Location Headers |
|
|
218 | (1) |
|
|
219 | (1) |
|
|
219 | (1) |
|
|
220 | (1) |
|
|
221 | (1) |
|
|
222 | (2) |
|
|
224 | (1) |
|
|
225 | (5) |
|
GeoJSON Has No Generic Hypermedia Controls |
|
|
226 | (2) |
|
GeoJSON Has No Media Type |
|
|
228 | (1) |
|
|
229 | (1) |
|
|
230 | (7) |
|
The TANA Registry of Link Relations |
|
|
230 | (1) |
|
|
231 | (2) |
|
Link Relations from the Microformats Wild |
|
|
233 | (1) |
|
|
233 | (1) |
|
|
234 | (1) |
|
|
235 | (1) |
|
|
235 | (2) |
11 HTTP for APIs |
|
237 | (26) |
|
The New HTTP/1.1 Specification |
|
|
238 | (1) |
|
|
238 | (1) |
|
|
238 | (1) |
|
Choosing Between Representations |
|
|
239 | (2) |
|
|
239 | (1) |
|
|
240 | (1) |
|
|
241 | (1) |
|
|
241 | (7) |
|
|
241 | (1) |
|
|
242 | (2) |
|
Look-Before-You-Leap Requests |
|
|
244 | (1) |
|
|
245 | (1) |
|
|
246 | (1) |
|
|
247 | (1) |
|
Avoiding the Lost Update Problem |
|
|
248 | (1) |
|
|
249 | (8) |
|
The WWW-Authenticate and Authorization Headers |
|
|
250 | (1) |
|
|
251 | (1) |
|
|
252 | (3) |
|
Where OAuth 1.0 Falls Short |
|
|
255 | (1) |
|
|
256 | (1) |
|
|
256 | (1) |
|
|
257 | (3) |
|
|
257 | (1) |
|
The LINK and UNLINK Methods |
|
|
258 | (1) |
|
|
259 | (1) |
|
|
260 | (3) |
12 Resource Description and Linked Data |
|
263 | (26) |
|
|
264 | (3) |
|
|
265 | (2) |
|
When to Use the Description Strategy |
|
|
267 | (2) |
|
|
269 | (1) |
|
|
270 | (2) |
|
|
272 | (2) |
|
|
274 | (2) |
|
JSON-LD as a Representation Format |
|
|
275 | (1) |
|
|
276 | (4) |
|
|
280 | (4) |
|
|
281 | (1) |
|
Web Host Metadata Documents |
|
|
282 | (1) |
|
|
283 | (1) |
|
|
284 | (2) |
|
|
285 | (1) |
|
|
285 | (1) |
|
|
286 | (1) |
|
Conclusion: The Description Strategy Lives! |
|
|
286 | (3) |
13 CoAP: REST for Embedded Systems |
|
289 | (8) |
|
|
290 | (1) |
|
|
290 | (1) |
|
|
291 | (1) |
|
|
292 | (1) |
|
|
293 | (1) |
|
|
293 | (2) |
|
Conclusion: REST Without HTTP |
|
|
295 | (2) |
A The Status Codex |
|
297 | (22) |
B The Header Codex |
|
319 | (24) |
C An API Designer's Guide to the Fielding Dissertation |
|
343 | (16) |
Glossary |
|
359 | (4) |
Index |
|
363 | |