Deployment Info¶
This page outlines the operations, endpoints, parameters, and example requests and responses for the Deployment Info.
GET /api/v2/deployments/{deploymentId}/capabilities/¶
Retrieve the capabilities for the deployment.
Code samples¶
curl -X GET https://app.datarobot.com/api/v2/deployments/{deploymentId}/capabilities/ \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}"
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
deploymentId | path | string | true | Unique identifier of the deployment. |
Example responses¶
200 Response
{
"data": [
{
"messages": [
"string"
],
"name": "string",
"supported": true
}
]
}
Responses¶
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | DeploymentCapabilitiesRetrieveResponse |
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
GET /api/v2/deployments/{deploymentId}/features/¶
Retrieve features contained within the universe dataset associated with a specific deployment. By default, this returns all raw features required for predictions.
Code samples¶
curl -X GET https://app.datarobot.com/api/v2/deployments/{deploymentId}/features/?offset=0&limit=50 \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}"
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
offset | query | integer | true | The number of features to skip, defaults to 0. |
limit | query | integer | true | The number of features to return, defaults to 0. |
includeNonPredictionFeatures | query | string | false | When True will return all raw features in the universe dataset associated with the deployment, and when False will return only those raw features used to make predictions on the deployment. |
forSegmentedAnalysis | query | string | false | When True, features returned will be filtered to those usable for segmented analysis. |
search | query | string | false | Case insensitive search against names of the deployment's features. |
orderBy | query | string | false | The sort order to apply to the list of features. Prefix the attribute name with a dash to sort in descending order, e.g., "-name". |
deploymentId | path | string | true | Unique identifier of the deployment. |
Enumerated Values¶
Parameter | Value |
---|---|
includeNonPredictionFeatures | [false , False , true , True ] |
forSegmentedAnalysis | [false , False , true , True ] |
orderBy | [name , -name , importance , -importance ] |
Example responses¶
200 Response
{
"count": 0,
"data": [
{
"dateFormat": "string",
"featureType": "string",
"importance": 0,
"knownInAdvance": true,
"name": "string"
}
],
"next": "http://example.com",
"previous": "http://example.com",
"totalCount": 0
}
Responses¶
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The deployment's features | FeatureListResponse |
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
POST /api/v2/deployments/{deploymentId}/onDemandReports/¶
Add report to execution queue.
Code samples¶
curl -X POST https://app.datarobot.com/api/v2/deployments/{deploymentId}/onDemandReports/ \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {access-token}" \
-d '{undefined}'
Body parameter¶
{
"id": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
deploymentId | path | string | true | Unique identifier of the deployment. |
body | body | ScheduledReportOnDemmand | false | none |
Responses¶
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Scheduled report job was addded to execution. | None |
Response Headers¶
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Location | string | URL to poll to track report generation has finished. |
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
GET /api/v2/deployments/{deploymentId}/scoringCode/¶
Retrieve Scoring Code of the current deployed model for making predictions outside of a DataRobot prediction server. You need the "Scoring Code" feature enabled to use this route.
By default, returns a compiled executable JAR that can be executed locally to calculate model predictions, or it can be used as a library for a Java application. Execute it with the '--help` parameters to learn how to use it as a command-line utility. See model API documentation at https://javadoc.io/doc/com.datarobot/datarobot-prediction/latest/index.html to be able to use it inside an existing Java application.
With sourceCode query parameter set to 'true', returns a source code archive that can be used to review internal calculations of the model. This JAR is NOT executable.
See "https://docs.datarobot.com/en/docs/predictions/port-pred/scoring-code/index.html" documentation in DataRobot application for more information.
Note Cannot retrieve source code if agent is included.
Code samples¶
curl -X GET https://app.datarobot.com/api/v2/deployments/{deploymentId}/scoringCode/ \
-H "Authorization: Bearer {access-token}"
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sourceCode | query | string | false | Whether source code or binary of the Scoring Code will be retrieved |
includeAgent | query | string | false | Whether the Scoring code retrieved will include tracking agent |
includePe | query | string | false | Please use includePredictionExplanations parameter instead |
includePredictionExplanations | query | string | false | Whether the Scoring Code retrieved will include prediction explanations |
includePredictionIntervals | query | string | false | Whether the Scoring Code retrieved will include prediction intervals |
deploymentId | path | string | true | Unique identifier of the deployment. |
Enumerated Values¶
Parameter | Value |
---|---|
sourceCode | [false , False , true , True ] |
includeAgent | [false , False , true , True ] |
includePe | [false , False , true , True ] |
includePredictionExplanations | [false , False , true , True ] |
includePredictionIntervals | [false , False , true , True ] |
Responses¶
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | JAR file | None |
Response Headers¶
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Disposition | string | Indicating the content is supposed to be downloaded as an attachment | |
200 | Content-Type | string | application/java-archive |
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
POST /api/v2/deployments/{deploymentId}/scoringCodeBuilds/¶
Build Java package containing Scoring Code with agent integration.
Code samples¶
curl -X POST https://app.datarobot.com/api/v2/deployments/{deploymentId}/scoringCodeBuilds/ \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {access-token}" \
-d '{undefined}'
Body parameter¶
{
"includeAgent": true,
"includePredictionExplanations": true,
"includePredictionIntervals": true
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
deploymentId | path | string | true | Unique identifier of the deployment. |
body | body | DeploymentsScoringCodeBuildPayload | false | none |
Responses¶
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | None |
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
PATCH /api/v2/deployments/{deploymentId}/status/¶
Change deployment status.
Code samples¶
curl -X PATCH https://app.datarobot.com/api/v2/deployments/{deploymentId}/status/ \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {access-token}" \
-d '{undefined}'
Body parameter¶
{
"status": "active"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
deploymentId | path | string | true | Unique identifier of the deployment. |
body | body | DeploymentStatusUpdate | false | none |
Responses¶
Status | Meaning | Description | Schema |
---|---|---|---|
202 | Accepted | Job submitted. See Location header. | None |
409 | Conflict | Deployment is already in process of status change or already in requested status. | None |
422 | Unprocessable Entity | Deployment status change request could not be processed. | None |
Response Headers¶
Status | Header | Type | Format | Description |
---|---|---|---|---|
202 | Location | string | URL for tracking async job status. |
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
Schemas¶
DeploymentCapabilitiesRetrieveResponse
{
"data": [
{
"messages": [
"string"
],
"name": "string",
"supported": true
}
]
}
Properties¶
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
data | [DeploymentCapability] | true | List of all capabilities. |
DeploymentCapability
{
"messages": [
"string"
],
"name": "string",
"supported": true
}
Properties¶
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
messages | [string] | true | Messages explaining why the capability is supported or not supported. | |
name | string | true | The name of the capability. | |
supported | boolean | true | If the capability is supported. |
DeploymentStatusUpdate
{
"status": "active"
}
Properties¶
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
status | string | true | Status that deployment should be transition in. |
Enumerated Values¶
Property | Value |
---|---|
status | [active , inactive ] |
DeploymentsScoringCodeBuildPayload
{
"includeAgent": true,
"includePredictionExplanations": true,
"includePredictionIntervals": true
}
Properties¶
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
includeAgent | boolean | false | Whether the Scoring Code built will include tracking agent | |
includePredictionExplanations | boolean | false | Whether the Scoring Code built will include prediction explanations | |
includePredictionIntervals | boolean | false | Whether the Scoring Code built will include prediction intervals |
Feature
{
"dateFormat": "string",
"featureType": "string",
"importance": 0,
"knownInAdvance": true,
"name": "string"
}
Properties¶
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
dateFormat | string,null | true | The date format string for how this feature was interpreted. | |
featureType | string,null | true | Feature type. | |
importance | number,null | true | Numeric measure of the relationship strength between the feature and target (independent of model or other features). | |
knownInAdvance | boolean | true | Whether the feature was selected as known in advance in a time-series model, false for non-time-series models. | |
name | string | true | Feature name. |
FeatureListResponse
{
"count": 0,
"data": [
{
"dateFormat": "string",
"featureType": "string",
"importance": 0,
"knownInAdvance": true,
"name": "string"
}
],
"next": "http://example.com",
"previous": "http://example.com",
"totalCount": 0
}
Properties¶
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
count | integer | false | Number of items returned on this page. | |
data | [Feature] | true | An array of features. | |
next | string,null(uri) | true | URL pointing to the next page (if null, there is no next page). | |
previous | string,null(uri) | true | URL pointing to the previous page (if null, there is no previous page). | |
totalCount | integer | true | The total number of items across all pages. |
ScheduledReportOnDemmand
{
"id": "string"
}
Properties¶
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | true | ID of Scheduled report record. |