Create Template From Optimization
Create a project optimization template from an existing optimization.
Copies the optimization’s saved config into the new template’s
initial_form_data (both follow the same schema), so the client no longer
re-maps the config through the optimization form to save a template.
Parameters
body : FromOptimizationRequest The source optimization id plus the new template’s name/description.
Returns
OptimizationTemplate The created project-level template.
Raises
NotFoundError If the optimization does not exist. BadRequestError If the name is blank or the optimization has no valid saved configuration to turn into a template. ConflictError If a template with the same name already exists in the project.
Body
Response
Successful Response
Model representing an optimization template as returned by the API.
The name of the optimization template.
The unique identifier for the template.
The ID of the organization this template belongs to.
Timestamp of when the template was created.
Timestamp of when the template was last updated.
An optional description for the template.
Initial form data values.
The ID of the owner project (None for system templates).
Template scope: 'system' for built-in, 'project' for user-created.