CalculationJobsApi
| Method | Description |
|---|---|
| CancelCalculationJobAsync | Requests cancellation of an asynchronous calculation job: the in-flight solver process is killed and remaining connections are skipped. Connections whose solve was interrupted stay not-calculated; already completed connections keep their results. Idempotent — cancelling a finished job leaves it unchanged. |
| GetCalculationJobAsync | Gets the current state of an asynchronous calculation job: its status, the connection currently being calculated with its per-load-case solver progress, and — once finished — the result summaries. |
| StartCalculationAsync | Starts an asynchronous CBFEM calculation job for the given connections. |
| StartConnectionCalculationAsync | Starts an asynchronous CBFEM calculation job for a single connection. |
CancelCalculationJobAsync
ConCalculationJob CancelCalculationJobAsync (Guid projectId, Guid jobId)
Requests cancellation of an asynchronous calculation job: the in-flight solver process is killed and remaining connections are skipped. Connections whose solve was interrupted stay not-calculated; already completed connections keep their results. Idempotent — cancelling a finished job leaves it unchanged.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | The unique identifier of the opened project in the ConnectionRestApi service. | |
| jobId | Guid | The id of the job returned by the calculate-async endpoints. |
Return type
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 CancelCalculationJobAsyncExample
{
public static async Task Main()
{
string ideaConFile = "testCon.ideaCon";
string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 26.0"; // 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
try
{
// Requests cancellation of an asynchronous calculation job: the in-flight solver process is killed and remaining connections are skipped. Connections whose solve was interrupted stay not-calculated; already completed connections keep their results. Idempotent — cancelling a finished job leaves it unchanged.
ConCalculationJob result = await conClient.CalculationJobs.CancelCalculationJobAsync(projectId, jobId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling CalculationJobs.CancelCalculationJobAsync: " + 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
DELETE /api/5/projects/{projectId}/calculation-jobs/{jobId}
Using the CancelCalculationJobWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Requests cancellation of an asynchronous calculation job: the in-flight solver process is killed and remaining connections are skipped. Connections whose solve was interrupted stay not-calculated; already completed connections keep their results. Idempotent — cancelling a finished job leaves it unchanged.
ApiResponse<ConCalculationJob> response = conClient.CalculationJobs.CancelCalculationJobWithHttpInfo(projectId, jobId);
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 CalculationJobsApi.CancelCalculationJobWithHttpInfo: " + 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 |
|---|---|---|
| 202 | Accepted | - |
| 401 | Unauthorized | - |
| 404 | Not Found | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetCalculationJobAsync
ConCalculationJob GetCalculationJobAsync (Guid projectId, Guid jobId)
Gets the current state of an asynchronous calculation job: its status, the connection currently being calculated with its per-load-case solver progress, and — once finished — the result summaries.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | The unique identifier of the opened project in the ConnectionRestApi service. | |
| jobId | Guid | The id of the job returned by the calculate-async endpoints. |
Return type
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 GetCalculationJobAsyncExample
{
public static async Task Main()
{
string ideaConFile = "testCon.ideaCon";
string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 26.0"; // 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
try
{
// Gets the current state of an asynchronous calculation job: its status, the connection currently being calculated with its per-load-case solver progress, and — once finished — the result summaries.
ConCalculationJob result = await conClient.CalculationJobs.GetCalculationJobAsync(projectId, jobId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling CalculationJobs.GetCalculationJobAsync: " + 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/5/projects/{projectId}/calculation-jobs/{jobId}
Using the GetCalculationJobWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Gets the current state of an asynchronous calculation job: its status, the connection currently being calculated with its per-load-case solver progress, and — once finished — the result summaries.
ApiResponse<ConCalculationJob> response = conClient.CalculationJobs.GetCalculationJobWithHttpInfo(projectId, jobId);
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 CalculationJobsApi.GetCalculationJobWithHttpInfo: " + 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 | - |
| 401 | Unauthorized | - |
| 404 | Not Found | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StartCalculationAsync
ConCalculationJob StartCalculationAsync (Guid projectId, List
requestBody)
Starts an asynchronous CBFEM calculation job for the given connections.
Returns 202 with the accepted job immediately; poll it with the calculation-jobs GET endpoint and cancel it with DELETE. At most one job can be active per project (409 otherwise). Connection ids are validated upfront — an unknown id rejects the start with 404 before any job is registered. Like the synchronous bulk calculate, a connection that fails to calculate produces a failed summary row in the job's results rather than failing the job.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | The unique identifier of the opened project in the ConnectionRestApi service. | |
| requestBody | List<int> | List of connection IDs to calculate. |
Return type
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 StartCalculationAsyncExample
{
public static async Task Main()
{
string ideaConFile = "testCon.ideaCon";
string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 26.0"; // 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 List<int>(); // List<int> | List of connection IDs to calculate.
try
{
// Starts an asynchronous CBFEM calculation job for the given connections.
ConCalculationJob result = await conClient.CalculationJobs.StartCalculationAsync(projectId, requestBody);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling CalculationJobs.StartCalculationAsync: " + 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
POST /api/5/projects/{projectId}/connections/calculate-async
Using the StartCalculationWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Starts an asynchronous CBFEM calculation job for the given connections.
ApiResponse<ConCalculationJob> response = conClient.CalculationJobs.StartCalculationWithHttpInfo(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 CalculationJobsApi.StartCalculationWithHttpInfo: " + 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 |
|---|---|---|
| 202 | Accepted | - |
| 401 | Unauthorized | - |
| 404 | Not Found | - |
| 409 | Conflict | - |
| 422 | Unprocessable Content | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StartConnectionCalculationAsync
ConCalculationJob StartConnectionCalculationAsync (Guid projectId, int connectionId, List
loadEffectIds = null)
Starts an asynchronous CBFEM calculation job for a single connection.
Returns 202 with the accepted job immediately; poll it with the calculation-jobs GET endpoint and cancel it with DELETE. At most one job can be active per project (409 otherwise).
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | The unique identifier of the opened project in the ConnectionRestApi service. | |
| connectionId | int | The ID of the connection to calculate. | |
| loadEffectIds | List<int> | Optional subset of load-effect ids of this connection to solve. When set, exactly these load effects are analysed - their Active flags are ignored and nothing is persisted; results - including subsequent results, raw-results, result-mesh and report reads - reflect only this subset until the next calculation. When omitted, all active load effects are solved; an empty list is treated as omitted. Unknown ids are rejected with 422. | [optional] |
Return type
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 StartConnectionCalculationAsyncExample
{
public static async Task Main()
{
string ideaConFile = "testCon.ideaCon";
string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 26.0"; // 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
connectionId = 56; // int | The ID of the connection to calculate.
var loadEffectIds = new List<int>(); // List<int> | Optional subset of load-effect ids of this connection to solve. When set, exactly these load effects are analysed - their Active flags are ignored and nothing is persisted; results - including subsequent results, raw-results, result-mesh and report reads - reflect only this subset until the next calculation. When omitted, all active load effects are solved; an empty list is treated as omitted. Unknown ids are rejected with 422. (optional)
try
{
// Starts an asynchronous CBFEM calculation job for a single connection.
ConCalculationJob result = await conClient.CalculationJobs.StartConnectionCalculationAsync(projectId, connectionId, loadEffectIds);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling CalculationJobs.StartConnectionCalculationAsync: " + 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
POST /api/5/projects/{projectId}/connections/{connectionId}/calculate-async
Using the StartConnectionCalculationWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Starts an asynchronous CBFEM calculation job for a single connection.
ApiResponse<ConCalculationJob> response = conClient.CalculationJobs.StartConnectionCalculationWithHttpInfo(projectId, connectionId, loadEffectIds);
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 CalculationJobsApi.StartConnectionCalculationWithHttpInfo: " + 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 |
|---|---|---|
| 202 | Accepted | - |
| 401 | Unauthorized | - |
| 404 | Not Found | - |
| 409 | Conflict | - |
| 422 | Unprocessable Content | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]