# OracleLabsParallelGraphAnalyticsPgxRestApi.SessionsApi

All URIs are relative to */*

Method | HTTP request | Description
------------- | ------------- | -------------
[**createSession**](SessionsApi.md#createSession) | **POST** /core/v1/sessions | Create a new session
[**deleteSession**](SessionsApi.md#deleteSession) | **DELETE** /core/v1/session | Delete a session
[**getExecutionEnvironment**](SessionsApi.md#getExecutionEnvironment) | **GET** /core/v1/executionEnvironment | Get the value for an execution environment field
[**updateExecutionEnvironment**](SessionsApi.md#updateExecutionEnvironment) | **POST** /core/v1/executionEnvironment/update | Update an execution environment parameter

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

Create a new session

If the parameters are not specified (null), then defaults will be used. If the server does not allow overriding defaults, the session cannot be created with parameters.

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

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.SessionsApi();
let body = new OracleLabsParallelGraphAnalyticsPgxRestApi.CreateSessionRequest(); // CreateSessionRequest | The request body contains the session parameters

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**CreateSessionRequest**](CreateSessionRequest.md)| The request body contains the session parameters | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

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

<a name="deleteSession"></a>
# **deleteSession**
> deleteSession(SID, opts)

Delete a session

Deletes a session, based on the session ID provided. This will cause all pending futures to complete exceptionally with a CancellationException. Future requests with this session ID will be refused. This request also results in some cleanup activities on the server, where session-specific data like graphs and properties are removed.

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

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.SessionsApi();
let SID = "SID_example"; // String | session id
let opts = { 
  'csrfToken': "csrfToken_example" // String | CSRF token
};
apiInstance.deleteSession(SID, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **SID** | **String**| session id | 
 **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="getExecutionEnvironment"></a>
# **getExecutionEnvironment**
> getExecutionEnvironment(SID, poolType, field)

Get the value for an execution environment field

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

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.SessionsApi();
let SID = "SID_example"; // String | session id
let poolType = "poolType_example"; // String | The pool for which to look up the value of the execution environment field.
let field = "field_example"; // String | The name of the execution environment field.

apiInstance.getExecutionEnvironment(SID, poolType, field, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **SID** | **String**| session id | 
 **poolType** | **String**| The pool for which to look up the value of the execution environment field. | 
 **field** | **String**| The name of the execution environment field. | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

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

<a name="updateExecutionEnvironment"></a>
# **updateExecutionEnvironment**
> updateExecutionEnvironment(body, SID)

Update an execution environment parameter

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

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.SessionsApi();
let body = new OracleLabsParallelGraphAnalyticsPgxRestApi.ExecutionEnvironmentUpdateRequest(); // ExecutionEnvironmentUpdateRequest | The body defines the execution environment parameters to be updated
let SID = "SID_example"; // String | session id

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**ExecutionEnvironmentUpdateRequest**](ExecutionEnvironmentUpdateRequest.md)| The body defines the execution environment parameters to be updated | 
 **SID** | **String**| session id | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

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

