# OracleLabsParallelGraphAnalyticsPgxRestApi.FuturesApi

All URIs are relative to */*

Method | HTTP request | Description
------------- | ------------- | -------------
[**cancelFuture**](FuturesApi.md#cancelFuture) | **DELETE** /core/v1/futures/x-future-id | Cancel a future
[**getFuture**](FuturesApi.md#getFuture) | **GET** /core/v1/futures/x-future-id/value | Get the result of a future
[**getFutureStatus**](FuturesApi.md#getFutureStatus) | **GET** /core/v1/futures/x-future-id/status | Get the status of a future

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

Cancel a future

Cancel a pending future. This will cause the future to complete exceptionally

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

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.FuturesApi();
let SID = "SID_example"; // String | session ID
let xFutureId = "xFutureId_example"; // String | the future ID
let opts = { 
  'csrfToken': "csrfToken_example" // String | CSRF token
};
apiInstance.cancelFuture(SID, xFutureId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **SID** | **String**| session ID | 
 **xFutureId** | **String**| the future 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="getFuture"></a>
# **getFuture**
> getFuture(SID, opts)

Get the result of a future

Get the result of a future. Will block the request if the future is not completed on the server side.

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

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.FuturesApi();
let SID = "SID_example"; // String | session ID
let opts = { 
  'xFutureId': "xFutureId_example" // String | 
};
apiInstance.getFuture(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 | 
 **xFutureId** | **String**|  | [optional] 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

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

<a name="getFutureStatus"></a>
# **getFutureStatus**
> AsyncStatus getFutureStatus(SID, xFutureId)

Get the status of a future

Get the current status of a future

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

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.FuturesApi();
let SID = "SID_example"; // String | session ID
let xFutureId = "xFutureId_example"; // String | the future ID

apiInstance.getFutureStatus(SID, xFutureId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **SID** | **String**| session ID | 
 **xFutureId** | **String**| the future ID | 

### Return type

[**AsyncStatus**](AsyncStatus.md)

### Authorization

No authorization required

### HTTP request headers

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

