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

Abstract

Provides a cURL command to retrieve decision model definitions in Sitecore CDP REST API (Data model 2.1).

You can use the Decision Model REST API to perform a retrieve decision model definitions function to retrieve the reference number of a decision model.

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

GET https://apiEndpoint/v2/decisionModelDefinitions

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

The following is a 200 response:

{  
   "href":"https://dev-api.boxever.com/v2/decisionModelDefinitions",
   "items":[  
      {  
         "clientKey":"pqsPERS3lw12v5a9rrHPW1c4hET73GxQ",
         "href":"https://dev-api.boxever.com/v2/decisionModelDefinitions/e8878fdb-4031-423c-a12b-5691381f0c89",
         "ref":"e8878fdb-4031-423c-a12b-5691381f0c89",
         "name":"Determine Ancillary Upsell",
         "modifiedByUserRef":"843c775e-db9c-49f6-9f56-e3999123bcf4",
         "modifiedAt":"2018-10-10T15:14:40.233Z",
         "revision":3,
         "archived":false,
         "deploymentConfiguration":{  
            "variants":[  
               {  
                  "variantRef":"19700f15-4069-4121-b709-1031118677c8",
                  "split":100,
                  "status":"PRODUCTION",
                  "variantRevision":1
               },
               {  
                  "variantRef":"42e882a5-c8a8-4149-be76-343409d10c1c",
                  "split":0,
                  "status":"PRODUCTION",
                  "variantRevision":1
               }
            ]
         },
         "variants":{  
            "href":"https://dev-api.boxever.com/v2/decisionModelDefinitions/e8878fdb-4031-423c-a12b-5691381f0c89/variants"
         },
         "revisions":{  
            "href":"https://dev-api.boxever.com/v2/decisionModelDefinitions/e8878fdb-4031-423c-a12b-5691381f0c89/revisions"
         }
      },
      {  
         "clientKey":"pqsPERS3lw12v5a9rrHPW1c4hET73GxQ",
         "href":"https://dev-api.boxever.com/v2/decisionModelDefinitions/34ef5f20-65e9-4fd3-bd3f-6e434ced69a8",
         "ref":"34ef5f20-65e9-4fd3-bd3f-6e434ced69a8",
         "name":"DETERMINE MMB OFFERS",
         "description":"MANAGE MY BOOKING SEASONAL OFFERS",
         "modifiedByUserRef":"c008c81d-4941-46aa-b4e6-a17e8388498a",
         "modifiedAt":"2018-10-08T16:26:05.124Z",
         "revision":2,
         "archived":false,
         "deploymentConfiguration":{  
            "variants":[  
               {  
                  "variantRef":"da0ee56d-a684-48f4-91d1-bb6009c66f73",
                  "split":100,
                  "status":"PRODUCTION",
                  "variantRevision":1
               }
            ]
         },
         "variants":{  
            "href":"https://dev-api.boxever.com/v2/decisionModelDefinitions/34ef5f20-65e9-4fd3-bd3f-6e434ced69a8/variants"
         },
         "revisions":{  
            "href":"https://dev-api.boxever.com/v2/decisionModelDefinitions/34ef5f20-65e9-4fd3-bd3f-6e434ced69a8/revisions"
         }
      }
   ]
}