# OracleLabsParallelGraphAnalyticsPgxRestApi.MapsApi

All URIs are relative to */*

Method | HTTP request | Description
------------- | ------------- | -------------
[**createMap**](MapsApi.md#createMap) | **POST** /core/v1/maps | Create a graph-bound or session-bound map
[**destroyMap**](MapsApi.md#destroyMap) | **DELETE** /core/v1/maps/x-map-name | Delete a map
[**extractTopKFromMap**](MapsApi.md#extractTopKFromMap) | **POST** /core/v1/maps/x-map-name/extractTopK | Extract the top K elements from a map
[**setMapEntry**](MapsApi.md#setMapEntry) | **PUT** /core/v1/maps/x-map-name/entries/x-map-key | Set an entry in the map to a specific value

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

Create a graph-bound or session-bound map

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

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.MapsApi();
let body = new OracleLabsParallelGraphAnalyticsPgxRestApi.CreateMapRequest(); // CreateMapRequest | Holds the properties of a create map request.
let SID = "SID_example"; // String | session ID

apiInstance.createMap(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** | [**CreateMapRequest**](CreateMapRequest.md)| Holds the properties of a create map request. | 
 **SID** | **String**| session ID | 

### Return type

[**MapInfo**](MapInfo.md)

### Authorization

No authorization required

### HTTP request headers

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

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

Delete a map

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

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **SID** | **String**| session ID | 
 **xMapName** | **String**| Name of the map. | 
 **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="extractTopKFromMap"></a>
# **extractTopKFromMap**
> extractTopKFromMap(body, SID, xMapName)

Extract the top K elements from a map

This will sort the elements of the map and return the elements which the highest value.

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

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.MapsApi();
let body = new OracleLabsParallelGraphAnalyticsPgxRestApi.ExtractTopKRequest(); // ExtractTopKRequest | Holds the parameter to extract the top most elements of a collection.
let SID = "SID_example"; // String | session ID
let xMapName = "xMapName_example"; // String | Name of the map.

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**ExtractTopKRequest**](ExtractTopKRequest.md)| Holds the parameter to extract the top most elements of a collection. | 
 **SID** | **String**| session ID | 
 **xMapName** | **String**| Name of the map. | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

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

<a name="setMapEntry"></a>
# **setMapEntry**
> setMapEntry(body, SID, xMapName, xMapKey)

Set an entry in the map to a specific value

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

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.MapsApi();
let body = new OracleLabsParallelGraphAnalyticsPgxRestApi.TypedMapEntry(); // TypedMapEntry | Specifies the entry that should be changed.
let SID = "SID_example"; // String | session ID
let xMapName = "xMapName_example"; // String | Name of the map.
let xMapKey = "xMapKey_example"; // String | Json serialized object representing the key

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**TypedMapEntry**](TypedMapEntry.md)| Specifies the entry that should be changed. | 
 **SID** | **String**| session ID | 
 **xMapName** | **String**| Name of the map. | 
 **xMapKey** | **String**| Json serialized object representing the key | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

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

