Use the retrieve decision model definitions revision record function in Sitecore CDP REST API

Abstract

How to retrieve a decision model definitions revision in Sitecore CDP (Data model 2.1).

You can use the Decision Model REST API to perform the retrieve decision model definitions revision record function to return the variants of a decision model. To do this, you need the decisionModelDefinitionRef returned when retrieving the decision model definition and the revision number returned when retrieving the revisions of a decision model definition.

To retrieve a revision record of a decision model definition in Sitecore CDP, use the following:

GET: https://apiEndpoint/v2/decisionModelDefinitions/:ref/revisions/revision

Attribute

Description

Type

decisionModelDefinitionRef

The reference of the decision model.

string

revision

The revision number of decision model variant.

string

$ curl -H "Accept: application/json" \    "https://{apiEndpoint}/v2/decisionModelDefinitions/{decisionModelDefinitionRef}/revisions/{revision}"

The following is a 200 response:

{
  "type": "string",
  "clientKey": "string",
  "href": "https://api.boxever.com/v2/decisionModelDefinitions/64ebc05e-2406-48d0-a074-d78dc0191ea6/revisions/2",
  "ref": "64ebc05e-2406-48d0-a074-d78dc0191ea6",
  "name": "Manage my booking 642144215",
  "description": "discount seasonal offers",
  "modifiedByUserRef": "f58e3f5a-dc4a-4dde-acf9-998580eb1975",
  "modifiedAt": "2018-10-05T08:36:57.916Z",
  "revision": 2,
  "revisionComment": "increase discount",
  "archived": false,
  "deploymentConfiguration": {
    "variants": [
      {
        "variantRef": "9c82d8c4-ea15-4a2b-b78b-a968563a3f21",
        "split": 100,
        "status": "PRODUCTION",
        "variantRevision": 0
      }
    ]
  },
  "tags": [
    "seasonal"
  ],
  "variants": {
    "type": "string",
    "href": "https://api.boxever.com/v2/decisionModelDefinitions/9c82d8c4-ea15-4a2b-b78b-a968563a3f21/variants"
  },
  "revisions": {
    "type": "string",
    "href": "https://api.boxever.com/v2/decisionModelDefinitions/64ebc05e-2406-48d0-a074-d78dc0191ea6/revisions/2"
  }
}