Home

Awesome

RESTful API to Oracle databases

Maven Central LGPLv3 License Java Development Kit 1.7 Coverage Status Build Status

<a href="http://valdasraps.github.io/resthub" target="_blank">RestHub website</a><br> <a href="https://raw.githubusercontent.com/valdasraps/resthub/master/doc/RestHUB_docs.pdf" target="_blank">RestHub documentation</a> Architecture

Overview

RestHub was designed to provide a way to access data from the client application through RESTful API. In this manner developers will no longer have to implement difficult approaches for data retrieval from the database in representational layer and can separate application and representation codebase. They will be able to access data through the RestHub system by sending simple SQL queries.

Benefits

Separate data access from the representation:

Features

Self descriptive:

Secure:

Fast:

Flexible:

Types of resources

API

URLMethodDescription
/tablesGETList of tables in JSON
/tables/{namespace}GETList of namespace tables in JSON
/table/{namespace}/{name}GETTable description in JSON
/queriesGETList of queries in JSON
/queryPOSTCreate query from provided entity SQL and return automatically generated {id}. Query can include parameters :name (strings) or :s__name for strings, :n__name for numbers and :d__name for dates
/query/{id}GETQuery description in JSON
/query/{id}DELETERemove query
/query/{id}/countGETGet query data size
/query/{id}/dataGETGet query data. Media type is by Accept header. For example: “Accept” : “application/xml”
/query/{id}/page/{pp}/{p}/dataGETGet query page data. Media type is by Accept header. Variables: pp - data rows per page, p - page number
/table/{namespace}/{table}/dataGETGet table data. Media type is by Accept header. For example: “Accept” : “application/xml”. Creates query and redirects to it.
/table/{namespace}/{table}/page/{pp}/{p}/dataGETGet query page data. Media type is by Accept header. Variables: pp - data rows per page, p - page number. Creates query and redirects to it.
/query/{id}/cacheGETGet query cache information
/query/{id}/cacheDELETEClean all query cache
/table/{namespace}/{name}/cacheGETGet the list of query caches that use the table defined
/query/{id}/data?{p}={v}GETGet query data with parameters. Variables: p - parameter name, v - parameter value.
/blacklistGETList of blacklisted tables in JSON
/blacklist/{namespace}GETList of blacklisted namespace tables in JSON
/blacklist/{namespace}/{name}GETBlacklisted table description in JSON
/blacklistDELETERemove all tables from blacklist (refresh)
/blacklist/{namespace}DELETERemove all namespace tables from blacklist (refresh)
/blacklist/{namespace}/{name}DELETERemove table from blacklist (refresh)
/infoGETGeneral information about the service