Skip to content
ScenarioConfigurationApi.md 6.62 KiB
Newer Older
Michel Roy's avatar
Michel Roy committed
# AdvantEdgePlatformControllerRestApi.ScenarioConfigurationApi
All URIs are relative to *https://localhost/platform-ctrl/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
Michel Roy's avatar
Michel Roy committed
[**createScenario**](ScenarioConfigurationApi.md#createScenario) | **POST** /scenarios/{name} | Add a scenario
[**deleteScenario**](ScenarioConfigurationApi.md#deleteScenario) | **DELETE** /scenarios/{name} | Delete a scenario
[**deleteScenarioList**](ScenarioConfigurationApi.md#deleteScenarioList) | **DELETE** /scenarios | Delete all scenarios
[**getScenario**](ScenarioConfigurationApi.md#getScenario) | **GET** /scenarios/{name} | Get a specific scenario
[**getScenarioList**](ScenarioConfigurationApi.md#getScenarioList) | **GET** /scenarios | Get all scenarios
[**setScenario**](ScenarioConfigurationApi.md#setScenario) | **PUT** /scenarios/{name} | Update a scenario


<a name="createScenario"></a>
# **createScenario**
> createScenario(name, scenario)

Michel Roy's avatar
Michel Roy committed
Add a scenario
Michel Roy's avatar
Michel Roy committed
Add a scenario to the platform scenario store

### Example
```javascript
Michel Roy's avatar
Michel Roy committed
var AdvantEdgePlatformControllerRestApi = require('advant_edge_platform_controller_rest_api');
Michel Roy's avatar
Michel Roy committed
var apiInstance = new AdvantEdgePlatformControllerRestApi.ScenarioConfigurationApi();

var name = "name_example"; // String | Scenario name

Simon Pastor's avatar
Simon Pastor committed
var scenario = new AdvantEdgePlatformControllerRestApi.Scenario(); // Scenario | Scenario


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.createScenario(name, scenario, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **name** | **String**| Scenario name | 
Simon Pastor's avatar
Simon Pastor committed
 **scenario** | [**Scenario**](Scenario.md)| Scenario | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

Michel Roy's avatar
Michel Roy committed
 - **Content-Type**: application/json
 - **Accept**: application/json

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

Michel Roy's avatar
Michel Roy committed
Delete a scenario
Michel Roy's avatar
Michel Roy committed
Delete a scenario by name from the platform scenario store

### Example
```javascript
Michel Roy's avatar
Michel Roy committed
var AdvantEdgePlatformControllerRestApi = require('advant_edge_platform_controller_rest_api');
Michel Roy's avatar
Michel Roy committed
var apiInstance = new AdvantEdgePlatformControllerRestApi.ScenarioConfigurationApi();

var name = "name_example"; // String | Scenario name


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteScenario(name, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **name** | **String**| Scenario name | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

Michel Roy's avatar
Michel Roy committed
 - **Content-Type**: application/json
 - **Accept**: application/json

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

Michel Roy's avatar
Michel Roy committed
Delete all scenarios
Michel Roy's avatar
Michel Roy committed
Delete all scenarios present in the platform scenario store

### Example
```javascript
Michel Roy's avatar
Michel Roy committed
var AdvantEdgePlatformControllerRestApi = require('advant_edge_platform_controller_rest_api');
Michel Roy's avatar
Michel Roy committed
var apiInstance = new AdvantEdgePlatformControllerRestApi.ScenarioConfigurationApi();

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteScenarioList(callback);
```

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

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

Michel Roy's avatar
Michel Roy committed
 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="getScenario"></a>
# **getScenario**
> Scenario getScenario(name)

Michel Roy's avatar
Michel Roy committed
Get a specific scenario
Michel Roy's avatar
Michel Roy committed
Get a scenario by name from the platform scenario store

### Example
```javascript
Michel Roy's avatar
Michel Roy committed
var AdvantEdgePlatformControllerRestApi = require('advant_edge_platform_controller_rest_api');
Michel Roy's avatar
Michel Roy committed
var apiInstance = new AdvantEdgePlatformControllerRestApi.ScenarioConfigurationApi();

var name = "name_example"; // String | Scenario name


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getScenario(name, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **name** | **String**| Scenario name | 

### Return type

[**Scenario**](Scenario.md)

### Authorization

No authorization required

### HTTP request headers

Michel Roy's avatar
Michel Roy committed
 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="getScenarioList"></a>
# **getScenarioList**
> ScenarioList getScenarioList()

Michel Roy's avatar
Michel Roy committed
Get all scenarios
Michel Roy's avatar
Michel Roy committed
Returns all scenarios from the platform scenario store

### Example
```javascript
Michel Roy's avatar
Michel Roy committed
var AdvantEdgePlatformControllerRestApi = require('advant_edge_platform_controller_rest_api');
Michel Roy's avatar
Michel Roy committed
var apiInstance = new AdvantEdgePlatformControllerRestApi.ScenarioConfigurationApi();

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getScenarioList(callback);
```

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

### Return type

[**ScenarioList**](ScenarioList.md)

### Authorization

No authorization required

### HTTP request headers

Michel Roy's avatar
Michel Roy committed
 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="setScenario"></a>
# **setScenario**
> setScenario(name, scenario)

Michel Roy's avatar
Michel Roy committed
Update a scenario
Michel Roy's avatar
Michel Roy committed
Update a scenario by name in the platform scenario store

### Example
```javascript
Michel Roy's avatar
Michel Roy committed
var AdvantEdgePlatformControllerRestApi = require('advant_edge_platform_controller_rest_api');
Michel Roy's avatar
Michel Roy committed
var apiInstance = new AdvantEdgePlatformControllerRestApi.ScenarioConfigurationApi();

var name = "name_example"; // String | Scenario name

Michel Roy's avatar
Michel Roy committed
var scenario = new AdvantEdgePlatformControllerRestApi.Scenario(); // Scenario | Scenario to add to MEEP store


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.setScenario(name, scenario, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **name** | **String**| Scenario name | 
 **scenario** | [**Scenario**](Scenario.md)| Scenario to add to MEEP store | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

Michel Roy's avatar
Michel Roy committed
 - **Content-Type**: application/json
 - **Accept**: application/json