# OracleLabsParallelGraphAnalyticsPgxRestApi.AnalysesApi

All URIs are relative to */*

Method | HTTP request | Description
------------- | ------------- | -------------
[**createAnalysis**](AnalysesApi.md#createAnalysis) | **POST** /core/v1/compileAnalysis | Create a new analysis
[**deleteAnalysis**](AnalysesApi.md#deleteAnalysis) | **DELETE** /core/v1/analyses/x-aid | Delete an existing analysis
[**getAnalysisMetaData**](AnalysesApi.md#getAnalysisMetaData) | **GET** /core/v1/analyses/x-aid | Get specific analysis metadata
[**getAvailableAnalyses**](AnalysesApi.md#getAvailableAnalyses) | **GET** /core/v1/analyses | Get all available analysis Metadata
[**getAvailableAnalysisIds**](AnalysesApi.md#getAvailableAnalysisIds) | **GET** /core/v1/availableAnalysesIds | Get all available analyses IDs
[**runAnalysis**](AnalysesApi.md#runAnalysis) | **POST** /core/v1/analyses/x-aid/run | Invoke an analysis

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

Create a new analysis

Create a new analysis, based on source code that gets compiled and then registered as an analysis which can be invoked on a graph.

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

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.AnalysesApi();
let body = new OracleLabsParallelGraphAnalyticsPgxRestApi.CreateAnalysisRequest(); // CreateAnalysisRequest | Object which specifies the new analysis, including the source code to be compiled.
let SID = "SID_example"; // String | session ID

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**CreateAnalysisRequest**](CreateAnalysisRequest.md)| Object which specifies the new analysis, including the source code to be compiled. | 
 **SID** | **String**| session ID | 

### Return type

[**CompilationResult**](CompilationResult.md)

### Authorization

No authorization required

### HTTP request headers

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

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

Delete an existing analysis

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

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.AnalysesApi();
let SID = "SID_example"; // String | session ID
let xAid = "xAid_example"; // String | Name of the analysis
let opts = { 
  'ignoreNotFound': false, // Boolean | 
  'csrfToken': "csrfToken_example" // String | CSRF token
};
apiInstance.deleteAnalysis(SID, xAid, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **SID** | **String**| session ID | 
 **xAid** | **String**| Name of the analysis | 
 **ignoreNotFound** | **Boolean**|  | [optional] [default to false]
 **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="getAnalysisMetaData"></a>
# **getAnalysisMetaData**
> CompiledProgramMetaData getAnalysisMetaData(SID, xAid)

Get specific analysis metadata

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

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.AnalysesApi();
let SID = "SID_example"; // String | session ID
let xAid = "xAid_example"; // String | Name of the analysis

apiInstance.getAnalysisMetaData(SID, xAid, (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 | 
 **xAid** | **String**| Name of the analysis | 

### Return type

[**CompiledProgramMetaData**](CompiledProgramMetaData.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="getAvailableAnalyses"></a>
# **getAvailableAnalyses**
> [CompiledProgramMetaData] getAvailableAnalyses(SID)

Get all available analysis Metadata

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

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.AnalysesApi();
let SID = "SID_example"; // String | session ID

apiInstance.getAvailableAnalyses(SID, (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 | 

### Return type

[**[CompiledProgramMetaData]**](CompiledProgramMetaData.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="getAvailableAnalysisIds"></a>
# **getAvailableAnalysisIds**
> getAvailableAnalysisIds(SID)

Get all available analyses IDs

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

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.AnalysesApi();
let SID = "SID_example"; // String | session ID

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **SID** | **String**| session ID | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

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

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

Invoke an analysis

This can be a built-in analysis or an analysis that was created by providing the source code and invoking the create analysis endpoint

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

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.AnalysesApi();
let body = new OracleLabsParallelGraphAnalyticsPgxRestApi.RunAnalysisRequest(); // RunAnalysisRequest | Holds the arguments and the pool type information for an algorithm execution request
let SID = "SID_example"; // String | session ID
let xAid = "xAid_example"; // String | Name of the analysis

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**RunAnalysisRequest**](RunAnalysisRequest.md)| Holds the arguments and the pool type information for an algorithm execution request | 
 **SID** | **String**| session ID | 
 **xAid** | **String**| Name of the analysis | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

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

