REST Manager API
The GigaSpaces Manager provides a REST REpresentational State Transfer. Application Programming Interface An API, or application programming interface, is a set of rules that define how applications or devices can connect to and communicate with each other. A REST API is an API that conforms to the design principles of the REST, or representational state transfer architectural style. Manager API for managing the GigaSpaces application environment.
To begin, start a standalone GigaSpaces Manager on your machine using the following command:
After the GigaSpaces Manager has started, browse to localhost:8090 and start working with the API.
You must start a GigaSpaces Manager to access the REST Manager API. You can also start a cluster of GigaSpaces Managers to ensure high availability. To learn more about the GigaSpaces Manager, refer to the GigaSpaces Manager topic.
The REST Manager API was built with Swagger. Swagger provides typical information for each operation (parameters, responses, etc.). In addition, you can experiment with it by setting parameters and clicking the
Try it out! button from within the documentation. This invokes the operation, and you can see the response code and body, as well as the
curl command and request URL that were used to invoke the command. If you are familiar with the older Admin API, most of this is self explanatory. You can also download the
yaml specification and use Swagger's
Online Editor to generate a client in your favorite language.
In the Admin API, long-running operations (for example,
undeploy) are asynchronous with no future or callback. You can either track progress manually, or use various ‘andWait’ overloads (for example,
deployAndWait). The REST Manager API cannot use
andWait so you must poll for completion, but each such operation behaves differently.
Instead, the REST Manager API contains Request functionality. Each long-running operation creates a request and returns its ID, so you can poll on the request ID and check the status (running/successful/failed). The request exposes additional useful information:
- Who started the request (IP and user)
- When the request was started and completed
- If the request failed, an error message
- Additional properties on the request execution
By default, the system keeps up to 100,000 completed requests (configurable), and purges the oldest as needed.
Deploying a Processing Unit This is the unit of packaging and deployment in the GigaSpaces Data Grid, and is essentially the main GigaSpaces service. The Processing Unit (PU) itself is typically deployed onto the Service Grid. When a Processing Unit is deployed, a Processing Unit instance is the actual runtime entity. requires uploading a resource (JAR/WAR/ZIP) to the GigaSpaces Manager, but due to technical issues we currently can’t include both a binary file and a JSON payload in the same REST operation. Instead, there are two operations:
- Upload a resource.
- Deploy a Processing Unit, and provide a name of a previously uploaded resource.
This also means that when you undeploy a Processing Unit, the resource does not get deleted. If you want to delete it you must execute a separate REST operation (if you want to undeploy/redeploy with the same JAR. there’s no need to remove it). Currently you cannot delete/replace a JAR file if a deployed Processing Unit is using it.
The REST component is part of the GigaSpaces Manager, and inherits the GigaSpaces Manager security configuration. As the REST uses an HTTP protocol, it is best to configure SSL to allow for HTTPS (secure access).
For more information about using the REST Manager API with security, refer to REST Manager API - Security section.
You can perform a wide variety of operations on all of the environment components listed below. The available operations, request parameters and URLs are listed on each relevant page of the local GigaSpaces Manager.
You must start a GigaSpaces Manager to access the pages using the links below.
- Containers - See the Containers page.
- Hosts - See the Hosts page.
- Information - See the Information page.
- Processing Units - See the Processing Units page.
- Requests - See the Requests page.
- Spaces - See the Spaces page.
- Spark - See the Spark page.
From the Swagger user interface, you can generate client code in your preferred language: