Table of Contents

ParameterApi

Method Description
ClearParameters Clear parameters and links for the connection connectionId in the project projectId
EvaluateExpression Evaluate the expression and return the result
GetParameters Get all parameters which are defined for projectId and connectionId
UpdateParameters Update parameters for the connection connectionId in the project projectId by values passed in parameters

ClearParameters

void ClearParameters (Guid projectId, int connectionId)

Clear parameters and links for the connection connectionId in the project projectId

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service
connectionId int Id of the connection where to clear the parameters

Return type

void (empty response body)

Example

Note: this example is autogenerated.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.ConnectionApi.Api;
using IdeaStatiCa.ConnectionApi.Client;
using IdeaStatiCa.ConnectionApi.Model;

namespace Example
{
    public class ClearParametersExample
    {
        public static void Main()
        {
            // Create the client which is connected to the service.
            ConnectionApiClientFactory clientFactory = new ConnectionApiClientFactory("http://localhost:5000");
            using (var conClient = await clientFactory.CreateConnectionApiClient())
            {
                var project = await conClient.Project.Open("myProject.ideaCon"); //Open a project
                Guid projectId = project.ProjectId; //Get projectId Guid
                
                connectionId = 56;  // int | Id of the connection where to clear the parameters

                try
                {
                    // Clear parameters and links for the connection connectionId in the project projectId
                    conClient.Parameter.ClearParameters(projectId, connectionId);
                }
                catch (ApiException  e)
                {
                    Console.WriteLine("Exception when calling Parameter.ClearParameters: " + e.Message);
                    Console.WriteLine("Status Code: " + e.ErrorCode);
                    Console.WriteLine(e.StackTrace);
                }
                finally
                {
                    await conClient.Project.CloseProjectAsync(projectId);
                }
            }
        }
    }
}

Code Samples

Warning

It looks like the sample you are looking for does not exist.

Looking for a code sample? request some help on our discussion page.

REST Usage

Http Request

All URIs are relative to http://localhost

POST /api/1/projects/{projectId}/connections/{connectionId}/clear-parameters

Using the ClearParametersWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Clear parameters and links for the connection connectionId in the project projectId
    conClient.Parameter.ClearParametersWithHttpInfo(projectId, connectionId);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling ParameterApi.ClearParametersWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Success -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

EvaluateExpression

string EvaluateExpression (Guid projectId, int connectionId, string body = null)

Evaluate the expression and return the result

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service
connectionId int Id of the connection to use for evaluation expression
body string Expression to evaluate [optional]

Return type

string

Example

Note: this example is autogenerated.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.ConnectionApi.Api;
using IdeaStatiCa.ConnectionApi.Client;
using IdeaStatiCa.ConnectionApi.Model;

namespace Example
{
    public class EvaluateExpressionExample
    {
        public static void Main()
        {
            // Create the client which is connected to the service.
            ConnectionApiClientFactory clientFactory = new ConnectionApiClientFactory("http://localhost:5000");
            using (var conClient = await clientFactory.CreateConnectionApiClient())
            {
                var project = await conClient.Project.Open("myProject.ideaCon"); //Open a project
                Guid projectId = project.ProjectId; //Get projectId Guid
                
                connectionId = 56;  // int | Id of the connection to use for evaluation expression
                body = "body_example";  // string | Expression to evaluate (optional) 

                try
                {
                    // Evaluate the expression and return the result
                    string result = conClient.Parameter.EvaluateExpression(projectId, connectionId, body);
                    Debug.WriteLine(result);
                }
                catch (ApiException  e)
                {
                    Console.WriteLine("Exception when calling Parameter.EvaluateExpression: " + e.Message);
                    Console.WriteLine("Status Code: " + e.ErrorCode);
                    Console.WriteLine(e.StackTrace);
                }
                finally
                {
                    await conClient.Project.CloseProjectAsync(projectId);
                }
            }
        }
    }
}

Code Samples

Warning

It looks like the sample you are looking for does not exist.

Looking for a code sample? request some help on our discussion page.

REST Usage

Http Request

All URIs are relative to http://localhost

POST /api/1/projects/{projectId}/connections/{connectionId}/evaluate-expression

Using the EvaluateExpressionWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Evaluate the expression and return the result
    ApiResponse<string> response = conClient.Parameter.EvaluateExpressionWithHttpInfo(projectId, connectionId, body);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling ParameterApi.EvaluateExpressionWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Success -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetParameters

List<IdeaParameter> GetParameters (Guid projectId, int connectionId, bool? includeHidden = null)

Get all parameters which are defined for projectId and connectionId

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service
connectionId int Id of the connection to get its parameters
includeHidden bool? Include also hidden parameters [optional] [default to false]

Return type

List<IdeaParameter>

Example

Note: this example is autogenerated.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.ConnectionApi.Api;
using IdeaStatiCa.ConnectionApi.Client;
using IdeaStatiCa.ConnectionApi.Model;

namespace Example
{
    public class GetParametersExample
    {
        public static void Main()
        {
            // Create the client which is connected to the service.
            ConnectionApiClientFactory clientFactory = new ConnectionApiClientFactory("http://localhost:5000");
            using (var conClient = await clientFactory.CreateConnectionApiClient())
            {
                var project = await conClient.Project.Open("myProject.ideaCon"); //Open a project
                Guid projectId = project.ProjectId; //Get projectId Guid
                
                connectionId = 56;  // int | Id of the connection to get its parameters
                includeHidden = false;  // bool? | Include also hidden parameters (optional)  (default to false)

                try
                {
                    // Get all parameters which are defined for projectId and connectionId
                    List<IdeaParameter> result = conClient.Parameter.GetParameters(projectId, connectionId, includeHidden);
                    Debug.WriteLine(result);
                }
                catch (ApiException  e)
                {
                    Console.WriteLine("Exception when calling Parameter.GetParameters: " + e.Message);
                    Console.WriteLine("Status Code: " + e.ErrorCode);
                    Console.WriteLine(e.StackTrace);
                }
                finally
                {
                    await conClient.Project.CloseProjectAsync(projectId);
                }
            }
        }
    }
}

