---
schema_version: "1"
id: cbb62ab59c5f60c77d9e7f310d584e52ff1d07984b7dc6354236de21db87a50c
title: Manage Models
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/bi_dev_guide_rest_sdd/bi_edd_prediction_service_model.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.bi_dev_guide_rest_sdd.meta/bi_dev_guide_rest_sdd/bi_edd_prediction_service_model.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: b4ca3feab9cfd9738d946847a38d68edd4c2d150c17d279d3cb8e25ecdec8837
description: The Einstein Prediction Service provides REST API endpoints to manage models. Each model has a unique id. A model is used to evaluate predictors and return predictions and improvements. These REST endpoints allow you to make updates to model metadata, but not update the actual predictive model.
---
# Manage Models

The Einstein Prediction Service provides REST API endpoints to manage models. Each model has a unique id. A model is used to evaluate predictors and return predictions and improvements. These REST endpoints allow you to make updates to model metadata, but not update the actual predictive model.

## Get Available Models

GET /smartdatadiscovery​/predictiondefinitions​/<predictionDefinitionIdOrName>​/models

This code shows an example response of a [Smart Data Discovery Model Collection](https://developer.salesforce.com/docs/atlas.en-us.bi_dev_guide_rest_sdd.meta/bi_dev_guide_rest_sdd/bi_sdd_responses_smart_data_discovery_model_collection.htm "A collection of Einstein Discovery prediction definitions.").

HTTP/1.1 200 OK
Date: Thu, 30 Jan 2020 17:34:12 GMT
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-Robots-Tag: none
Cache-Control: no-cache,must-revalidate,max-age=0,no-store,private
Set-Cookie: BrowserId=uqyLl0OGEeq2RPW2iPHbvQ; domain=.salesforce.com; path=/; expires=Fri, 29-Jan-2021 17:34:12 GMT; Max-Age=31536000
Content-Type: application/json;charset=UTF-8
Vary: Accept-Encoding
Content-Encoding: gzip
Transfer-Encoding: chunked


{
  "models" : \[ {
    "actionableVariables" : \[ {
      "label" : "Type",
      "name" : "Type",
      "type" : "Text"
    }, {
      "label" : "Ownership",
      "name" : "Ownership",
      "type" : "Text"
    }, {
      "label" : "Rating",
      "name" : "Rating",
      "type" : "Text"
    }, {
      "label" : "Division",
      "name" : "Division",
      "type" : "Text"
    }, {
      "label" : "AccountScore",
      "name" : "AccountScore",
      "type" : "Text"
    } \],
    "createdBy" : {
      "id" : "005B0000002zz1lIAA",
      "name" : "MyUserName",
      "profilePhotoUrl" : "https://MyDomainName.file.force.com/profilephoto/729B00000009ttx/T"
    },
    "createdDate" : "2020-01-17T00:24:35.000Z",
    "fieldMappingList" : \[ {
      "modelField" : {
        "label" : "CloseDate",
        "name" : "CloseDate",
        "type" : "Date"
      }
    }, {
      "modelField" : {
        "label" : "Industry",
        "name" : "Industry",
        "type" : "Text"
      }
    }, {
      "modelField" : {
        "label" : "StartDate",
        "name" : "StartDate",
        "type" : "Date"
      }
    }, {
      "modelField" : {
        "label" : "Ownership",
        "name" : "Ownership",
        "type" : "Text"
      }
    }, {
      "modelField" : {
        "label" : "Type",
        "name" : "Type",
        "type" : "Text"
      }
    }, {
      "modelField" : {
        "label" : "Rating",
        "name" : "Rating",
        "type" : "Text"
      }
    }, {
      "modelField" : {
        "label" : "BillingState",
        "name" : "BillingState",
        "type" : "Text"
      }
    }, {
      "modelField" : {
        "label" : "Division",
        "name" : "Division",
        "type" : "Text"
      }
    }, {
      "modelField" : {
        "label" : "AccountScore",
        "name" : "AccountScore",
        "type" : "Text"
      }
    } \],
    "filters" : \[ \],
    "id" : "1OtB00000004CApKAM",
    "label" : "CLV",
    "lastModifiedBy" : {
      "id" : "005B0000002zz1lIAA",
      "name" : "MyUserName",
      "profilePhotoUrl" : "https://MyDomainName.file.force.com/profilephoto/729B00000009ttx/T"
    },
    "lastModifiedDate" : "2020-01-17T00:24:35.000Z",
    "model" : {
      "id" : "1OTB000000000ajOAA"
    },
    "modelType" : "Regression",
    "name" : "CLV",
    "predictionDefinitionUrl" : "/services/data/v52.0/smartdatadiscovery/predictiondefinitions/1ORB00000004CApOAM",
    "sortOrder" : 0,
    "status" : "Enabled",
    "url" : "/services/data/v52.0/smartdatadiscovery/predictiondefinitions/1ORB00000004CApOAM/models/1OtB00000004CApKAM"
  }, {
    "actionableVariables" : \[ {
      "label" : "Industry",
      "name" : "Industry",
      "type" : "Text"
    }, {
      "label" : "Type",
      "name" : "Type",
      "type" : "Text"
    }, {
      "label" : "Ownership",
      "name" : "Ownership",
      "type" : "Text"
    }, {
      "label" : "Rating",
      "name" : "Rating",
      "type" : "Text"
    }, {
      "label" : "Division",
      "name" : "Division",
      "type" : "Text"
    } \],
    "createdBy" : {
      "id" : "005B0000002zz1lIAA",
      "name" : "MyUserName",
      "profilePhotoUrl" : "https://MyDomainName.file.force.com/profilephoto/729B00000009ttx/T"
    },
    "createdDate" : "2020-01-17T00:26:14.000Z",
    "fieldMappingList" : \[ {
      "modelField" : {
        "label" : "CloseDate",
        "name" : "CloseDate",
        "type" : "Date"
      }
    }, {
      "modelField" : {
        "label" : "Industry",
        "name" : "Industry",
        "type" : "Text"
      }
    }, {
      "modelField" : {
        "label" : "StartDate",
        "name" : "StartDate",
        "type" : "Date"
      }
    }, {
      "modelField" : {
        "label" : "Ownership",
        "name" : "Ownership",
        "type" : "Text"
      }
    }, {
      "modelField" : {
        "label" : "Type",
        "name" : "Type",
        "type" : "Text"
      }
    }, {
      "modelField" : {
        "label" : "Rating",
        "name" : "Rating",
        "type" : "Text"
      }
    }, {
      "modelField" : {
        "label" : "BillingState",
        "name" : "BillingState",
        "type" : "Text"
      }
    }, {
      "modelField" : {
        "label" : "Division",
        "name" : "Division",
        "type" : "Text"
      }
    }, {
      "modelField" : {
        "label" : "AccountScore",
        "name" : "AccountScore",
        "type" : "Text"
      }
    } \],
    "filters" : \[ \],
    "id" : "1OtB00000004CAqKAM",
    "label" : "CLV",
    "lastModifiedBy" : {
      "id" : "005B0000002zz1lIAA",
      "name" : "MyUserName",
      "profilePhotoUrl" : "https://MyDomainName.file.force.com/profilephoto/729B00000009ttx/T"
    },
    "lastModifiedDate" : "2020-01-17T00:26:14.000Z",
    "model" : {
      "id" : "1OTB000000000ajOAA"
    },
    "modelType" : "Regression",
    "name" : "CLV",
    "predictionDefinitionUrl" : "/services/data/v52.0/smartdatadiscovery/predictiondefinitions/1ORB00000004CApOAM",
    "sortOrder" : 1,
    "status" : "Enabled",
    "url" : "/services/data/v52.0/smartdatadiscovery/predictiondefinitions/1ORB00000004CApOAM/models/1OtB00000004CAqKAM"
  } \],
  "totalSize" : 2,
  "url" : "/services/data/v52.0/smartdatadiscovery/predictiondefinitions/1ORB00000004CApOAM/models"
}

## Get Metadata for a Model

GET /smartdatadiscovery​/predictiondefinitions​/<predictionDefinitionIdOrName>​/models/<modelId>

## Delete a Model

DELETE /smartdatadiscovery​/predictiondefinitions​/<predictionDefinitionIdOrName>​/models/<modelId>