{"id":96,"date":"2014-02-04T02:03:46","date_gmt":"2014-02-04T10:03:46","guid":{"rendered":"http:\/\/www.tech.dimprash.com\/?p=96"},"modified":"2017-04-10T10:44:35","modified_gmt":"2017-04-10T18:44:35","slug":"summary-of-good-rest-api-design","status":"publish","type":"post","link":"http:\/\/www.tech.dimprash.com\/?p=96","title":{"rendered":"Summary of Good REST Api Design"},"content":{"rendered":"<p>Summary of points about good RESTful API design from below talk: <\/p>\n<p>Definition:  Representational state transfer (REST) or RESTful Web services are one way of providing interoperability between computer systems on the Internet. REST-compliant Web services allow requesting systems to access and manipulate textual representations of Web resources using a uniform and predefined set of stateless operations<\/p>\n<p><a href=\"https:\/\/blog.apigee.com\/detail\/restful_api_design\">https:\/\/blog.apigee.com\/detail\/restful_api_design<\/a><\/p>\n<p>1) 2 base urls<br \/>\n   a) for collection (\/dogs)<br \/>\n   b) for a single element (\/dogs\/bo)<br \/>\n2) POST, GET, PUT, DELETE<br \/>\n3) nouns are good, verbs are bad<br \/>\n4) Assocations GET \/owners\/bob\/dogs<br \/>\n5) Complex Associations &#8211; Sweep under the carpet (behind the question mark)<br \/>\n   (\/dogs?state=barking&#038;color=red)<br \/>\n6) pagination (offset, limit or start, count)<br \/>\n7) searching ( global: \/search?q=fluffy+dog , scoped: \/owners\/bob\/dogs\/search?q=fluffy+dog)<br \/>\n8) versioning (as far to the left as possible)<br \/>\n9) give me exactly what i need <\/p>\n<ul>\n<li>a) \/people:(id,first_name,last_name)<\/li>\n<li>b) ?fields=id,first_name,last_name<\/li>\n<\/ul>\n<p>10) output format <\/p>\n<ul>\n<li>a) \/venue.json<\/li>\n<li>b) ?output=json<\/li>\n<\/ul>\n<p>11) Standardize Error Formats<br \/>\n12) Make dog to bark (\/dog?event=bark) <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary of points about good RESTful API design from below talk: Definition: Representational state transfer (REST) or RESTful Web services are one way of providing interoperability between computer systems on the Internet. REST-compliant Web services allow requesting systems to access and manipulate textual representations of Web resources using a uniform and predefined set of stateless &hellip; <a href=\"http:\/\/www.tech.dimprash.com\/?p=96\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Summary of Good REST Api Design<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,8],"tags":[14],"class_list":["post-96","post","type-post","status-publish","format-standard","hentry","category-uncategorized","category-web-development","tag-rest"],"_links":{"self":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/96","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=96"}],"version-history":[{"count":5,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/96\/revisions"}],"predecessor-version":[{"id":855,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/96\/revisions\/855"}],"wp:attachment":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=96"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=96"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=96"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}