Code Samples

Warning

It looks like the sample you are looking for does not exist.

Looking for a code sample? request some help on our discussion page.

REST Usage

Http Request

All URIs are relative to http://localhost

GET /api/1/projects/{projectId}/connections/{connectionId}/parameters

Using the GetParametersWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Get all parameters which are defined for projectId and connectionId
    ApiResponse<List<IdeaParameter>> response = conClient.Parameter.GetParametersWithHttpInfo(projectId, connectionId, includeHidden);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling ParameterApi.GetParametersWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Success -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateParameters

List<IdeaParameter> UpdateParameters (Guid projectId, int connectionId, List ideaParameterUpdate = null)

Update parameters for the connection connectionId in the project projectId by values passed in parameters

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service
connectionId int Id of the connection to apply template
ideaParameterUpdate List<IdeaParameterUpdate> New values of parameters [optional]

Return type

List<IdeaParameter>

Example

Note: this example is autogenerated.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.ConnectionApi.Api;
using IdeaStatiCa.ConnectionApi.Client;
using IdeaStatiCa.ConnectionApi.Model;

namespace Example
{
    public class UpdateParametersExample
    {
        public static void Main()
        {
            // Create the client which is connected to the service.
            ConnectionApiClientFactory clientFactory = new ConnectionApiClientFactory("http://localhost:5000");
            using (var conClient = await clientFactory.CreateConnectionApiClient())
            {
                var project = await conClient.Project.Open("myProject.ideaCon"); //Open a project
                Guid projectId = project.ProjectId; //Get projectId Guid
                
                connectionId = 56;  // int | Id of the connection to apply template
                var ideaParameterUpdate = new List<IdeaParameterUpdate>(); // List<IdeaParameterUpdate> | New values of parameters (optional) 

                try
                {
                    // Update parameters for the connection connectionId in the project projectId by values passed in parameters
                    List<IdeaParameter> result = conClient.Parameter.UpdateParameters(projectId, connectionId, ideaParameterUpdate);
                    Debug.WriteLine(result);
                }
                catch (ApiException  e)
                {
                    Console.WriteLine("Exception when calling Parameter.UpdateParameters: " + e.Message);
                    Console.WriteLine("Status Code: " + e.ErrorCode);
                    Console.WriteLine(e.StackTrace);
                }
                finally
                {
                    await conClient.Project.CloseProjectAsync(projectId);
                }
            }
        }
    }
}

Code Samples

using IdeaStatiCa.Api.Connection.Model;
using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Modify a given connections parameters.
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task UpdateParameters(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/User_testing_end_v23_1.ideaCon";
            ConProject conProject = await conClient.Project.OpenProjectAsync(filePath);

            var connections = await conClient.Connection.GetConnectionsAsync(conClient.ActiveProjectId);
            int connectionId = connections[0].Id;

            //Get only visible parameters that we would expect to update.
            List<IdeaParameter> parametersVisible = await conClient.Parameter.GetParametersAsync(conClient.ActiveProjectId, connectionId, false);

            //You can get all the parameters using this call.
            List<IdeaParameter> parametersAll = await conClient.Parameter.GetParametersAsync(conClient.ActiveProjectId, connectionId, true);

            //Update parameters
            List<IdeaParameterUpdate> updates = new List<IdeaParameterUpdate>();

            foreach (var visibleParam in parametersVisible)
            {
                if (visibleParam.Key == "NoCols")
                {
                    Console.WriteLine("Current No of Bolt Rows: "+visibleParam.Value);
                    Console.WriteLine("Please Select the Number of Bolt Rows");
                    string noOfBolts = Console.ReadLine();
                    updates.Add(new IdeaParameterUpdate() { Key = visibleParam.Key, Expression = noOfBolts });
                }
            }

            List<IdeaParameter> parameters = await conClient.Parameter.UpdateParametersAsync(conClient.ActiveProjectId, connectionId, updates);

            string exampleFolder = GetExampleFolderPathOnDesktop("UpdateParameters");
            string fileName = "User_testing_end_v23_1_updated.ideaCon";
            string saveFilePath = Path.Combine(exampleFolder, fileName);

            //Save the applied template
            await conClient.Project.SaveProjectAsync(conClient.ActiveProjectId, saveFilePath);
            Console.WriteLine("Project saved to: " + saveFilePath);

            //Close the opened project.
            await conClient.Project.CloseProjectAsync(conClient.ActiveProjectId);
        }
    }
}

Looking for a code sample? request some help on our discussion page.

REST Usage

Http Request

All URIs are relative to http://localhost

PUT /api/1/projects/{projectId}/connections/{connectionId}/parameters

Using the UpdateParametersWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Update parameters for the connection connectionId in the project projectId by values passed in parameters
    ApiResponse<List<IdeaParameter>> response = conClient.Parameter.UpdateParametersWithHttpInfo(projectId, connectionId, ideaParameterUpdate);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling ParameterApi.UpdateParametersWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Success -

[Back to top] [Back to API list] [Back to Model list] [Back to README]