RESTful APIs in practice

The Pure Doctrine

Conclusions

The three APIs featured in this article stick firmly to the REST principle. At the same time, by choosing JSON, none of the three use a genuine hypermedia format but take a pragmatic approach with their own JSON specifications. Formally, they fail the REST check.

The operating principle of the hypermedia format can be imitated in JSON; Twitter does a better job of this than WordPress.com, whereas figo keeps too much to simple tables of values to use hypermedia options consistently. The processes shown in the documentation with their branches can be mapped well in a hypermedia format; the API does not fully grasp the opportunities here.

All three manage without difficulty to abstract the data, creating an application layer and a user-oriented presentation layer, which is in the interest of providers, because it has a positive effect on version maintenance. The user aspect is particularly evident with Twitter and figo.

In terms of the process, figo is a bit more difficult because it depends on payment transaction mechanisms and the customer-bank dialog, but the problem is solved within the framework of its possibilities.

For all three of the APIs presented here, you can see that the implementation of RESTful principles are understood for three of the four criteria. Against the background of advancing developments in the field of artificial intelligence, it would certainly be preferable to include hypermedia more consistently, because that means an API can intuitively navigate along a desired process from one resource to another. At the same time, it clearly marks multimedia resources as such. This facilitates the machine readability of the code and therefore the ability to automate integration.

Infos

  1. "REST APIs" by Marcus Nasarek, ADMIN , issue 40, 2017, pg. 92, http://www.admin-magazine.com/Archive/2017/40/Developing-RESTful-APIs
  2. Twitter: https://twitter.com
  3. WordPress: https://www.wordpress.com
  4. figo banking services: https://www.figo.io/en/
  5. Twitter REST API documentation: https://dev.twitter.com/rest/reference
  6. OAuth protocol: https://oauth.net
  7. Twitter developer platform: https://dev.twitter.com
  8. Twitter development library: https://dev.twitter.com/resources/twitter-libraries
  9. Twurl, a Ruby-based Twitter API tool: https://github.com/twitter/twurl
  10. JSON data exchange format: http://www.json.org/json-en.html
  11. WordPress.com REST API documentation: https://developer.wordpress.com/docs/api/
  12. HAL standard: https://tools.ietf.org/html/draft-kelly-json-hal-08
  13. WordPress.com development portal: https://developer.wordpress.com
  14. FinTS bank standard: https://www.hbci-zka.de/english/
  15. figo API documentation: http://docs.figo.io
  16. figo on GitHub: https://github.com/figo-connect

The Author

Marcus Nasarek is completely devoted to scripting, Ruby, and projects based on the Raspberry PI.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs



Support Our Work

ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.

Learn More”>
	</a>

<hr>		    
			</div>
		    		</div>

		<div class=