Purpose: Check whether an intelliDivide optimization is still running, has finished, or has solutions available.
Prerequisites: intelliDivide with the Connect interface, IntelliDivideClient configured, and the optimizationId of a created optimization.
Code
var optimizationId = Guid.Parse("a1b2c3d4-e5f6-7890-abcd-ef1234567890");
var status = await client.GetOptimizationStatus(optimizationId);
Console.WriteLine(status);
GET https://connect.homag.cloud/api/intelliDivide/optimizations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/state
Authorization: Basic <base64(SubscriptionId:Berechtigungsschlüssel)>
Accept: application/json
200 OK:
"Optimized"
This call reads the status once. For Queued or Started, you can check again at longer intervals, with a fixed time limit. For Optimized, you can list the solutions. For Faulted or Canceled, stop polling.
Contracts used
| Contract | Usage |
|---|---|
OptimizationStatus |
Output: status as a JSON string, as an enum in the SDK. |
Common errors
| REST status | What to check |
|---|---|
400 Bad Request |
optimizationId must be a valid UUID. |
401 Unauthorized |
Check the SubscriptionId, authorization key, and app access. |
Next: Start and monitor an optimization · View and test endpoint
