Use the retrieve decision model variant revisions function in Sitecore CDP REST API

Abstract

How to retrieve decision model variant revisions in Sitecore CDP (Data model 2.1).

You can use the Decision Model Variant REST API to perform the retrieve decision model variant revisions function to return decision model variant revisions. To do this, you must have the decisionModelVariantRef attribute returned when retrieving the decision model variant reference.

To retrieve decision model variant revisions in Sitecore CDP, use the following:

GET: https://apiEndpoint/v2/decisionModelVariants/decisionModelVariantRef/revisions

Attribute

Description

Type

decisionModelVariantRef

The reference of the decision model variant.

string

$ curl -H "Accept: application/json" \
"https://{apiEndpoint}/v2/decisionModelVariants/4ee0797d-e229-492d-883e-1344787002b4/revisions" 

The following is a 200 response:

{  
   "href":"https://{apiEndpoint}/v2/decisionModelVariants/4ee0797d-e229-492d-883e-1344787002b4/revisions",
   "items":[  
      {  
         "clientKey":"pqsPERS3lw12v5a9rrHPW1c4hET73GxQ",
         "href":"https://{apiEndpoint}/v2/decisionModelVariants/4ee0797d-e229-492d-883e-1344787002b4/revisions/1",
         "ref":"4ee0797d-e229-492d-883e-1344787002b4",
         "name":"Seasonal Offers",
         "modifiedByUserRef":"25f46901-bc51-45e8-b587-148aecf1e48f",
         "modifiedAt":"2018-10-05T07:37:49.650Z",
         "revision":1,
         "archived":false,
         "decisionModelDefinitionRef":"db6ee91d-bc02-4e83-8621-a17aee09814d",
         "definition":"<definitions xmlns=\"http://www.omg.org/spec/DMN/20151101/dmn.xsd\" id=\"definitions\" name=\"definitions\" namespace=\"http://camunda.org/schema/1.0/dmn\" />",
         "decisionModelDefinition":{  
            "href":"https://{apiEndpoint}/v2/decisionModelDefinitions/db6ee91d-bc02-4e83-8621-a17aee09814d"
         },
        "offers":[  
      "938a3392-1a18-4872-844a-9ecd56f61bf0",
      "2ff198c2-caee-4ccd-ab89-99a18ead3b06",
      "024c33ee-c74a-4b33-8050-7c2fccd4c776"
   ],
   "inProduction":true
}