# OracleLabsParallelGraphAnalyticsPgxRestApi.ServerManagementApi

All URIs are relative to */*

Method | HTTP request | Description
------------- | ------------- | -------------
[**freeCachedMemory**](ServerManagementApi.md#freeCachedMemory) | **POST** /control/v1/freeCachedMemory | release memory of un-used graphs
[**isReady**](ServerManagementApi.md#isReady) | **GET** /control/v1/isGraphPreloadingDone | Query whether the PGX server is ready
[**isRunning**](ServerManagementApi.md#isRunning) | **GET** /control/v1/isRunning | Query whether the PGX server is running
[**isRunning_0**](ServerManagementApi.md#isRunning_0) | **GET** /isRunning | Query whether the PGX server is running
[**killSession**](ServerManagementApi.md#killSession) | **DELETE** /control/v1/sessions/x-session-id | Kill a session
[**setMaxSessionMemorySize**](ServerManagementApi.md#setMaxSessionMemorySize) | **POST** /control/v1/maxMemory/x-session-id | Set session memory limit
[**shutdown**](ServerManagementApi.md#shutdown) | **POST** /control/v1/shutdown | Shut down this PGX instance
[**start**](ServerManagementApi.md#start) | **POST** /control/v1/start | Start PGX instance
[**unpinGraph**](ServerManagementApi.md#unpinGraph) | **POST** /control/v1/unpinGraph | Unpin a graph
[**updatePgxConfig**](ServerManagementApi.md#updatePgxConfig) | **POST** /control/v1/updatePgxConfig | Update PGX configuration

<a name="freeCachedMemory"></a>
# **freeCachedMemory**
> CacheStatistics freeCachedMemory()

release memory of un-used graphs

cleanup the server 

### Example
```javascript
import {OracleLabsParallelGraphAnalyticsPgxRestApi} from 'oracle_labs_parallel_graph_analytics__pgx_rest_api';

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.ServerManagementApi();
apiInstance.freeCachedMemory((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**CacheStatistics**](CacheStatistics.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="isReady"></a>
# **isReady**
> isReady(opts)

Query whether the PGX server is ready

### Example
```javascript
import {OracleLabsParallelGraphAnalyticsPgxRestApi} from 'oracle_labs_parallel_graph_analytics__pgx_rest_api';

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.ServerManagementApi();
let opts = { 
  'blocking': true // Boolean | 
};
apiInstance.isReady(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **blocking** | **Boolean**|  | [optional] 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="isRunning"></a>
# **isRunning**
> isRunning(opts)

Query whether the PGX server is running

### Example
```javascript
import {OracleLabsParallelGraphAnalyticsPgxRestApi} from 'oracle_labs_parallel_graph_analytics__pgx_rest_api';

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.ServerManagementApi();
let opts = { 
  'blocking': true // Boolean | 
};
apiInstance.isRunning(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **blocking** | **Boolean**|  | [optional] 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="isRunning_0"></a>
# **isRunning_0**
> isRunning_0()

Query whether the PGX server is running

### Example
```javascript
import {OracleLabsParallelGraphAnalyticsPgxRestApi} from 'oracle_labs_parallel_graph_analytics__pgx_rest_api';

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.ServerManagementApi();
apiInstance.isRunning_0((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters
This endpoint does not need any parameter.

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="killSession"></a>
# **killSession**
> killSession(xSessionId, opts)

Kill a session

Kill a session based on the session ID provided.

### Example
```javascript
import {OracleLabsParallelGraphAnalyticsPgxRestApi} from 'oracle_labs_parallel_graph_analytics__pgx_rest_api';

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.ServerManagementApi();
let xSessionId = "xSessionId_example"; // String | the session to be killed.
let opts = { 
  'csrfToken': "csrfToken_example" // String | CSRF token
};
apiInstance.killSession(xSessionId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **xSessionId** | **String**| the session to be killed. | 
 **csrfToken** | **String**| CSRF token | [optional] 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="setMaxSessionMemorySize"></a>
# **setMaxSessionMemorySize**
> setMaxSessionMemorySize(body, xSessionId)

Set session memory limit

Sets the maximum memory limit of the given session

### Example
```javascript
import {OracleLabsParallelGraphAnalyticsPgxRestApi} from 'oracle_labs_parallel_graph_analytics__pgx_rest_api';

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.ServerManagementApi();
let body = new OracleLabsParallelGraphAnalyticsPgxRestApi.ControlSessionMaxMemoryRequest(); // ControlSessionMaxMemoryRequest | The request body specifies the memory limit for the given session.
let xSessionId = "xSessionId_example"; // String | The session to apply the max memory limit to.

apiInstance.setMaxSessionMemorySize(body, xSessionId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**ControlSessionMaxMemoryRequest**](ControlSessionMaxMemoryRequest.md)| The request body specifies the memory limit for the given session. | 
 **xSessionId** | **String**| The session to apply the max memory limit to. | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: Not defined

<a name="shutdown"></a>
# **shutdown**
> shutdown(body)

Shut down this PGX instance

Shuts dow this PGX server instance according to the given parameters

### Example
```javascript
import {OracleLabsParallelGraphAnalyticsPgxRestApi} from 'oracle_labs_parallel_graph_analytics__pgx_rest_api';

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.ServerManagementApi();
let body = new OracleLabsParallelGraphAnalyticsPgxRestApi.ControlShutdownRequest(); // ControlShutdownRequest | The request body defines details for the shutdown request

apiInstance.shutdown(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**ControlShutdownRequest**](ControlShutdownRequest.md)| The request body defines details for the shutdown request | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: */*
 - **Accept**: Not defined

<a name="start"></a>
# **start**
> start(body)

Start PGX instance

Starts the PGX server instance

### Example
```javascript
import {OracleLabsParallelGraphAnalyticsPgxRestApi} from 'oracle_labs_parallel_graph_analytics__pgx_rest_api';

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.ServerManagementApi();
let body = new OracleLabsParallelGraphAnalyticsPgxRestApi.ControlStartRequest(); // ControlStartRequest | The request body defines the details for starting PGX

apiInstance.start(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**ControlStartRequest**](ControlStartRequest.md)| The request body defines the details for starting PGX | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: Not defined

<a name="unpinGraph"></a>
# **unpinGraph**
> unpinGraph(body)

Unpin a graph

Unpins a pinned graph.

### Example
```javascript
import {OracleLabsParallelGraphAnalyticsPgxRestApi} from 'oracle_labs_parallel_graph_analytics__pgx_rest_api';

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.ServerManagementApi();
let body = new OracleLabsParallelGraphAnalyticsPgxRestApi.UnpinGraphRequest(); // UnpinGraphRequest | Info about the graph to be unpinned.

apiInstance.unpinGraph(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**UnpinGraphRequest**](UnpinGraphRequest.md)| Info about the graph to be unpinned. | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: Not defined

<a name="updatePgxConfig"></a>
# **updatePgxConfig**
> updatePgxConfig(body)

Update PGX configuration

Updates the config of the PGX server instance

### Example
```javascript
import {OracleLabsParallelGraphAnalyticsPgxRestApi} from 'oracle_labs_parallel_graph_analytics__pgx_rest_api';

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.ServerManagementApi();
let body = new OracleLabsParallelGraphAnalyticsPgxRestApi.ControlConfigUpdateRequest(); // ControlConfigUpdateRequest | The request body defines the details for replacing the PGX config

apiInstance.updatePgxConfig(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**ControlConfigUpdateRequest**](ControlConfigUpdateRequest.md)| The request body defines the details for replacing the PGX config | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: Not defined

