5:41 GET POST PUT DELET 6:46 POST 6:52 PUT 7:34 Nouns are good, verbs are bad 9:35 naming 9:50 prefer plural forms 10:24 less confusing to use plural form 12:35 using snake case is more readable than using camel case 13:16 dealing with relations in your URLs 13:47 the trick is to think in terms of whether the sub-resource stands on its own 15:11 API parameters Rule of Thumb 15:18 Path - 16:05 parameter for identifying resource 15:33 Query - ?id=43 16:15 sth that refines Optional, e.g. query collection - filter a collection 15:41 Body - 16:27 when there is some advanced logic going on, 16:30 when you want to send a search query 15:47 Header 17:11 HTTP status code map 18:29 1XX - Hold on ... there is more to come 18:34 2XX - Here you go 18:40 3XX - redirection ro sth, just go away 18:46 4XX - you fucked up 18:52 5XX - I fucked up 20:21 200 - Create! 21:05 API navigation is more important to make API more discoverable 24:05 200 - Accepted 24:36 204 - no content - DELETE 25:18 206 - partial content -> pagination 26:15 304 - not modified 28:24 pagination 30:40 with accept range header 31:48 wrapped collections 33:53 3XX 34:19 4XX 34:41 429 too many request 38:38 different payloads for different consumers 39:08 filtering 39:34 specify fields 39:58 specify exclude fields 40:10 specify style 43:02 sort 44:07 searching 44:40 versioning 46:27 hypermedia 48:03 pros & cons for hypermedia 52:02 change is unavoidable 55:10 HAL approach
@ 25:28 As of tools.ietf.org/html/rfc7233#section-4.1, 206 Partial content should only be sent in reply to ranged requests. If you would like to realize pagination or other partial requests using the 206 Partial Content response code, you should go the full step and use range request headers (ranges are not queries) and specify your own range unit like "page" as part of your protocol. Nice talk though. Edit: Should have watched until 30:50 first :) Its hard to implement though if you want to support multiple ranges any apply range coalescation.
Resources as given in the video (ua-cam.com/video/48azd2VqtP0/v-deo.html) www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api github.com/paypal/api-standards/blob/master/api-style-guide.md blog.octo.com/en/design-a-rest-api/ github.com/interagent/http-api-design/blob/master/SUMMARY.md sookocheff.com/post/api/on-choosing-a-hypermedia-format/ www.troyhunt.com/2014/02/your-api-versioning-is-wrong-which-is.html
5:41 GET POST PUT DELET
6:46 POST
6:52 PUT
7:34 Nouns are good, verbs are bad
9:35 naming
9:50 prefer plural forms
10:24 less confusing to use plural form
12:35 using snake case is more readable than using camel case
13:16 dealing with relations in your URLs
13:47 the trick is to think in terms of whether the sub-resource stands on its own
15:11 API parameters Rule of Thumb
15:18 Path - 16:05 parameter for identifying resource
15:33 Query - ?id=43 16:15 sth that refines Optional, e.g. query collection - filter a collection
15:41 Body - 16:27 when there is some advanced logic going on, 16:30 when you want to send a search query
15:47 Header
17:11 HTTP status code map
18:29 1XX - Hold on ... there is more to come
18:34 2XX - Here you go
18:40 3XX - redirection ro sth, just go away
18:46 4XX - you fucked up
18:52 5XX - I fucked up
20:21 200 - Create!
21:05 API navigation is more important to make API more discoverable
24:05 200 - Accepted
24:36 204 - no content - DELETE
25:18 206 - partial content -> pagination
26:15 304 - not modified
28:24 pagination
30:40 with accept range header
31:48 wrapped collections
33:53 3XX
34:19 4XX
34:41 429 too many request
38:38 different payloads for different consumers
39:08 filtering
39:34 specify fields
39:58 specify exclude fields
40:10 specify style
43:02 sort
44:07 searching
44:40 versioning
46:27 hypermedia
48:03 pros & cons for hypermedia
52:02 change is unavoidable
55:10 HAL approach
@ 25:28 As of tools.ietf.org/html/rfc7233#section-4.1, 206 Partial content should only be sent in reply to ranged requests. If you would like to realize pagination or other partial requests using the 206 Partial Content response code, you should go the full step and use range request headers (ranges are not queries) and specify your own range unit like "page" as part of your protocol. Nice talk though. Edit: Should have watched until 30:50 first :) Its hard to implement though if you want to support multiple ranges any apply range coalescation.
Such a useful presentation!
Resources as given in the video (ua-cam.com/video/48azd2VqtP0/v-deo.html)
www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api
github.com/paypal/api-standards/blob/master/api-style-guide.md
blog.octo.com/en/design-a-rest-api/
github.com/interagent/http-api-design/blob/master/SUMMARY.md
sookocheff.com/post/api/on-choosing-a-hypermedia-format/
www.troyhunt.com/2014/02/your-api-versioning-is-wrong-which-is.html
4:23 its been like what 3 years until I understood what representations stood for...
boring representation style but useful information
The voice is so annoying.