Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Inviqa techPortal:
Create a RESTful API with Apigility
Dec 04, 2013 @ 15:29:15

On the Inviqa techPortal they've posted a new tutorial from Rob Allen introducing Apigility, the recently announced API management and creation tool from Zend. He uses his usual album/music illustration to show how to create a simple API inside the tool.

On the 7th October 2013, Zend introduced Apigility to the world. Once you get beyond the name, you see a very interesting project that allows you to easily create a web service without having to worry about the nitty-gritty details. Which details? Well, Apigility will handle content negotiation, error handling and versioning for you, allowing you to concentrate on your application. In the recently tagged 0.7 release, Apigility also supports both HTTP and OAuth2 authentication. In this tutorial we will create a simple REST API that allows us to view a list of music albums, showing how to start using Apigility and how to publish an API using this tool.

He walks you through all the steps you'll need to create the basic API, more specifically around the "Albums" data and functionality:

  • Creating a new project with Composer
  • Using the Admin dashboard to create a new API
  • Making a new REST endpoint (albums)
  • Building an Album collection endpoint (with Collection, Entity and Resource)
  • Making the data model, including the table SQL

He includes all the code you'll need for these last few items and shows the curl calls to make for grabbing a single and multiple album listings. There's also a brief discussion in there about how Apigility handles API versioning with some internal handling.

tagged: apigility zend rest api tutorial introduction

Link: http://techportal.inviqa.com/2013/12/03/create-a-restful-api-with-apigility/


Trending Topics: