Apigility is an API Builder, designed to simplify creating and maintaining useful, easy to consume, and well structured APIs. Regardless of your experience in API building, with Apigility you can allow mobile applications, developer communities, and any other consumer controlled access to your applications.
Zend Studio's integration with Apigility allows you to seamlessly create, document and test the APIs constructing the back-end of your applications, all within the same development environment.
In this tutorial you will learn:
To better understand the procedures described in this tutorial, watch this video:
The first step in this tutorial is creating a new Apigility project in your workspace.
|
|
|
To create an Apigility project:
|
|
Next, we will add a new RPC service to our Apigility project.
In this tutorial, we will be adding a service that pings the API for availability and receives a time-stamp for acknowledgments.
|
|
|
To add a new service to Apigility:
Well done! You have successfully created your new web service in Apigility. |
|
The Apigility Editor makes documenting your API services an easy task.
|
|
|
To document services:
|
|
Our next step in this tutorial is to add some code to the service so it actually performs some action. We are going to make sure that the response to the request contain the 'ack' parameter with a current timestamp.
|
|
|
To develop the service:
The important lines are lines 05, which imports 'ZF\ContentNegotiation\ViewModel', and lines 11-13, which return a view model from the controller.
|
|
Our final step is to test the new service. Zend Studio's integration with Apigility allows you do this within your workspace, without needing to use other utilities.
|
|
|
To test the service:
|
Well done! You have successfully completed this tutorial. For information on how to use Apigility in Zend Studio to develop your mobile applications, see Developing Mobile Applications with Zend Studio. For more information on working with Apigility, see Apigility.org. |
Our final step is adding and testing HTTP Basic authentication to our service.
|
|
|
To add and test authentication:
|
Congratulations! You have completed the Apigility Integration tutorial. We recommend you see the Developing Mobile Applications with Zend Studio tutorial for information on using Apigility as the back-end of your mobile projects. |