Thursday, February 26, 2015

Use of Apigility to Create REST/RPC APIs


Apigility is an API Builder, designed to simplify creating and maintaining useful, easy to consume, and well structured APIs. 
You can use Apigility in any PHP application, using all the libraries and frameworks that you want.
Apigility offers the ability to generate API documentation and Create REST/RPC API using the Admin UI i.e. easy to use and fast to implement. 

Step-by-Step Guide

System Requirements
Need PHP version 5.3.23 or greater
Please follow the steps for installation from the given link below where you can find your taste of installation i.e
Via Console, Tarball, GIT, Composer etc..

Authentication & Authorization:
Apigility takes a lightweight, layered, and extensible approach to solving both problems of authentication and authorization. Apigility delivers three methods to authenticate identities: HTTP Basic authentication, HTTP Digest authentication, and OAuth2 (by way of Brent Shaffer's PHP OAuth2 package). 

Out of 3 authentications, OAuth2 is bit tough to implement in your application.
OAuth2 is an authentication framework used worldwide; for instance Facebook Github, and Twitter use this protocol to authenticate their APIs. The OAuth2 protocol is actually a framework for authorization. From the abstract of RFC 6749 you can read that.
The use cases covered by the OAuth2 framework are:
  • Web-server applications
  • Browser-based applications
  • Mobile apps
  • Username and password access
  • Application access
You can configure the OAuth2 authentication via OAuth2 sql which is provided inside the Apigilty Library. Please follow the below Link to configure it.

Create Your REST API inside Apigility, please follow the below Url:

For API Documentation also Apigility helps you a lot. While creation of API, you can define the documentation of the respected API. For further Information how to create it please follow the below URL:

For further knowledge on Apigilty: