SettingsApi
| Method | Description |
|---|---|
| GetSettingsAsync | Gets setting values for the project. |
| UpdateSettingsAsync | Updates one or multiple setting values in the project. |
GetSettingsAsync
Dictionary<string, Object> GetSettingsAsync (Guid projectId, string search = null)
Gets setting values for the project.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | The unique identifier of the project. | |
| search | string | Optional parameter to search for keywords in settings. | [optional] |
Return type
Dictionary<string, Object>
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 GetSettingsAsyncExample
{
public static async Task Main()
{
string ideaConFile = "testCon.ideaCon";
string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 25.1"; // Path to the IdeaStatiCa.ConnectionRestApi.exe
using (var clientFactory = new ConnectionApiServiceRunner(ideaStatiCaPath))
{
using (var conClient = await clientFactory.CreateApiClient())
{
// Open the project and get its id
var projData = await conClient.Project.OpenProjectAsync(ideaConFile);
Guid projectId = projData.ProjectId;
// (Required) Select parameters
search = "search_example"; // string | Optional parameter to search for keywords in settings. (optional)
try
{
// Gets setting values for the project.
Dictionary<string, Object> result = await conClient.Settings.GetSettingsAsync(projectId, search);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling Settings.GetSettingsAsync: " + e.Message);
Console.WriteLine("Status Code: " + e.ErrorCode);
Console.WriteLine(e.StackTrace);
}
finally
{
await conClient.Project.CloseProjectAsync(projectId);
}
}
}
}
}
}
Code Samples
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/3/projects/{projectId}/settings
Using the GetSettingsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Gets setting values for the project.
ApiResponse<Dictionary<string, Object>> response = conClient.Settings.GetSettingsWithHttpInfo(projectId, search);
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 SettingsApi.GetSettingsWithHttpInfo: " + 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 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateSettingsAsync
Dictionary<string, Object> UpdateSettingsAsync (Guid projectId, Dictionary<string, Object> requestBody = null)
Updates one or multiple setting values in the project.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | The unique identifier of the project. | |
| requestBody | Dictionary<string, Object> | Dictionary of key-value pairs representing settings to update. | [optional] |
Return type
Dictionary<string, Object>
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 UpdateSettingsAsyncExample
{
public static async Task Main()
{
string ideaConFile = "testCon.ideaCon";
string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 25.1"; // Path to the IdeaStatiCa.ConnectionRestApi.exe
using (var clientFactory = new ConnectionApiServiceRunner(ideaStatiCaPath))
{
using (var conClient = await clientFactory.CreateApiClient())
{
// Open the project and get its id
var projData = await conClient.Project.OpenProjectAsync(ideaConFile);
Guid projectId = projData.ProjectId;
// (Required) Select parameters
var requestBody = new Dictionary<string, Object>(); // Dictionary<string, Object> | Dictionary of key-value pairs representing settings to update. (optional)
try
{
// Updates one or multiple setting values in the project.
Dictionary<string, Object> result = await conClient.Settings.UpdateSettingsAsync(projectId, requestBody);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling Settings.UpdateSettingsAsync: " + e.Message);
Console.WriteLine("Status Code: " + e.ErrorCode);
Console.WriteLine(e.StackTrace);
}
finally
{
await conClient.Project.CloseProjectAsync(projectId);
}
}
}
}
}
}
Code Samples
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
PUT /api/3/projects/{projectId}/settings
Using the UpdateSettingsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Updates one or multiple setting values in the project.
ApiResponse<Dictionary<string, Object>> response = conClient.Settings.UpdateSettingsWithHttpInfo(projectId, requestBody);
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 SettingsApi.UpdateSettingsWithHttpInfo: " + 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 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]