Get the Prediction Server ID

cancel
Showing results for 
Search instead for 
Did you mean: 

Get the Prediction Server ID

In order to make predictions from a deployment, you need a prediction server ID. You can get this using curl commands from the REST API or using our Python SDK.

Once you have your prediction server ID, you can learn how to deploy your model and make predictions.

You can get the sample code for this workflow and snippets in DataRobot Community GitHub.

Get Prediction Server ID from the Terminal

Requirements

  • API Key —you can find this under your profile in the platform

Code

(cURL sample)
curl -v \
-H "Authorization: Bearer API_KEY" \ YOUR_DR_URL/api/v2/predictionServers/

Example
API_KEY=YOUR_API_KEY
ENDPOINT=YOUR_DR_URL/api/v2/predictionServers/

curl -v \
-H "Authorization: Bearer $API_KEY" \
$ENDPOINT

Get Prediction Server ID Python

Requirements

  • API Key —profile in the platform
  • Import DataRobot Package and be connected to DataRobot (learn here)

Code

(Python sample)
dr.PredictionServer.list()[i].id

Example

prediction_server_id = dr.PredictionServer.list()[0].id
Labels (3)
Version history
Last update:
‎04-15-2020 04:51 PM
Updated by:
Contributors