This document is DEPRECATED.

Please consider any information here as out of date. DO NOT use this document.

Instead, refer to

Please update your bookmarks accordingly.

Skip to end of metadata
Go to start of metadata


This server provides easy to use RESTful HTTP access to the Infinispan data grid, build on RESTEasy. This application is delivered (currently) as a war, which you can deploy to a servlet container (as many instances as you need).


Out of the box, Infinispan will create and use a new LOCAL mode cache. To set a custom configuration:

  1. Unzip the REST WAR file (or use an exploded deployment)
  2. Create an Infinispan configuration XML file and name this infinispan.xml
  3. Place this file in infinispan-server-rest.war/WEB-INF/classes

Alternatively, you could:

  1. Unzip the REST WAR file (or use an exploded deployment)
  2. Create an Infinispan configuration XML file, call it whatever you want and place it wherever you want
  3. Edit infinispan-server-rest.war/WEB-INF/web.xml and look for the infinispan.config init-param. Change the value of this init-param to the full path to your Infinispan configuration.

Please note that the REST server only allows interaction with either the default cache (named ___defaultcache) or one of the named caches in the configuration file. This is because the REST server starts the default and pre-defined caches on startup in order to provide consistent behaivor.

Creation of new named caches on the fly is not supported.

As a result, if you don't use a custom configuration file, you'll only be able to interact with the default cache. To interact with more caches, use a configuration file with the desired named caches.

Accessing Data - via URLs

HTTP PUT and POST methods are used to place data in the cache, with URLs to address the cache name and key(s) - the data being the body of the request (the data can be anything you like). It is important that a Content-Type header is set. GET/HEAD are used to retrieve data Please see here for the details. Other headers are used to control the cache settings and behaviour (detailed in that link).

Client side code

Part of the point of a RESTful service is that you don't need to have tightly coupled client libraries/bindings. All you need is a HTTP client library. For Java, Apache HTTP Commons Client works just fine (and is used in the integration tests), or you can use API.

Ruby client code:

Python client code:

Java client code:


  • Sample persistence options to make this a long term data grid
  • Query and indexing (of known MIME types, and JSON, XML etc)
  • Returning both lists of buckets + entries as <link> relations (where it makes sense)
  • Monitoring of stats via Web interface
  • (optional: WADL?)
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.