Create a decision model variant
POST /v2/decisionModelDefinitions/<decisionModelRef>/variants
Creates a variant of a decision model.
|
Attribute |
Type |
Description |
Example |
|---|---|---|---|
|
|
string |
The reference of the decision model. If you do not know the decision model reference, first retrieve decision models. |
|
At a minimum, you must provide the following required attributes in the request body:
|
Attribute |
Type |
Description |
Example |
|---|---|---|---|
|
|
string |
The name of the decision model. |
|
|
|
string |
The definition of the decision model variant that belongs to the decision canvas. |
|
curl -X POST '<baseURL>/v2/decisionModelDefinitions/865ce079-6012-4f97-bc46-07215691a178/variants' \ -H 'Authorization: Bearer <accessToken>' \ -H 'Accept: application/json' \ --data-raw ' { "name":"Determine Ancillary Upsell Variant 2", "definition":"<definitions xmlns=\"http://www.omg.org/spec/DMN/20151101/dmn.xsd\" id=\"definitions\" name=\"definitions\" namespace=\"http://camunda.org/schema/1.0/dmn\" />" }'
{ "clientKey":"pqsPERS3lw12v5a9rrHPW1c4hET73GxQ", "href":"<baseURL>/v2/decisionModelVariants/4ee0797d-e229-492d-883e-1344787002b4", "ref":"4ee0797d-e229-492d-883e-1344787002b4", "name":"Determine Ancillary Upsell Variant 2", "modifiedByUserRef":"25f46901-bc51-45e8-b587-148aecf1e48f", "modifiedAt":"2020-10-05T07:37:49.650Z", "revision":1, "archived":false, "decisionModelDefinitionRef":"865ce079-6012-4f97-bc46-07215691a178", "definition":"<definitions xmlns=\"http://www.omg.org/spec/DMN/20151101/dmn.xsd\" id=\"definitions\" name=\"definitions\" namespace=\"http://camunda.org/schema/1.0/dmn\" />", "transpiledDefinition":"<definitions xmlns=\"http://www.omg.org/spec/DMN/20151101/dmn.xsd\" id=\"definitions\" name=\"definitions\" namespace=\"http://camunda.org/schema/1.0/dmn\" />", "revisions":{ "href":"<baseURL>/v2/decisionModelVariants/4ee0797d-e229-492d-883e-1344787002b4/revisions" }, "offers":[] }