Deprecated API routes¶
The Prediction API has changed significantly over time and accumulated a number of old routes. Even though these routes are already deprecated, they are still available in some installations since not all users have migrated to newer versions yet.
This page describes:
- all such deprecated routes
- deadlines for their complete removal
- new REST endpoints that should be used instead of old ones
- how Prediction Admins can capture usages of deprecated routes within their organization to safely upgrade DataRobot
Please refer to Prediction API reference documentation for details on each specific route.
Deprecated Prediction API routes¶
The Prediction API has moved from "project/model" routes to "deployment-aware" routes. To support this transition, the following routes have been deprecated:
Warning
Availability of deprecated routes (those not using the deployment-aware model) is dependent on the initial DataRobot deployment version. See the table below for complete details. Contact your DataRobot representative if you need help migrating to the new API routes.
Deployment type | Installation timeline | Status and notes |
---|---|---|
Self-Managed AI Platform | New as of v6.0 or later | Disabled |
Self-Managed AI Platform | Upgraded to v6.0 or v.6.1 | Supported |
Self-Managed AI Platform | v6.2 upgrade (future) | All deprecated routes removed entirely |
AI Platform* | Migrated individually, contact your DataRobot representative | Migration is in progress |
* Managed AI Platform accounts newer than May 2020 only have access to the new routes.
The full list of deprecated routes¶
Make AutoML predictions¶
Deprecated route: POST /predApi/v1.0/<projectId>/<modelId>/predict
New route: POST /predApi/v1.0/deployments/<deploymentId>/predictions
Make time series predictions¶
Deprecated routes:
POST /predApi/v1.0/<projectId>/<modelId>/timeSeriesPredict
POST /predApi/v1.0/deployments/<deploymentId>/timeSeriesPredictions
New route:POST /predApi/v1.0/deployments/<deploymentId>/predictions
Prediction Explanations¶
Deprecated routes:
POST /predApi/v1.0/<projectId>/<modelId>/reasonCodesPredictions
POST /predApi/v1.0/<projectId>/<modelId>/predictionExplanations
POST /predApi/v1.0/deployments/<deploymentId>/predictionExplanations
New route:POST /predApi/v1.0/deployments/<deploymentId>/predictions
Ping¶
Deprecated route:GET /api/v1/ping
New route:GET /predApi/v1.0/ping
List models¶
Deprecated route: GET /api/v1/<projectId>/models
New route:
Use Public V2 API to fetch the list of models in a project
Using tokens¶
Deprecated routes:
GET /api/v1/api_token
POST /api/v1/api_token
GET /predApi/v1.0/api_token
New route:
API tokens are superseded by API Keys and are managed by the public V2 API only. See the UI platform documentation or the Account > API keys and tools section of the public V2 API documentation.
Request examples for legacy Prediction API routes¶
This section provides examples showing how to make predictions using legacy and soon to be disabled Prediction API routes directly on a model by specifying the model’s project and model ID.
See the table above for a deprecation timeline based on release status.
Generating predictions for classification and regression projects:
curl -i -X POST "https://example.datarobot.com/predApi/v1.0/<projectId>/<modelId>/predict" \
-H "Authorization: Bearer <API key>" -F \
file=@~/.home/path/to/dataset.csv
Generating predictions for time series projects:
curl -i -X POST "https://example.datarobot.com/predApi/v1.0/<projectId>/<modelId>/timeSeriesPredict" \
-H "Authorization: Bearer <API key>" -F \
file=@~/.home/path/to/dataset.csv
Generating Prediction Explanations:
curl -i -X POST "https://example.datarobot.com/predApi/v1.0/<projectId>/<modelId>/predictionExplanations" \
-H "Authorization: Bearer <API key>" -F \
file=@~/.home/path/to/dataset.csv
If you are using he managed AI Platform (SaaS), include the datarobot-key
in the cURL header: -H "datarobot-key: xxxx
.
Tracking deprecated routes usage¶
Availability information
This feature is not available for managed AI Platform (SaaS) users. Contact your DataRobot representative for information on handling migrations.
Note
This feature is available in v6.1 only. In v6.2 it will be deleted along with all deprecated routes.
For prediction admins convenience, it is possible to track all deprecated routes usage from a single page. This feature is only available to users who have "Enable Predictions Admin" permission enabled:
Prediction admins can access it via Manage Predictions page:
In order to access deprecated routes statistics click on the button in the top right corner:
The table with statistics will look like this:
The table has the following columns:
- Last Used : the last time this request was made (UTC)
- Request : HTTP request that was made. Includes query parameters, if any
- Username : name of the DR user who made this request
- Total Use Count : total number of times request was made since v6.1.
Notes:
- The table is sorted by Last Used descending, so that the most recent requests are shown on top.
- Two different users making the same request are counted separately.
- The total number of the most recent requests shown is limited by 100.
- This table only shows requests to deprecated routes. Requests using new routes are not shown..