GridGain Developers Hub

REST API

The GridGain 9 clusters provide an OpenAPI specification that can be used to work with GridGain 9 by standard REST methods.

OpenAPI Specification

You can access online specification in the API section. The OpenAPI documentation provides extended information on all REST endpoints you can access and the required payloads.

REST Connector Configuration

By default, rest connector starts on port 10300. THis port can be configured in the ignite.rest node configuration.

Using HTTP Tools

Once the cluster is started, you can use external tools to monitor the cluster over http, or manage the cluster. In this example, we will use curl to get cluster status:

curl 'http://localhost:10300/management/v1/cluster/state'

You are not limited to only monitoring, as GridGain REST API provides endpoints that can be used to manage the cluster as well. For example, you can create a snapshot via REST:

curl -H "Content-Type: application/json" -d '{"snapshotType": "FULL","tableNames": "table1,table2","startTimeEpochMilli": 0}' http://localhost:10300/management/v1/snapshot/create

Java Project Configuration

If you want to integrate GridGain REST API closer into your application, we recommend using an OpenAPI generator to generate a Java client. Once the client is generated, you can use it to work with REST API from code, for example:

ApiClient client = Configuration.getDefaultApiClient();
// Set base URL
client.setBasePath("http://localhost:10300");

// Get cluster configuration.
ClusterConfigurationApi clusterConfigurationApi = new ClusterConfigurationApi(client);
String configuration = clusterConfigurationApi.getClusterConfiguration();