https://github.com/emadb/universalapi
The Universal API
https://github.com/emadb/universalapi
Last synced: about 1 year ago
JSON representation
The Universal API
- Host: GitHub
- URL: https://github.com/emadb/universalapi
- Owner: emadb
- License: mit
- Created: 2016-10-19T09:52:37.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-10-29T08:13:08.000Z (almost 10 years ago)
- Last Synced: 2025-02-05T05:29:33.363Z (over 1 year ago)
- Language: C#
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UniversalApi
This is the Universal API. Whenever you need to write a new API this framework gives you all you need.
It works like GraphQL and OData but with a well known and rock solid syntax.
It supports all the HTTP verbs and it responds in Json.
Examples
---
Consider a Customer API. You can CRUD your customer at no cost. Just setup the database and issue the following commands:
**Get a customer list**
```curl http://youapiserver.com/api?q=SELECT name, surname FROM Customers```
**Get a single customer**
```curl http://youapiserver.com/api?q=SELECT name, surname FROM Customers WHERE id=1```
**Create a new Customer**
```curl -X POST --data "q=INSERT INTO Customers(name, surname) VALUES('carla', 'bianchi')" http://youapiserver.com/api```
**Update a customer**
```curl -X PUT --data "q=UPDATE Customers SET name='Luca' WHERE id=1" http://youapiserver.com/api```
**Delete a customer**
```curl -X DELETE --data "q=DELETE FROM Customers WHERE id=1" http://youapiserver.com/api```
NOTE
---
By now only SQL Server is supported.
*Developed with :trollface:*