Skip to content

OMD Optimizer External Preview Launch

Use this API when an external application should open OMD Optimizer with a preselected set of resources and days, execute a specific algorithm automatically, and present the result for commit/rollback review.

Overview

This integration has two steps:

  1. Create a one-time launch token and URL via POST /api/external-preview/launch.
  2. Open the returned launchUrl in the browser.

The browser-based OMD Optimizer frontend consumes the one-time token and performs:

  • loading the requested trips from OMD Go
  • selecting algorithm and parameter overrides
  • optional auto-run of the optimization
  • opening a preview-focused layout

Request

Request
Description Creates a one-time launch URL for OMD Optimizer external preview workflow.
Context https://<instance>.optimizemyday.com/omd-opt
URL /api/external-preview/launch
Method POST
Request Type JSON
Response Code 200 when successful, another HTTP status code otherwise
Response Type JSON

Request Body Fields

Field Datatype Required Description
requests Array No* Explicit resource/date pairs.
requests[].resourceId String Yes (if requests used) External resource id.
requests[].dateFrom Date (yyyy-MM-dd) Yes (if requests used) Start date (inclusive).
requests[].dateTo Date (yyyy-MM-dd) Yes (if requests used) End date (inclusive).
resourceIds Array[String] No* Alternative compact input format.
dateFrom Date (yyyy-MM-dd) No* Start date for all resourceIds.
dateTo Date (yyyy-MM-dd) No* End date for all resourceIds.
algorithm String Yes Algorithm key supported by OMD Optimizer (/api/algorithms).
params Object No Algorithm parameter overrides.
autoRun Boolean No Automatically start optimization after loading trips. Default: true.
hideDrawer Boolean No Hide left drawer for preview-focused layout. Default: true.
showConsole Boolean No Show console pane in preview mode. Default: false.
title String No Browser title and run report title. Default: OMD Go Preview.
tenantId String No Tenant to apply before loading trips.
configurationId Integer No Configuration to apply before loading trips.

* Provide either requests or resourceIds + dateFrom + dateTo.

Sample Request

{
  "requests": [
    {
      "resourceId": "DE-HD2-DE2-1604",
      "dateFrom": "2025-12-03",
      "dateTo": "2025-12-03"
    }
  ],
  "algorithm": "tsptw",
  "params": {},
  "autoRun": true,
  "hideDrawer": true,
  "showConsole": false,
  "title": "OMD Go Preview",
  "tenantId": "cws",
  "configurationId": 16169276
}

Sample Success Response

{
  "launchId": "Tp9WlVRGwhnJ0ia18QzWHoMn",
  "launchUrl": "https://{instance}.optimizemyday.com/omd-opt/?external_preview_launch=Tp9WlVRGwhnJ0ia18QzWHoMn&external_preview_mode=1",
  "ttlSeconds": 900
}

Browser Step

Open launchUrl in a new tab.

Important:

  • The launch token is one-time.
  • Token expires after ttlSeconds.
  • For each new browser launch, request a new token.