All Einstein Discovery REST API resources are accessed using:
- A base URL for your company (for example, https://yourInstance.salesforce.com)
- Version information (for example, /services/data/v53.0)
- A named resource (for example, /smartdatadiscovery)
Put together, an example of the full URL to the resource is:
https://yourInstance.salesforce.com/services/data/v55.0/smartdatadiscovery
Org and Object Identifiers
Id fields in Salesforce, and for Einstein Discovery, are typically 15-character, base-62, case-sensitive strings. However, many Salesforce APIs, including the Einstein Discovery REST API, use 18-character, case-insensitive strings—for example, the Id property of the Story resource /smartdatadiscovery/stories/<storyID>. The last 3 digits are a checksum of the preceding 15 characters. The use of case-insensitive Id’s eases interaction with external applications and development environments that use case-insensitive references. To convert an 18-character Id back to a 15-character ID, simply remove the last 3 characters.
General Resources
General resources for Einstein Discovery are covered here, while specific features like prediction definitions and stories have their own sections.
| Resource | Description | Supported HTTP Method | Resource URL |
|---|---|---|---|
| Metrics Resource | Returns the metrics for Einstein Discovery. | GET | /smartdatadiscovery/metrics |
| Narrative Resource | Returns the narrative data for an Einstein Discovery story. | POST | /smartdatadiscovery/narrative |
| Predict Resource | Creates an Einstein Discovery prediction. | POST | /smartdatadiscovery/predict |
| Predict History Resource | Query the history of Einstein Discovery predictions. | POST | /smartdatadiscovery/predict-history |
| Smart Data Discovery Resource | Lists the top-level resources available for Einstein Discovery. | GET | /smartdatadiscovery |
Filtering REST Responses
In addition to Einstein Discovery REST API input parameters, you can use the following Connect REST API input parameters to filter the results returned from a request: filterGroup, external, and internal. For more information, see Specifying Response Sizes in the Connect REST API Developer Guide.