optimization_templates

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.

post/optimization_templates/from-optimization

Request body

optimization_idstring required
namestring required
descriptionstring nullable

Response

Successful Response

namestring required

The name of the optimization template.

descriptionstring nullable

An optional description for the template.

initial_form_dataobject nullable

Initial form data values.

idstring required

The unique identifier for the template.

organization_idstring required

The ID of the organization this template belongs to.

project_idstring nullable

The ID of the owner project (None for system templates).

access_levelstring

Template scope: 'system' for built-in, 'project' for user-created.

created_atstring date-time required

Timestamp of when the template was created.

updated_atstring date-time required

Timestamp of when the template was last updated.

created_bystring nullable

User ID of the creator.

Changes

No recorded changes to this endpoint across all 1 revision of this API.