Difference between revisions of "stoney core: REST API"
From stoney cloud
[unchecked revision] | [unchecked revision] |
(→Web API) |
|||
Line 3: | Line 3: | ||
** It provides all the available functions and data to its clients | ** It provides all the available functions and data to its clients | ||
** Serves as a data and business logic abstraction layer | ** Serves as a data and business logic abstraction layer | ||
− | * The web API | + | * The web API will be implemented using HTTPS and REST principles |
+ | * The web API uses JSON as the data interchange format | ||
* Multiple authentication methods are possible | * Multiple authentication methods are possible | ||
** Basic HTTP-Auth | ** Basic HTTP-Auth | ||
Line 10: | Line 11: | ||
** Access tokens | ** Access tokens | ||
* versioned API (preferred through URI) | * versioned API (preferred through URI) | ||
+ | * Input validation must be performed for all data | ||
+ | * Meaningful error message will be presented to the client | ||
+ | * All API functions are to be documented | ||
+ | * The API will be based on existing, proved and tested open source modules and components, coming either from a framework are as stand alone implementations, | ||
Why a Web API? | Why a Web API? | ||
* Separation and abstraction of data and business logic | * Separation and abstraction of data and business logic | ||
− | * Support for multiple clients | + | * Support for multiple clients with the same code base |
− | ** HTML/JS for selfcare Web GUI | + | ** HTML/JS/CSS for selfcare Web GUI |
** Command line interface for easy scripting | ** Command line interface for easy scripting | ||
** Integration into third party provisioning systems for resellers | ** Integration into third party provisioning systems for resellers | ||
− | * | + | * Automatic testing of functionality |
Revision as of 09:08, 16 October 2013
Web API
- The Web API will be implemented as a first-class citizen
- It provides all the available functions and data to its clients
- Serves as a data and business logic abstraction layer
- The web API will be implemented using HTTPS and REST principles
- The web API uses JSON as the data interchange format
- Multiple authentication methods are possible
- Basic HTTP-Auth
- X509 Certificate based authentication
- API key with shared secret
- Access tokens
- versioned API (preferred through URI)
- Input validation must be performed for all data
- Meaningful error message will be presented to the client
- All API functions are to be documented
- The API will be based on existing, proved and tested open source modules and components, coming either from a framework are as stand alone implementations,
Why a Web API?
- Separation and abstraction of data and business logic
- Support for multiple clients with the same code base
- HTML/JS/CSS for selfcare Web GUI
- Command line interface for easy scripting
- Integration into third party provisioning systems for resellers
- Automatic testing of functionality
- On the Yii PHP Framework Homepage: Extensions tagged with "rest"
- On the Yii PHP Framework Homepage: RestfullYii or on GitHub: RestfullYii
- On the Yii PHP Framework Homepage: Extensions tagged with "api"