Overview

RESTx: An overview

What is RESTx?

RESTx is a new RESTful, open-source data publishing and integration platform from MuleSoft, which emphasizes simplicity, sane defaults and out-of-the-box usability. New data resources can be created by IT staff and admins, but also by users and even without coding. RESTx runs as a stand-alone server, listening for HTTP requests.

 

Common use cases

RESTx can be used in a wide variety of situations. Some typical ones:

Data integration: Creation of data integration building blocks around diverse data sources, implementation of custom data integration logic, with automatic conversion of data formats.

Mashups: Providing web accessible interfaces to data.

User generated data sources: Users share their domain knowledge and expertise by creating new data sources; URIs representing live, usable, read/write data, easily consumed via web-browser, imported in spreadsheets and used in other client applications.

Please also see our detailed case studies and examples.

 

Highlights

RESTx is RESTful: All you need to know to interact with the server, all available components and resources, doc pages, descriptions of parameters and other attributes can be discovered simply by following links, for example with a web browser. Clients don't need to know specific URIs, except the root URI of the server. Data is provided to clients via RESTful resources, which represent a live view into custom data, applications and data integrations, all behind a simple and easy to use URI. Click on it in a web browser or interact with it through an automated client application.

RESTx is open source: Licensed under the GPLv3 license, all sources are openly available for you to examine and to modify, should you wish to do so. We maintain mailing lists, forums and bug tracking systems and welcome your contributions.

RESTx is about simplicity: While other platforms and frameworks are heavy, require steep learning curves and large organizational commitment, RESTx is simple. The learning curve is just a stroll in the park. The install is quick and is done with a single command. RESTx is standalone and does not require additional infrastructure. Controlling the server is done through a single command. No complex config files, no XML needed to get started.

RESTx is about data integration and publishing: Custom data access, processing and integration tasks can be implemented in components, utilizing a compact and easy API. Examples are provided to get you started quickly. Components can implement simple data access (provide access to a database, connect with an SaaS offering, utilize proprietary interfaces to legacy software, etc.) or complex data integration tasks (pull data from multiple sources, combine, filter, process, produce specialized output).

RESTx allows you to quickly create RESTful resources: Often, code needs parameters. RESTx's components are no exception. But instead of dealing with configuration files to which normally only administrators have access, RESTx allows users and client applications to POST specific configurations through the server's RESTful API. Doing so creates a RESTful resource: The particular configuration gets its own URI. Accessing the URI results in RESTx applying the configuration to the given component and returning the output. For example, the IT department may provide a component that can access a database. But clients now create multiple configurations for that component (RESTful resources), which specify different queries. The URIs of the RESTful resources are short, opaque, can be passed around, used in many contexts and do not require or expose the configuration parameters. RESTful resources represent information in a well-defined and simple manner for easy use by client programs or access through a web browser.

RESTx speaks multiple languages: Components can be written in one of several languages. Language specific APIs are currently provided for Java and Python. More languages will be supported soon. Using and creating resources only requires a client that supports HTTP. A web browser is a good start. But specific client libraries can easily be written for any language for which an HTTP library is available. Implementations for Java and Python are provided.

 

What can you do next?

Step 1: Developers or admins install components

A component is a piece of code that provides access to data sources, such as databases, SaaS offerings, custom software systems, or which implement data integration logic. Writing new custom components is very easy and RESTx also provides some components out of the box.

Overview, step 1

But code needs parameters. That's where resources come into play...

Step 2: Browse components, create resources

Power users, automated client apps or IT staff use RESTx's RESTful interface to find out about installed components, their parameters and provided services.

They then POST the required parameters to the Component's URI. This set of parameters is stored under its own URI: A new resource was created.

Overview, step 1

A resource's URI can be passed around and used...

Step 3: Access and use resources

Users or client apps query the RESTx server for the available resources. Users see resource URIs just as handles to useful data without any concern about components or their configurations. Users then access the resource, for example by simply hitting its URI with a web browser.

Overview, step 3

RESTx applies the resource's parameters to the component code. Output is returned to the client. Input can be provided via POST or URI query parameters.