Skip to content

Click in-app to access the full platform documentation for your version of DataRobot.

Custom Models

This page outlines the operations, endpoints, parameters, and example requests and responses for the Custom Models.

GET /api/v2/customModelDeployments/

List of model deployments for user sorted by creation time descending.

Code samples

# You can also use wget
curl -X GET http://10.97.68.125/api/v2/customModelDeployments/?offset=0&limit=100 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
offset query integer true This many results will be skipped.
limit query integer true At most this many results are returned.
customModelIds query any false List of ID's of the custom model which model deployments will be retrieved.
environmentIds query any false List of ID's of the execution environment which model deployments will be retrieved.

Example responses

200 Response

{
  "count": 0,
  "data": [
    {
      "customModel": {
        "id": "string",
        "name": "string"
      },
      "customModelImageId": "string",
      "customModelVersion": {
        "id": "string",
        "label": "string"
      },
      "deployed": "string",
      "deployedBy": "string",
      "executionEnvironment": {
        "id": "string",
        "name": "string"
      },
      "executionEnvironmentVersion": {
        "id": "string",
        "label": "string"
      },
      "id": "string",
      "imageType": "customModelImage",
      "label": "string",
      "status": "active",
      "testingStatus": "not_tested"
    }
  ],
  "next": "http://example.com",
  "previous": "http://example.com",
  "totalCount": 0
}

Responses

Status Meaning Description Schema
200 OK OK. CustomModelDeploymentListResponse
400 Bad Request Query parameters are invalid. None

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

GET /api/v2/customModelDeployments/{deploymentId}/logs/

Retrieve the logs generated during deployment of the custom model.

Code samples

# You can also use wget
curl -X GET http://10.97.68.125/api/v2/customModelDeployments/{deploymentId}/logs/ \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
deploymentId path string true ID of the custom model deployment.

Responses

Status Meaning Description Schema
200 OK The response will contain a text file with the contents of the Custom Model deployment log. None
404 Not Found No logs found. None

Response Headers

Status Header Type Format Description
200 Content-Disposition string Contains an auto generated filename of the log file ("attachment;filename=deployment-.log").

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

POST /api/v2/customModelDeployments/{deploymentId}/logs/

Request logs from a custom deployed model.

Code samples

# You can also use wget
curl -X POST http://10.97.68.125/api/v2/customModelDeployments/{deploymentId}/logs/ \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
deploymentId path string true ID of the custom model deployment.

Example responses

202 Response

{
  "statusId": "string"
}

Responses

Status Meaning Description Schema
202 Accepted Accepted: request placed to a queue for processing. CustomModelAsyncOperationResponse
404 Not Found Deployment not found or model is not a Custom Model. None
422 Unprocessable Entity Deployed model is not a Custom Model. 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

GET /api/v2/customModelDeployments/{deploymentId}/logs/{logId}/

Retrieve the logs generated during predictions on the deployed custom model.

Code samples

# You can also use wget
curl -X GET http://10.97.68.125/api/v2/customModelDeployments/{deploymentId}/logs/{logId}/ \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
deploymentId path string true ID of the custom model deployment.
logId path string true ID of the custom model deployment log.

Responses

Status Meaning Description Schema
200 OK The response will contain a text file with the contents of the Custom Model deployment log. None
404 Not Found No logs found. None

Response Headers

Status Header Type Format Description
200 Content-Disposition string Contains an auto generated filename of the log file ("attachment;filename=deployment-.log").

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

GET /api/v2/customModelLimits/

Retrieve custom model resource limits the user has access to.

Code samples

# You can also use wget
curl -X GET http://10.97.68.125/api/v2/customModelLimits/ \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Example responses

200 Response

{
  "desiredCustomModelContainerSize": 134217728,
  "maxCustomModelContainerSize": 134217728,
  "maxCustomModelReplicasPerDeployment": 0,
  "maxCustomModelTestingParallelUsers": 0
}

Responses

Status Meaning Description Schema
200 OK OK. CustomModelResourceLimits

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

GET /api/v2/customModelTests/

Retrieve the testing history for a model.

Code samples

# You can also use wget
curl -X GET http://10.97.68.125/api/v2/customModelTests/?offset=0&limit=1000&customModelId=string \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
offset query integer true This many results will be skipped.
limit query integer true At most this many results are returned.
maximumMemory query integer false The maximum memory that might be allocated by the custom-model. If exceeded, the custom-model will be killed
networkEgressPolicy query string false Network egress policy.
desiredMemory query integer false The amount of memory that is expected to be allocated by the custom model.
replicas query integer false A fixed number of replicas that will be set for the given custom-model.
requiresHa query boolean false Require all custom model replicas to be deployed on different Kubernetes nodes for predictions fault tolerance.
customModelId query string true ID of the Custom Model to retrieve testing history for.

Enumerated Values

Parameter Value
networkEgressPolicy NONE
networkEgressPolicy DR_API_ACCESS
networkEgressPolicy PUBLIC

Example responses

200 Response

{
  "count": 0,
  "data": [
    {
      "completedAt": "string",
      "created": "string",
      "createdBy": "string",
      "customModel": {
        "id": "string",
        "name": "string"
      },
      "customModelImageId": "string",
      "customModelVersion": {
        "id": "string",
        "label": "string"
      },
      "datasetId": "string",
      "datasetVersionId": "string",
      "desiredMemory": 134217728,
      "executionEnvironment": {
        "id": "string",
        "name": "string"
      },
      "executionEnvironmentVersion": {
        "id": "string",
        "label": "string"
      },
      "id": "string",
      "imageType": "customModelImage",
      "maximumMemory": 134217728,
      "networkEgressPolicy": "NONE",
      "overallStatus": "not_tested",
      "replicas": 0,
      "requiresHa": true,
      "testingStatus": {
        "errorCheck": {
          "message": "string",
          "status": "not_tested"
        },
        "longRunningService": {
          "message": "string",
          "status": "not_tested"
        },
        "nullValueImputation": {
          "message": "string",
          "status": "not_tested"
        },
        "sideEffects": {
          "message": "string",
          "status": "not_tested"
        }
      }
    }
  ],
  "next": "http://example.com",
  "previous": "http://example.com",
  "totalCount": 0
}

Responses

Status Meaning Description Schema
200 OK OK. CustomModelTestsListResponse

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

POST /api/v2/customModelTests/

Test a custom inference model. This will start a job to check that the custom model can make predictions against the supplied dataset without breaking.

Code samples

# You can also use wget
curl -X POST http://10.97.68.125/api/v2/customModelTests/ \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Body parameter

{
  "configuration": {
    "errorCheck": "fail",
    "longRunningService": "fail",
    "nullValueImputation": "skip",
    "sideEffects": "skip"
  },
  "customModelId": "string",
  "customModelVersionId": "string",
  "datasetId": "string",
  "datasetVersionId": "string",
  "desiredMemory": 134217728,
  "environmentId": "string",
  "environmentVersionId": "string",
  "maximumMemory": 134217728,
  "networkEgressPolicy": "NONE",
  "replicas": 0,
  "requiresHa": true
}

Parameters

Name In Type Required Description
body body CustomModelTests false none

Example responses

202 Response

{
  "statusId": "string"
}

Responses

Status Meaning Description Schema
202 Accepted Model testing job successfully started. CustomModelAsyncOperationResponse
403 Forbidden No access to use data for testing custom model. None
404 Not Found Custom model or dataset not found. None
422 Unprocessable Entity Custom Model Testing cannot be submitted because of invalid input or model state: (1) if user does not have permission to create legacy conversion environment, (2) testing is already in progress for the custom model, (3) dataset used for testing is not snapshotted,(4) other cases. None

Response Headers

Status Header Type Format Description
202 Location string URL that can be polled to check the status.

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

DELETE /api/v2/customModelTests/{customModelTestId}/

Cancel custom inference model testing.

Code samples

# You can also use wget
curl -X DELETE http://10.97.68.125/api/v2/customModelTests/{customModelTestId}/ \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
customModelTestId path string true ID of the testing history attempt.

Responses

Status Meaning Description Schema
204 No Content Testing canceled. None
404 Not Found Testing attempt not found. None
409 Conflict Testing attempt has already reached a terminal state. None

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

GET /api/v2/customModelTests/{customModelTestId}/

Retrieve a specific testing history entry for a custom model.

Code samples

# You can also use wget
curl -X GET http://10.97.68.125/api/v2/customModelTests/{customModelTestId}/ \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
customModelTestId path string true ID of the testing history attempt.

Example responses

200 Response

{
  "completedAt": "string",
  "created": "string",
  "createdBy": "string",
  "customModel": {
    "id": "string",
    "name": "string"
  },
  "customModelImageId": "string",
  "customModelVersion": {
    "id": "string",
    "label": "string"
  },
  "datasetId": "string",
  "datasetVersionId": "string",
  "desiredMemory": 134217728,
  "executionEnvironment": {
    "id": "string",
    "name": "string"
  },
  "executionEnvironmentVersion": {
    "id": "string",
    "label": "string"
  },
  "id": "string",
  "imageType": "customModelImage",
  "maximumMemory": 134217728,
  "networkEgressPolicy": "NONE",
  "overallStatus": "not_tested",
  "replicas": 0,
  "requiresHa": true,
  "testingStatus": {
    "errorCheck": {
      "message": "string",
      "status": "not_tested"
    },
    "longRunningService": {
      "message": "string",
      "status": "not_tested"
    },
    "nullValueImputation": {
      "message": "string",
      "status": "not_tested"
    },
    "sideEffects": {
      "message": "string",
      "status": "not_tested"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK OK. CustomModelTestsResponse

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

GET /api/v2/customModelTests/{customModelTestId}/log/

Retrieve the logs from a model testing attempt.

Code samples

# You can also use wget
curl -X GET http://10.97.68.125/api/v2/customModelTests/{customModelTestId}/log/ \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
customModelTestId path string true ID of the testing history attempt.

Responses

Status Meaning Description Schema
200 OK The log file will be downloaded. None
404 Not Found No testing log found. None

Response Headers

Status Header Type Format Description
200 Content-Disposition string Contains an auto generated filename for this download ("attachment;filename=testing-.log").

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

GET /api/v2/customModelTests/{customModelTestId}/tail/

Retrieve the last N lines of logs from a model testing attempt.

Code samples

# You can also use wget
curl -X GET http://10.97.68.125/api/v2/customModelTests/{customModelTestId}/tail/?lines=100 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
lines query integer true Number of lines from the log to retrieve (1-1000, default 100).
customModelTestId path string true ID of the testing history attempt.

Example responses

200 Response

{
  "log": "string"
}

Responses

Status Meaning Description Schema
200 OK The log tail was retrieved. CustomModelTestsLogTailResponse
400 Bad Request Requested number of lines is invalid. None
404 Not Found The testing history entry cannot be found. None

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

GET /api/v2/customModels/

Retrieve metadata for all custom models the user has access to.

Code samples

# You can also use wget
curl -X GET http://10.97.68.125/api/v2/customModels/?offset=0&limit=1000 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
offset query integer true This many results will be skipped.
limit query integer true At most this many results are returned.
customModelType query string false If "training" specified, only Custom Training Tasks will be returned. If "inference" specified, only Custom Inference Models will be returned. If not specified, all custom models will be returned. After deprecation, only Custom Inference Models will be returned
isDeployed query string false If "true" specified, only deployed custom models will be returned. If "false" specified, only not deployed custom models will be returned. If not specified, all custom models will be returned.
orderBy query string false Sort order which will be applied to custom model list, valid options are "created", "updated". Prefix the attribute name with a dash to sort in descending order, e.g. orderBy="-created". By default, the orderBy parameter is None which will result in custom models being returned in order of creation time descending.
searchFor query string false String to search for occurrence in custom model's description, language and name. Search is case insensitive. If not specified, all custom models will be returned.

Enumerated Values

Parameter Value
customModelType training
customModelType inference
isDeployed false
isDeployed False
isDeployed true
isDeployed True
orderBy created
orderBy -created
orderBy updated
orderBy -updated

Example responses

200 Response

{
  "count": 0,
  "data": [
    {
      "calibratePredictions": true,
      "classLabels": [
        "string"
      ],
      "created": "string",
      "createdBy": "string",
      "customModelType": "training",
      "deploymentsCount": 0,
      "description": "string",
      "desiredMemory": 134217728,
      "id": "string",
      "language": "string",
      "latestVersion": {
        "baseEnvironmentId": "string",
        "baseEnvironmentVersionId": "string",
        "created": "string",
        "customModelId": "string",
        "dependencies": [
          {
            "constraints": [
              {
                "constraintType": "<",
                "version": "string"
              }
            ],
            "extras": "string",
            "line": "string",
            "lineNumber": 0,
            "packageName": "string"
          }
        ],
        "description": "string",
        "desiredMemory": 134217728,
        "id": "string",
        "isFrozen": true,
        "items": [
          {
            "commitSha": "string",
            "created": "string",
            "fileName": "string",
            "filePath": "string",
            "fileSource": "string",
            "id": "string",
            "ref": "string",
            "repositoryFilePath": "string",
            "repositoryLocation": "string",
            "repositoryName": "string",
            "storagePath": "string",
            "workspaceId": "string"
          }
        ],
        "label": "string",
        "maximumMemory": 134217728,
        "networkEgressPolicy": "NONE",
        "replicas": 0,
        "requiredMetadata": {},
        "requiredMetadataValues": [
          {
            "fieldName": "string",
            "value": "string"
          }
        ],
        "requiresHa": true,
        "versionMajor": 0,
        "versionMinor": 0
      },
      "maximumMemory": 134217728,
      "name": "string",
      "negativeClassLabel": "string",
      "networkEgressPolicy": "NONE",
      "positiveClassLabel": "string",
      "predictionThreshold": 0,
      "replicas": 0,
      "requiresHa": true,
      "supportsAnomalyDetection": true,
      "supportsBinaryClassification": true,
      "supportsRegression": true,
      "targetName": "string",
      "targetType": "Binary",
      "trainingDataAssignmentInProgress": true,
      "trainingDataFileName": "string",
      "trainingDataPartitionColumn": "string",
      "trainingDatasetId": "string",
      "trainingDatasetVersionId": "string",
      "updated": "string",
      "userProvidedId": "string"
    }
  ],
  "next": "http://example.com",
  "previous": "http://example.com",
  "totalCount": 0
}

Responses

Status Meaning Description Schema
200 OK OK. CustomModelListResponse

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

POST /api/v2/customModels/

Creates a new custom model and returns the newly created metadata record for it.

All custom models must support at least one target type (binaryClassification, regression). Custom inference models can only support a single target type. A regression model is expected to produce predictions that are arbitrary floating-point or integer numbers. A classification model is expected to return predictions with probability scores for each class. For example, a binary classification model might return:

.. code:: Python

{
    positiveClassLabel: probability,
    negativeClassLabel: 1.0 - probability
}

For Custom Inference Models, the file parameter must be either a tarball or zip archive containing, at minimum, a script named start_server.sh. It may contain additional files, including scripts and precompiled binaries as well as data files. start_server.sh may execute these scripts and/or binaries. When this script is executed, it is run as part of an Environment (specified via subsequent API calls), and all included scripts and binaries can take advantage of any programming language interpreters, compilers, libraries, or other tools included in the Environment. start_server.sh must be marked as executable (chmod +x).

When start_server.sh is launched, it must launch and maintain (in the foreground) a Web server that listens on two URLs:

  • GET $URL_PREFIX/ This route must return a 200 response code with an empty body immediately if the server is ready to respond to prediction requests. Otherwise it should either not accept the request, not respond to the request, or return a 503 response code.
  • POST $URL_PREFIX/predict_no_state/ This route must accept as input a JSON object of the form:

    .. code-block:: Python

    {
        'X': {
            'col1': [...col1_data...],
            'col2': [...col2_data...],
            'col3': [...col3_data...],
            ...
        }
    }
    

    The data lists will all be the same length.

    It must return a JSON object of the form:

    .. code-block:: Python

    {
        'predictions': [...predictions data...]
    }
    

    The predictions data must correspond 1:1 to the rows in the input data lists.

    $URL_PREFIX is provided as an environment variable. The Web server process must re-read its value every time the process starts, as it may change. It is an opaque string that is guaranteed to be a valid URL component, but may contain path separators (/).

Code samples

# You can also use wget
curl -X POST http://10.97.68.125/api/v2/customModels/ \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Body parameter

{
  "calibratePredictions": "True",
  "classLabels": [
    "string"
  ],
  "customModelType": "training",
  "description": "string",
  "desiredMemory": 134217728,
  "language": "string",
  "maximumMemory": 134217728,
  "name": "string",
  "negativeClassLabel": "string",
  "networkEgressPolicy": "NONE",
  "positiveClassLabel": "string",
  "predictionThreshold": 0.5,
  "replicas": 0,
  "requiresHa": true,
  "supportsBinaryClassification": true,
  "supportsRegression": true,
  "targetName": "string",
  "targetType": "Binary",
  "userProvidedId": "string"
}

Parameters

Name In Type Required Description
body body CustomModelCreate false none

Example responses

201 Response

{
  "calibratePredictions": true,
  "classLabels": [
    "string"
  ],
  "created": "string",
  "createdBy": "string",
  "customModelType": "training",
  "deploymentsCount": 0,
  "description": "string",
  "desiredMemory": 134217728,
  "id": "string",
  "language": "string",
  "latestVersion": {
    "baseEnvironmentId": "string",
    "baseEnvironmentVersionId": "string",
    "created": "string",
    "customModelId": "string",
    "dependencies": [
      {
        "constraints": [
          {
            "constraintType": "<",
            "version": "string"
          }
        ],
        "extras": "string",
        "line": "string",
        "lineNumber": 0,
        "packageName": "string"
      }
    ],
    "description": "string",
    "desiredMemory": 134217728,
    "id": "string",
    "isFrozen": true,
    "items": [
      {
        "commitSha": "string",
        "created": "string",
        "fileName": "string",
        "filePath": "string",
        "fileSource": "string",
        "id": "string",
        "ref": "string",
        "repositoryFilePath": "string",
        "repositoryLocation": "string",
        "repositoryName": "string",
        "storagePath": "string",
        "workspaceId": "string"
      }
    ],
    "label": "string",
    "maximumMemory": 134217728,
    "networkEgressPolicy": "NONE",
    "replicas": 0,
    "requiredMetadata": {},
    "requiredMetadataValues": [
      {
        "fieldName": "string",
        "value": "string"
      }
    ],
    "requiresHa": true,
    "versionMajor": 0,
    "versionMinor": 0
  },
  "maximumMemory": 134217728,
  "name": "string",
  "negativeClassLabel": "string",
  "networkEgressPolicy": "NONE",
  "positiveClassLabel": "string",
  "predictionThreshold": 0,
  "replicas": 0,
  "requiresHa": true,
  "supportsAnomalyDetection": true,
  "supportsBinaryClassification": true,
  "supportsRegression": true,
  "targetName": "string",
  "targetType": "Binary",
  "trainingDataAssignmentInProgress": true,
  "trainingDataFileName": "string",
  "trainingDataPartitionColumn": "string",
  "trainingDatasetId": "string",
  "trainingDatasetVersionId": "string",
  "updated": "string",
  "userProvidedId": "string"
}

Responses

Status Meaning Description Schema
201 Created Created. CustomModelResponse
403 Forbidden Custom model creation is not enabled. None
422 Unprocessable Entity Input parameters are invalid. None

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

POST /api/v2/customModels/fromCustomModel/

Creates a copy of the provided custom model, including metadata, versions of that model, and uploaded files. Associates the new versions with files owned by the custom model.

Code samples

# You can also use wget
curl -X POST http://10.97.68.125/api/v2/customModels/fromCustomModel/ \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Body parameter

{
  "customModelId": "string"
}

Parameters

Name In Type Required Description
body body CustomModelCopy false none

Example responses

201 Response

{
  "calibratePredictions": true,
  "classLabels": [
    "string"
  ],
  "created": "string",
  "createdBy": "string",
  "customModelType": "training",
  "deploymentsCount": 0,
  "description": "string",
  "desiredMemory": 134217728,
  "id": "string",
  "language": "string",
  "latestVersion": {
    "baseEnvironmentId": "string",
    "baseEnvironmentVersionId": "string",
    "created": "string",
    "customModelId": "string",
    "dependencies": [
      {
        "constraints": [
          {
            "constraintType": "<",
            "version": "string"
          }
        ],
        "extras": "string",
        "line": "string",
        "lineNumber": 0,
        "packageName": "string"
      }
    ],
    "description": "string",
    "desiredMemory": 134217728,
    "id": "string",
    "isFrozen": true,
    "items": [
      {
        "commitSha": "string",
        "created": "string",
        "fileName": "string",
        "filePath": "string",
        "fileSource": "string",
        "id": "string",
        "ref": "string",
        "repositoryFilePath": "string",
        "repositoryLocation": "string",
        "repositoryName": "string",
        "storagePath": "string",
        "workspaceId": "string"
      }
    ],
    "label": "string",
    "maximumMemory": 134217728,
    "networkEgressPolicy": "NONE",
    "replicas": 0,
    "requiredMetadata": {},
    "requiredMetadataValues": [
      {
        "fieldName": "string",
        "value": "string"
      }
    ],
    "requiresHa": true,
    "versionMajor": 0,
    "versionMinor": 0
  },
  "maximumMemory": 134217728,
  "name": "string",
  "negativeClassLabel": "string",
  "networkEgressPolicy": "NONE",
  "positiveClassLabel": "string",
  "predictionThreshold": 0,
  "replicas": 0,
  "requiresHa": true,
  "supportsAnomalyDetection": true,
  "supportsBinaryClassification": true,
  "supportsRegression": true,
  "targetName": "string",
  "targetType": "Binary",
  "trainingDataAssignmentInProgress": true,
  "trainingDataFileName": "string",
  "trainingDataPartitionColumn": "string",
  "trainingDatasetId": "string",
  "trainingDatasetVersionId": "string",
  "updated": "string",
  "userProvidedId": "string"
}

Responses

Status Meaning Description Schema
201 Created Successfully created copy. CustomModelResponse

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

POST /api/v2/customModels/predictionExplanationsInitialization/

Create a new prediction explanations initialization for custom model. This is a necessary prerequisite for generating prediction explanations.

.. minversion:: v2.23 DEPRECATED please use custom model version route instead: POST /api/v2/customModels/{customModelId}/versions/{customModelVersionId}/predictionExplanationsInitialization/

Code samples

# You can also use wget
curl -X POST http://10.97.68.125/api/v2/customModels/predictionExplanationsInitialization/ \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {access-token}'

Body parameter

{
  "customModelId": "string",
  "customModelVersionId": "string",
  "environmentId": "string",
  "environmentVersionId": "string"
}

Parameters

Name In Type Required Description
body body CustomModelPredictionExplanations false none

Responses

Status Meaning Description Schema
202 Accepted The request was accepted and will be worked on. None
422 Unprocessable Entity Specified custom model is not valid for prediction explanations. None

Response Headers

Status Header Type Format Description
202 Location string URL to poll to track the prediction explanation initialization has finished.

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

DELETE /api/v2/customModels/{customModelId}/

Delete a custom model. Only users who have permission to edit custom model can delete it. Only custom models which are not currently deployed or undergoing custom model testing can be deleted. Relevant CustomModelImage will be deleted also.

Code samples

# You can also use wget
curl -X DELETE http://10.97.68.125/api/v2/customModels/{customModelId}/ \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
customModelId path string true ID of the custom model.

Responses

Status Meaning Description Schema
204 No Content Record deleted. None
409 Conflict This custom model is currently deployed and cannot be deleted. The response body will contain link where those deployments can be retrieved. None

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

GET /api/v2/customModels/{customModelId}/

Retrieve metadata for a custom model.

Code samples

# You can also use wget
curl -X GET http://10.97.68.125/api/v2/customModels/{customModelId}/ \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
customModelId path string true ID of the custom model.

Example responses

200 Response

{
  "calibratePredictions": true,
  "classLabels": [
    "string"
  ],
  "created": "string",
  "createdBy": "string",
  "customModelType": "training",
  "deploymentsCount": 0,
  "description": "string",
  "desiredMemory": 134217728,
  "id": "string",
  "language": "string",
  "latestVersion": {
    "baseEnvironmentId": "string",
    "baseEnvironmentVersionId": "string",
    "created": "string",
    "customModelId": "string",
    "dependencies": [
      {
        "constraints": [
          {
            "constraintType": "<",
            "version": "string"
          }
        ],
        "extras": "string",
        "line": "string",
        "lineNumber": 0,
        "packageName": "string"
      }
    ],
    "description": "string",
    "desiredMemory": 134217728,
    "id": "string",
    "isFrozen": true,
    "items": [
      {
        "commitSha": "string",
        "created": "string",
        "fileName": "string",
        "filePath": "string",
        "fileSource": "string",
        "id": "string",
        "ref": "string",
        "repositoryFilePath": "string",
        "repositoryLocation": "string",
        "repositoryName": "string",
        "storagePath": "string",
        "workspaceId": "string"
      }
    ],
    "label": "string",
    "maximumMemory": 134217728,
    "networkEgressPolicy": "NONE",
    "replicas": 0,
    "requiredMetadata": {},
    "requiredMetadataValues": [
      {
        "fieldName": "string",
        "value": "string"
      }
    ],
    "requiresHa": true,
    "versionMajor": 0,
    "versionMinor": 0
  },
  "maximumMemory": 134217728,
  "name": "string",
  "negativeClassLabel": "string",
  "networkEgressPolicy": "NONE",
  "positiveClassLabel": "string",
  "predictionThreshold": 0,
  "replicas": 0,
  "requiresHa": true,
  "supportsAnomalyDetection": true,
  "supportsBinaryClassification": true,
  "supportsRegression": true,
  "targetName": "string",
  "targetType": "Binary",
  "trainingDataAssignmentInProgress": true,
  "trainingDataFileName": "string",
  "trainingDataPartitionColumn": "string",
  "trainingDatasetId": "string",
  "trainingDatasetVersionId": "string",
  "updated": "string",
  "userProvidedId": "string"
}

Responses

Status Meaning Description Schema
200 OK OK. CustomModelResponse

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

PATCH /api/v2/customModels/{customModelId}/

Updates metadata for an existing custom model.

All custom models must support at least one target type (binaryClassification, regression). Custom inference models can only support a single target type.

Setting positiveClassLabel and negativeClassLabel to null will set the labels to their default values (1 and 0 for positiveClassLabel and negativeClassLabel, respectively).

Setting positiveClassLabel, negativeClassLabel, 'targetName` is disabled if model has active deployments or assigned training data.

Code samples

# You can also use wget
curl -X PATCH http://10.97.68.125/api/v2/customModels/{customModelId}/ \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Body parameter

{
  "classLabels": [
    "string"
  ],
  "description": "string",
  "desiredMemory": 134217728,
  "language": "string",
  "maximumMemory": 134217728,
  "name": "string",
  "negativeClassLabel": "string",
  "networkEgressPolicy": "NONE",
  "positiveClassLabel": "string",
  "predictionThreshold": 0.5,
  "replicas": 0,
  "requiresHa": true,
  "targetName": "string"
}

Parameters

Name In Type Required Description
customModelId path string true ID of the custom model.
body body CustomModelUpdate false none

Example responses

201 Response

{
  "calibratePredictions": true,
  "classLabels": [
    "string"
  ],
  "created": "string",
  "createdBy": "string",
  "customModelType": "training",
  "deploymentsCount": 0,
  "description": "string",
  "desiredMemory": 134217728,
  "id": "string",
  "language": "string",
  "latestVersion": {
    "baseEnvironmentId": "string",
    "baseEnvironmentVersionId": "string",
    "created": "string",
    "customModelId": "string",
    "dependencies": [
      {
        "constraints": [
          {
            "constraintType": "<",
            "version": "string"
          }
        ],
        "extras": "string",
        "line": "string",
        "lineNumber": 0,
        "packageName": "string"
      }
    ],
    "description": "string",
    "desiredMemory": 134217728,
    "id": "string",
    "isFrozen": true,
    "items": [
      {
        "commitSha": "string",
        "created": "string",
        "fileName": "string",
        "filePath": "string",
        "fileSource": "string",
        "id": "string",
        "ref": "string",
        "repositoryFilePath": "string",
        "repositoryLocation": "string",
        "repositoryName": "string",
        "storagePath": "string",
        "workspaceId": "string"
      }
    ],
    "label": "string",
    "maximumMemory": 134217728,
    "networkEgressPolicy": "NONE",
    "replicas": 0,
    "requiredMetadata": {},
    "requiredMetadataValues": [
      {
        "fieldName": "string",
        "value": "string"
      }
    ],
    "requiresHa": true,
    "versionMajor": 0,
    "versionMinor": 0
  },
  "maximumMemory": 134217728,
  "name": "string",
  "negativeClassLabel": "string",
  "networkEgressPolicy": "NONE",
  "positiveClassLabel": "string",
  "predictionThreshold": 0,
  "replicas": 0,
  "requiresHa": true,
  "supportsAnomalyDetection": true,
  "supportsBinaryClassification": true,
  "supportsRegression": true,
  "targetName": "string",
  "targetType": "Binary",
  "trainingDataAssignmentInProgress": true,
  "trainingDataFileName": "string",
  "trainingDataPartitionColumn": "string",
  "trainingDatasetId": "string",
  "trainingDatasetVersionId": "string",
  "updated": "string",
  "userProvidedId": "string"
}

Responses

Status Meaning Description Schema
201 Created Created. CustomModelResponse
403 Forbidden Custom inference model modification is not enabled for the user. None
409 Conflict Custom model cannot be updated while it is being validated or some fields cannot be updated after deployment or assigning training data. None
422 Unprocessable Entity Input parameters are invalid. None

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

GET /api/v2/customModels/{customModelId}/accessControl/

Get a list of users who have access to this custom model and their roles on it.

Code samples

# You can also use wget
curl -X GET http://10.97.68.125/api/v2/customModels/{customModelId}/accessControl/?offset=0&limit=1000 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
offset query integer true This many results will be skipped.
limit query integer true At most this many results are returned.
customModelId path string true ID of the custom model.

Example responses

200 Response

{
  "count": 0,
  "data": [
    {
      "canShare": true,
      "role": "string",
      "userId": "string",
      "username": "string"
    }
  ],
  "next": "http://example.com",
  "previous": "http://example.com"
}

Responses

Status Meaning Description Schema
200 OK A list of users who have access to this custom model and their roles on it. CustomModelAccessControlListResponse
400 Bad Request Both username and userId were specified. None

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

PATCH /api/v2/customModels/{customModelId}/accessControl/

Grant access or update roles for users on this custom model and appropriate learning data. Up to 100 user roles may be set in a single request.

Code samples

# You can also use wget
curl -X PATCH http://10.97.68.125/api/v2/customModels/{customModelId}/accessControl/ \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Body parameter

{
  "data": [
    {
      "canShare": true,
      "role": "ADMIN",
      "username": "string"
    }
  ]
}

Parameters

Name In Type Required Description
customModelId path string true ID of the custom model.
body body SharingUpdateOrRemoveWithGrant false none

Example responses

204 Response

{
  "data": [
    {
      "canShare": true,
      "role": "string",
      "userId": "string",
      "username": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content Roles updated successfully. CustomModelAccessControlUpdateResponse
409 Conflict The request would leave the custom model without an owner. None
422 Unprocessable Entity One of the users in the request does not exist, or the request is otherwise invalid. None

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

GET /api/v2/customModels/{customModelId}/download/

Download the latest item bundle from a custom model as a zip compressed archive.

Code samples

# You can also use wget
curl -X GET http://10.97.68.125/api/v2/customModels/{customModelId}/download/ \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
pps query string false Download model version from PPS tab.If "true" specified, model archive includes dependencies install script. If "false" specified, dependencies script is not included. If not specified -> "false" behavior.
customModelId path string true ID of the custom model.

Enumerated Values

Parameter Value
pps false
pps False
pps true
pps True

Responses

Status Meaning Description Schema
200 OK The download succeeded. None

Response Headers

Status Header Type Format Description
200 Content-Disposition string Contains an auto generated filename for this download ("attachment;filename=model--version-.zip").

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

PATCH /api/v2/customModels/{customModelId}/trainingData/

Assigns training data from provided dataset to provided Custom Inference Model. For each of custom model's deployments the training data from the specified project is used as baseline, this will enable turning drift tracking on for those deployments.

Code samples

# You can also use wget
curl -X PATCH http://10.97.68.125/api/v2/customModels/{customModelId}/trainingData/ \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {access-token}'

Body parameter

{
  "datasetId": "string",
  "datasetName": "string",
  "datasetVersionId": "string",
  "partitionColumn": "string"
}

Parameters

Name In Type Required Description
customModelId path string true ID of the custom model.
body body DeprecatedTrainingDataAssignment false none

Responses

Status Meaning Description Schema
202 Accepted The request was accepted and will be worked on. None
409 Conflict Custom model has assigned training data already and is deployed. None
410 Gone The requested Dataset has been deleted. None
422 Unprocessable Entity Dataset ingest must finish before assigning training data or provided dataset is incompatible with the custom model. None

Response Headers

Status Header Type Format Description
202 Location string URL to poll to track the training data assignment has finished.

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

GET /api/v2/customModels/{customModelId}/versions/

List custom model versions.

Code samples

# You can also use wget
curl -X GET http://10.97.68.125/api/v2/customModels/{customModelId}/versions/?offset=0&limit=1000 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
offset query integer true This many results will be skipped.
limit query integer true At most this many results are returned.
mainBranchCommitSha query string false Specifies the commit SHA-1 in GitHub repository from the main branch that corresponds to a given custom model version.
customModelId path string true ID of the custom model.

Example responses

200 Response

{
  "count": 0,
  "data": [
    {
      "baseEnvironmentId": "string",
      "baseEnvironmentVersionId": "string",
      "created": "string",
      "customModelId": "string",
      "dependencies": [
        {
          "constraints": [
            {
              "constraintType": "<",
              "version": "string"
            }
          ],
          "extras": "string",
          "line": "string",
          "lineNumber": 0,
          "packageName": "string"
        }
      ],
      "description": "string",
      "desiredMemory": 134217728,
      "id": "string",
      "isFrozen": true,
      "items": [
        {
          "commitSha": "string",
          "created": "string",
          "fileName": "string",
          "filePath": "string",
          "fileSource": "string",
          "id": "string",
          "ref": "string",
          "repositoryFilePath": "string",
          "repositoryLocation": "string",
          "repositoryName": "string",
          "storagePath": "string",
          "workspaceId": "string"
        }
      ],
      "label": "string",
      "maximumMemory": 134217728,
      "networkEgressPolicy": "NONE",
      "replicas": 0,
      "requiredMetadata": {},
      "requiredMetadataValues": [
        {
          "fieldName": "string",
          "value": "string"
        }
      ],
      "requiresHa": true,
      "versionMajor": 0,
      "versionMinor": 0
    }
  ],
  "next": "http://example.com",
  "previous": "http://example.com",
  "totalCount": 0
}

Responses

Status Meaning Description Schema
200 OK OK. CustomModelVersionListResponse
400 Bad Request Query parameters are invalid. None
422 Unprocessable Entity Input parameters are invalid. None

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

PATCH /api/v2/customModels/{customModelId}/versions/

Create a new custom model version with files added, replaced or deleted. Files from the previous version of a custom models will be used as a basis.

Code samples

# You can also use wget
curl -X PATCH http://10.97.68.125/api/v2/customModels/{customModelId}/versions/ \
  -H 'Content-Type: multipart/form-data' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Body parameter

baseEnvironmentId: string
desiredMemory: 134217728
file: string
filePath: string
filesToDelete: string
isMajorUpdate: "false"
maximumMemory: 134217728
networkEgressPolicy: NONE
replicas: 0
requiredMetadata: string
requiredMetadataValues: string
requiresHa: true

Parameters

Name In Type Required Description
customModelId path string true ID of the custom model.
body body CustomModelVersionCreateFromLatest false none

Example responses

201 Response

{
  "baseEnvironmentId": "string",
  "baseEnvironmentVersionId": "string",
  "created": "string",
  "customModelId": "string",
  "dependencies": [
    {
      "constraints": [
        {
          "constraintType": "<",
          "version": "string"
        }
      ],
      "extras": "string",
      "line": "string",
      "lineNumber": 0,
      "packageName": "string"
    }
  ],
  "description": "string",
  "desiredMemory": 134217728,
  "id": "string",
  "isFrozen": true,
  "items": [
    {
      "commitSha": "string",
      "created": "string",
      "fileName": "string",
      "filePath": "string",
      "fileSource": "string",
      "id": "string",
      "ref": "string",
      "repositoryFilePath": "string",
      "repositoryLocation": "string",
      "repositoryName": "string",
      "storagePath": "string",
      "workspaceId": "string"
    }
  ],
  "label": "string",
  "maximumMemory": 134217728,
  "networkEgressPolicy": "NONE",
  "replicas": 0,
  "requiredMetadata": {},
  "requiredMetadataValues": [
    {
      "fieldName": "string",
      "value": "string"
    }
  ],
  "requiresHa": true,
  "versionMajor": 0,
  "versionMinor": 0
}

Responses

Status Meaning Description Schema
201 Created Item successfully created. CustomModelVersionResponse
413 Payload Too Large Item or collection of items was too large in size (bytes). None
422 Unprocessable Entity Cannot create the custom task version due to one or more errors. All error responses will have a "message" field and some may have optional fields. The optional fields include: ["errors", "dependencies", "invalidDependencies"] None

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

POST /api/v2/customModels/{customModelId}/versions/

Create a new custom model version with attached files if supplied.

Code samples

# You can also use wget
curl -X POST http://10.97.68.125/api/v2/customModels/{customModelId}/versions/ \
  -H 'Content-Type: multipart/form-data' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Body parameter

baseEnvironmentId: string
baseEnvironmentVersionId: string
desiredMemory: 134217728
file: string
filePath: string
isMajorUpdate: "false"
maximumMemory: 134217728
networkEgressPolicy: NONE
replicas: 0
requiredMetadata: string
requiredMetadataValues: string
requiresHa: true

Parameters

Name In Type Required Description
customModelId path string true ID of the custom model.
body body CustomModelVersionCreateWithEnvironmentVersion false none

Example responses

201 Response

{
  "baseEnvironmentId": "string",
  "baseEnvironmentVersionId": "string",
  "created": "string",
  "customModelId": "string",
  "dependencies": [
    {
      "constraints": [
        {
          "constraintType": "<",
          "version": "string"
        }
      ],
      "extras": "string",
      "line": "string",
      "lineNumber": 0,
      "packageName": "string"
    }
  ],
  "description": "string",
  "desiredMemory": 134217728,
  "id": "string",
  "isFrozen": true,
  "items": [
    {
      "commitSha": "string",
      "created": "string",
      "fileName": "string",
      "filePath": "string",
      "fileSource": "string",
      "id": "string",
      "ref": "string",
      "repositoryFilePath": "string",
      "repositoryLocation": "string",
      "repositoryName": "string",
      "storagePath": "string",
      "workspaceId": "string"
    }
  ],
  "label": "string",
  "maximumMemory": 134217728,
  "networkEgressPolicy": "NONE",
  "replicas": 0,
  "requiredMetadata": {},
  "requiredMetadataValues": [
    {
      "fieldName": "string",
      "value": "string"
    }
  ],
  "requiresHa": true,
  "versionMajor": 0,
  "versionMinor": 0
}

Responses

Status Meaning Description Schema
201 Created Item successfully created. CustomModelVersionResponse
413 Payload Too Large Item or collection of items was too large in size (bytes). None
422 Unprocessable Entity Cannot create the custom task version due to one or more errors. All error responses will have a "message" field and some may have optional fields. The optional fields include: ["errors", "dependencies", "invalidDependencies"] None

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

PATCH /api/v2/customModels/{customModelId}/versions/fromRepository/

Create a new custom model version with files added from a remote repository. Files from the previous version of a custom models will be used as a basis.

Code samples

# You can also use wget
curl -X PATCH http://10.97.68.125/api/v2/customModels/{customModelId}/versions/fromRepository/ \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {access-token}'

Body parameter

{
  "baseEnvironmentId": "string",
  "isMajorUpdate": true,
  "ref": "string",
  "repositoryId": "string",
  "requiredMetadata": {},
  "requiredMetadataValues": [
    {
      "fieldName": "string",
      "value": "string"
    }
  ],
  "sourcePath": "string"
}

Parameters

Name In Type Required Description
customModelId path string true ID of the custom model.
body body CustomModelVersionCreateFromRepository false none

Responses

Status Meaning Description Schema
202 Accepted Accepted: request placed to a queue for processing. None
422 Unprocessable Entity Custom Model version cannot be created: (1) input parameters are invalid, (2) if user does not have permission to create legacy conversion environment. 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

POST /api/v2/customModels/{customModelId}/versions/fromRepository/

Create a new custom model version with only files added from the specified remote repository.

Code samples

# You can also use wget
curl -X POST http://10.97.68.125/api/v2/customModels/{customModelId}/versions/fromRepository/ \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {access-token}'

Body parameter

{
  "baseEnvironmentId": "string",
  "isMajorUpdate": true,
  "ref": "string",
  "repositoryId": "string",
  "requiredMetadata": {},
  "requiredMetadataValues": [
    {
      "fieldName": "string",
      "value": "string"
    }
  ],
  "sourcePath": "string"
}

Parameters

Name In Type Required Description
customModelId path string true ID of the custom model.
body body CustomModelVersionCreateFromRepository false none

Responses

Status Meaning Description Schema
202 Accepted Accepted: request placed to a queue for processing. None
422 Unprocessable Entity Custom Model version cannot be created: (1) input parameters are invalid, (2) if user does not have permission to create legacy conversion environment. 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

GET /api/v2/customModels/{customModelId}/versions/{customModelVersionId}/

Display a requested version of a custom model along with the files attached to it.

Code samples

# You can also use wget
curl -X GET http://10.97.68.125/api/v2/customModels/{customModelId}/versions/{customModelVersionId}/ \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
customModelId path string true ID of the custom model.
customModelVersionId path string true ID of the custom model version.

Example responses

200 Response

{
  "baseEnvironmentId": "string",
  "baseEnvironmentVersionId": "string",
  "created": "string",
  "customModelId": "string",
  "dependencies": [
    {
      "constraints": [
        {
          "constraintType": "<",
          "version": "string"
        }
      ],
      "extras": "string",
      "line": "string",
      "lineNumber": 0,
      "packageName": "string"
    }
  ],
  "description": "string",
  "desiredMemory": 134217728,
  "id": "string",
  "isFrozen": true,
  "items": [
    {
      "commitSha": "string",
      "created": "string",
      "fileName": "string",
      "filePath": "string",
      "fileSource": "string",
      "id": "string",
      "ref": "string",
      "repositoryFilePath": "string",
      "repositoryLocation": "string",
      "repositoryName": "string",
      "storagePath": "string",
      "workspaceId": "string"
    }
  ],
  "label": "string",
  "maximumMemory": 134217728,
  "networkEgressPolicy": "NONE",
  "replicas": 0,
  "requiredMetadata": {},
  "requiredMetadataValues": [
    {
      "fieldName": "string",
      "value": "string"
    }
  ],
  "requiresHa": true,
  "versionMajor": 0,
  "versionMinor": 0
}

Responses

Status Meaning Description Schema
200 OK OK. CustomModelVersionResponse

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

PATCH /api/v2/customModels/{customModelId}/versions/{customModelVersionId}/

Edit metadata of a specific model version.

Code samples

# You can also use wget
curl -X PATCH http://10.97.68.125/api/v2/customModels/{customModelId}/versions/{customModelVersionId}/ \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Body parameter

{
  "description": "string",
  "requiredMetadata": {},
  "requiredMetadataValues": [
    {
      "fieldName": "string",
      "value": "string"
    }
  ]
}

Parameters

Name In Type Required Description
customModelId path string true ID of the custom model.
customModelVersionId path string true ID of the custom model version.
body body CustomModelVersionMetadataUpdate false none

Example responses

200 Response

{
  "baseEnvironmentId": "string",
  "baseEnvironmentVersionId": "string",
  "created": "string",
  "customModelId": "string",
  "dependencies": [
    {
      "constraints": [
        {
          "constraintType": "<",
          "version": "string"
        }
      ],
      "extras": "string",
      "line": "string",
      "lineNumber": 0,
      "packageName": "string"
    }
  ],
  "description": "string",
  "desiredMemory": 134217728,
  "id": "string",
  "isFrozen": true,
  "items": [
    {
      "commitSha": "string",
      "created": "string",
      "fileName": "string",
      "filePath": "string",
      "fileSource": "string",
      "id": "string",
      "ref": "string",
      "repositoryFilePath": "string",
      "repositoryLocation": "string",
      "repositoryName": "string",
      "storagePath": "string",
      "workspaceId": "string"
    }
  ],
  "label": "string",
  "maximumMemory": 134217728,
  "networkEgressPolicy": "NONE",
  "replicas": 0,
  "requiredMetadata": {},
  "requiredMetadataValues": [
    {
      "fieldName": "string",
      "value": "string"
    }
  ],
  "requiresHa": true,
  "versionMajor": 0,
  "versionMinor": 0
}

Responses

Status Meaning Description Schema
200 OK The edit was successful. CustomModelVersionResponse
404 Not Found Custom model not found or user does not have edit permissions. None
422 Unprocessable Entity Cannot update custom model metadata. None

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

GET /api/v2/customModels/{customModelId}/versions/{customModelVersionId}/conversions/

Get the list of custom model conversions that are associated with the given custom model. Alternatively, it can return a single item list of the latest custom model conversion that is associated with the given custom model version.

Code samples

# You can also use wget
curl -X GET http://10.97.68.125/api/v2/customModels/{customModelId}/versions/{customModelVersionId}/conversions/?offset=0&limit=1000 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
offset query integer true This many results will be skipped.
limit query integer true At most this many results are returned.
isLatest query string false Whether to return only the latest associated custom model conversion or all of the associated ones.
customModelId path string true ID of the custom model.
customModelVersionId path string true ID of the custom model version.

Enumerated Values

Parameter Value
isLatest false
isLatest False
isLatest true
isLatest True

Example responses

200 Response

{
  "count": 0,
  "data": [
    {
      "conversionInProgress": true,
      "conversionSucceeded": true,
      "created": "string",
      "customModelVersionId": "string",
      "generatedMetadata": {
        "outputColumns": [
          [
            "string"
          ]
        ],
        "outputDatasets": [
          "string"
        ]
      },
      "id": "string",
      "logMessage": "string",
      "mainProgramItemId": "string",
      "shouldStop": false
    }
  ],
  "next": "http://example.com",
  "previous": "http://example.com",
  "totalCount": 0
}

Responses

Status Meaning Description Schema
200 OK none ConversionListResponse

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

POST /api/v2/customModels/{customModelId}/versions/{customModelVersionId}/conversions/

Converts files in the given custom model version to a JAR file.

Code samples

# You can also use wget
curl -X POST http://10.97.68.125/api/v2/customModels/{customModelId}/versions/{customModelVersionId}/conversions/ \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Body parameter

{
  "mainProgramItemId": "string"
}

Parameters

Name In Type Required Description
customModelId path string true ID of the custom model.
customModelVersionId path string true ID of the custom model version.
body body ConversionCreateQuery false none

Example responses

202 Response

{
  "conversionId": "string",
  "statusId": "string"
}

Responses

Status Meaning Description Schema
202 Accepted The request was accepted and will be worked on. CustomModelConversionAsyncOperationResponse
422 Unprocessable Entity Input parameters are invalid. None

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

DELETE /api/v2/customModels/{customModelId}/versions/{customModelVersionId}/conversions/{conversionId}/

Stop a running conversion for given model and model version.

Code samples

# You can also use wget
curl -X DELETE http://10.97.68.125/api/v2/customModels/{customModelId}/versions/{customModelVersionId}/conversions/{conversionId}/ \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
customModelId path string true ID of the custom model.
customModelVersionId path string true ID of the custom model version.
conversionId path string true ID of the custom model conversion.

Responses

Status Meaning Description Schema
204 No Content none None
422 Unprocessable Entity The given conversion is not active. None

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

GET /api/v2/customModels/{customModelId}/versions/{customModelVersionId}/conversions/{conversionId}/

Get a given custom model conversion.

Code samples

# You can also use wget
curl -X GET http://10.97.68.125/api/v2/customModels/{customModelId}/versions/{customModelVersionId}/conversions/{conversionId}/ \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
customModelId path string true ID of the custom model.
customModelVersionId path string true ID of the custom model version.
conversionId path string true ID of the custom model conversion.

Example responses

200 Response

{
  "conversionInProgress": true,
  "conversionSucceeded": true,
  "created": "string",
  "customModelVersionId": "string",
  "generatedMetadata": {
    "outputColumns": [
      [
        "string"
      ]
    ],
    "outputDatasets": [
      "string"
    ]
  },
  "id": "string",
  "logMessage": "string",
  "mainProgramItemId": "string",
  "shouldStop": false
}

Responses

Status Meaning Description Schema
200 OK none ConversionResponse

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

GET /api/v2/customModels/{customModelId}/versions/{customModelVersionId}/download/

Download a specific item bundle from a custom model as a zip compressed archive.

Code samples

# You can also use wget
curl -X GET http://10.97.68.125/api/v2/customModels/{customModelId}/versions/{customModelVersionId}/download/ \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
pps query string false Download model version from PPS tab.If "true" specified, model archive includes dependencies install script. If "false" specified, dependencies script is not included. If not specified -> "false" behavior.
customModelId path string true ID of the custom model.
customModelVersionId path string true ID of the custom model version.

Enumerated Values

Parameter Value
pps false
pps False
pps true
pps True

Responses

Status Meaning Description Schema
200 OK The download succeeded. None

Response Headers

Status Header Type Format Description
200 Content-Disposition string Contains an auto generated filename for this download ("attachment;filename=model--version-.zip").

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

GET /api/v2/customModels/{customModelId}/versions/{customModelVersionId}/featureImpact/

Retrieve feature impact scores for features in a custom inference model image.

This route is a counterpart of a corresponding endpoint for native models: GET /api/v2/projects/{projectId}/models/{modelId}/featureImpact/

Code samples

# You can also use wget
curl -X GET http://10.97.68.125/api/v2/customModels/{customModelId}/versions/{customModelVersionId}/featureImpact/ \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
customModelId path string true ID of the custom model.
customModelVersionId path string true ID of the custom model version.

Example responses

200 Response

{
  "count": 0,
  "featureImpacts": [
    {
      "featureName": "string",
      "impactNormalized": 1,
      "impactUnnormalized": 0,
      "redundantWith": "string"
    }
  ],
  "next": "http://example.com",
  "previous": "http://example.com",
  "ranRedundancyDetection": true,
  "rowCount": 0,
  "shapBased": true
}

Responses

Status Meaning Description Schema
200 OK Custom model feature impact returned. FeatureImpactResponse
404 Not Found No feature impact data found for custom model. None
422 Unprocessable Entity Cannot retrieve feature impact scores: (1) if custom model is not an inference model, (2) if training data is not assigned, (3) if feature impact job is in progress for custom model. None

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

POST /api/v2/customModels/{customModelId}/versions/{customModelVersionId}/featureImpact/

Add a request to calculate feature impact for a custom inference model image to the queue.

This route is a counterpart of a corresponding endpoint for native models: POST /api/v2/projects/{projectId}/models/{modelId}/featureImpact/

Code samples

# You can also use wget
curl -X POST http://10.97.68.125/api/v2/customModels/{customModelId}/versions/{customModelVersionId}/featureImpact/ \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Body parameter

{
  "rowCount": 10
}

Parameters

Name In Type Required Description
customModelId path string true ID of the custom model.
customModelVersionId path string true ID of the custom model version.
body body FeatureImpactCreatePayload false none

Example responses

202 Response

{
  "statusId": "string"
}

Responses

Status Meaning Description Schema
202 Accepted Feature impact request has been successfully submitted. FeatureImpactCreateResponse
404 Not Found If feature impact has already been submitted. The response will include jobId property which can be used for tracking its progress. None
422 Unprocessable Entity If job cannot be submitted because of invalid input or model state: (1) if image id does not correspond to a custom inference model, (2) if training data is not yet assigned or assignment is in progress, (3) if the rowCount exceeds the minimum or maximum value for this model's training data. None

Response Headers

Status Header Type Format Description
202 Location string Contains a url for tracking job status: GET /api/v2/status/{statusId}/.

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

POST /api/v2/customModels/{customModelId}/versions/{customModelVersionId}/predictionExplanationsInitialization/

Create a new prediction explanations initialization for custom model version. This is a necessary prerequisite for generating prediction explanations.

Code samples

# You can also use wget
curl -X POST http://10.97.68.125/api/v2/customModels/{customModelId}/versions/{customModelVersionId}/predictionExplanationsInitialization/ \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name In Type Required Description
customModelId path string true ID of the custom model.
customModelVersionId path string true ID of the custom model version.

Responses

Status Meaning Description Schema
202 Accepted The request was accepted and will be worked on. None
422 Unprocessable Entity Specified custom model is not valid for prediction explanations. None

Response Headers

Status Header Type Format Description
202 Location string URL to poll to track the prediction explanation initialization has finished.

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

Schemas

ConversionCreateQuery

{
  "mainProgramItemId": "string"
}

Properties

Name Type Required Restrictions Description
mainProgramItemId string true none The main program file item ID.

ConversionListResponse

{
  "count": 0,
  "data": [
    {
      "conversionInProgress": true,
      "conversionSucceeded": true,
      "created": "string",
      "customModelVersionId": "string",
      "generatedMetadata": {
        "outputColumns": [
          [
            "string"
          ]
        ],
        "outputDatasets": [
          "string"
        ]
      },
      "id": "string",
      "logMessage": "string",
      "mainProgramItemId": "string",
      "shouldStop": false
    }
  ],
  "next": "http://example.com",
  "previous": "http://example.com",
  "totalCount": 0
}

Properties

Name Type Required Restrictions Description
count integer false none Number of items returned on this page.
data [ConversionResponse] true none List of custom model conversions.
next string(uri)¦null true none URL pointing to the next page (if null, there is no next page).
previous string(uri)¦null true none URL pointing to the previous page (if null, there is no previous page).
totalCount integer true none The total number of items across all pages.

ConversionResponse

{
  "conversionInProgress": true,
  "conversionSucceeded": true,
  "created": "string",
  "customModelVersionId": "string",
  "generatedMetadata": {
    "outputColumns": [
      [
        "string"
      ]
    ],
    "outputDatasets": [
      "string"
    ]
  },
  "id": "string",
  "logMessage": "string",
  "mainProgramItemId": "string",
  "shouldStop": false
}

Properties

Name Type Required Restrictions Description
conversionInProgress boolean¦null false none Whether a custom model conversion is in progress or not.
conversionSucceeded boolean¦null false none Indication for a successful custom model conversion.
created string true none ISO-8601 timestamp of when the custom model conversion created.
customModelVersionId string true none ID of the custom model version.
generatedMetadata GeneratedMetadata false none Custom model conversion output metadata.
id string true none ID of the custom model version.
logMessage string¦null false none The output log message from the custom model conversion process.
mainProgramItemId string¦null false none The main program file item ID.
shouldStop boolean false none Whether the user requested to stop the given conversion.

CustomModelAccessControlListResponse

{
  "count": 0,
  "data": [
    {
      "canShare": true,
      "role": "string",
      "userId": "string",
      "username": "string"
    }
  ],
  "next": "http://example.com",
  "previous": "http://example.com"
}

Properties

Name Type Required Restrictions Description
count integer true none Number of items in current page.
data [CustomModelAccessControlResponse] true none List of the requested custom model access control entries.
next string(uri)¦null true none URL pointing to the next page (if null, there is no next page)
previous string(uri)¦null true none URL pointing to the previous page (if null, there is no previous page

CustomModelAccessControlResponse

{
  "canShare": true,
  "role": "string",
  "userId": "string",
  "username": "string"
}

Properties

Name Type Required Restrictions Description
canShare boolean true none Whether this user can share this custom model
role string true none This users role.
userId string true none This user's userId.
username string true none The username for this user's entry.

CustomModelAccessControlUpdateResponse

{
  "data": [
    {
      "canShare": true,
      "role": "string",
      "userId": "string",
      "username": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
data [CustomModelAccessControlResponse] true none Roles were successfully updated.

CustomModelAsyncOperationResponse

{
  "statusId": "string"
}

Properties

Name Type Required Restrictions Description
statusId string true none ID that can be used with GET /api/v2/status/{statusId}/ to poll for the testing job's status

CustomModelConversionAsyncOperationResponse

{
  "conversionId": "string",
  "statusId": "string"
}

Properties

Name Type Required Restrictions Description
conversionId string true none ID that can be used to stop a given conversion.
statusId string true none ID that can be used with GET /api/v2/status/{statusId}/ to poll for the testing job's status

CustomModelCopy

{
  "customModelId": "string"
}

Properties

Name Type Required Restrictions Description
customModelId string true none ID of the custom model to copy.

CustomModelCreate

{
  "calibratePredictions": "True",
  "classLabels": [
    "string"
  ],
  "customModelType": "training",
  "description": "string",
  "desiredMemory": 134217728,
  "language": "string",
  "maximumMemory": 134217728,
  "name": "string",
  "negativeClassLabel": "string",
  "networkEgressPolicy": "NONE",
  "positiveClassLabel": "string",
  "predictionThreshold": 0.5,
  "replicas": 0,
  "requiresHa": true,
  "supportsBinaryClassification": true,
  "supportsRegression": true,
  "targetName": "string",
  "targetType": "Binary",
  "userProvidedId": "string"
}

Properties

Name Type Required Restrictions Description
calibratePredictions boolean false none Whether model predictions should be calibrated by DataRobot.Only applies to anomaly detection training tasks; we recommend this if you have not already included calibration in your model code.Calibration improves the probability estimates of a model, and modifies the predictions of non-probabilistic models to be interpretable as probabilities. This will facilitate comparison to DataRobot models, and give access to ROC curve insights on external data.
classLabels [string] false none The class labels for multiclass classification. Required for multiclass inference models. If using one of the [DataRobot] base environments and your model produces an ndarray of unlabeled class probabilities, the order of the labels should match the order of the predicted output
customModelType string true none The type of custom model.
description string false none The user-friendly description of the model.
desiredMemory integer¦null false none The amount of memory that is expected to be allocated by the custom model.
language string false none Programming language name in which model is written.
maximumMemory integer¦null false none The maximum memory that might be allocated by the custom-model. If exceeded, the custom-model will be killed
name string true none The user-friendly name for the model.
negativeClassLabel string¦null false none The negative class label for custom models that support binary classification. If specified, positiveClassLabel must also be specified. Default value is "0".
networkEgressPolicy string¦null false none Network egress policy.
positiveClassLabel string¦null false none The positive class label for custom models that support binary classification. If specified, negativeClassLabel must also be specified. Default value is "1".
predictionThreshold number false none The prediction threshold which will be used for binary classification custom model.
replicas integer¦null false none A fixed number of replicas that will be set for the given custom-model.
requiresHa boolean¦null false none Require all custom model replicas to be deployed on different Kubernetes nodes for predictions fault tolerance.
supportsBinaryClassification boolean false none Whether the model supports binary classification.
supportsRegression boolean false none Whether the model supports regression.
targetName string¦null false none The name of the target for labeling predictions. Required for model type 'inference'. Specifying this value for a model type 'training' will result in an error.
targetType string false none The target type of the custom model
userProvidedId string false none A user-provided unique ID associated with the given custom inference model.

Enumerated Values

Property Value
customModelType training
customModelType inference
networkEgressPolicy NONE
networkEgressPolicy DR_API_ACCESS
networkEgressPolicy PUBLIC
targetType Binary
targetType Regression
targetType Multiclass
targetType Anomaly
targetType Transform
targetType Unstructured

CustomModelDeploymentListResponse

{
  "count": 0,
  "data": [
    {
      "customModel": {
        "id": "string",
        "name": "string"
      },
      "customModelImageId": "string",
      "customModelVersion": {
        "id": "string",
        "label": "string"
      },
      "deployed": "string",
      "deployedBy": "string",
      "executionEnvironment": {
        "id": "string",
        "name": "string"
      },
      "executionEnvironmentVersion": {
        "id": "string",
        "label": "string"
      },
      "id": "string",
      "imageType": "customModelImage",
      "label": "string",
      "status": "active",
      "testingStatus": "not_tested"
    }
  ],
  "next": "http://example.com",
  "previous": "http://example.com",
  "totalCount": 0
}

Properties

Name Type Required Restrictions Description
count integer false none Number of items returned on this page.
data [CustomModelDeploymentResponse] true none List of custom model deployments.
next string(uri)¦null true none URL pointing to the next page (if null, there is no next page).
previous string(uri)¦null true none URL pointing to the previous page (if null, there is no previous page).
totalCount integer true none The total number of items across all pages.

CustomModelDeploymentResponse

{
  "customModel": {
    "id": "string",
    "name": "string"
  },
  "customModelImageId": "string",
  "customModelVersion": {
    "id": "string",
    "label": "string"
  },
  "deployed": "string",
  "deployedBy": "string",
  "executionEnvironment": {
    "id": "string",
    "name": "string"
  },
  "executionEnvironmentVersion": {
    "id": "string",
    "label": "string"
  },
  "id": "string",
  "imageType": "customModelImage",
  "label": "string",
  "status": "active",
  "testingStatus": "not_tested"
}

Properties

Name Type Required Restrictions Description
customModel CustomModelShortResponse true none Custom model associated with this deployment.
customModelImageId string true none The id of the custom model image associated with this deployment.
customModelVersion CustomModelVersionShortResponse true none Custom model version associated with this deployment.
deployed string true none ISO-8601 timestamp of when deployment was created.
deployedBy string true none The username of the user that deployed the custom model.
executionEnvironment ExecutionEnvironmentShortResponse true none Execution environment associated with this deployment.
executionEnvironmentVersion ExecutionEnvironmentVersionShortResponse true none Execution environment version associated with this deployment.
id string true none The ID of the deployment.
imageType string false none The type of the image, either customModelImage if the testing attempt is using a customModelImage as its model or customModelVersion if the testing attempt is using a customModelVersion with dependency management.
label string true none User-friendly name of the model deployment.
status string true none Deployment status.
testingStatus string true none Latest testing status of the deployed custom model image.

Enumerated Values

Property Value
imageType customModelImage
imageType customModelVersion
status active
status archived
status errored
status inactive
status launching
status replacingModel
status stopping
testingStatus not_tested
testingStatus queued
testingStatus failed
testingStatus canceled
testingStatus succeeded
testingStatus in_progress
testingStatus aborted
testingStatus warning
testingStatus skipped

CustomModelListResponse

{
  "count": 0,
  "data": [
    {
      "calibratePredictions": true,
      "classLabels": [
        "string"
      ],
      "created": "string",
      "createdBy": "string",
      "customModelType": "training",
      "deploymentsCount": 0,
      "description": "string",
      "desiredMemory": 134217728,
      "id": "string",
      "language": "string",
      "latestVersion": {
        "baseEnvironmentId": "string",
        "baseEnvironmentVersionId": "string",
        "created": "string",
        "customModelId": "string",
        "dependencies": [
          {
            "constraints": [
              {
                "constraintType": "<",
                "version": "string"
              }
            ],
            "extras": "string",
            "line": "string",
            "lineNumber": 0,
            "packageName": "string"
          }
        ],
        "description": "string",
        "desiredMemory": 134217728,
        "id": "string",
        "isFrozen": true,
        "items": [
          {
            "commitSha": "string",
            "created": "string",
            "fileName": "string",
            "filePath": "string",
            "fileSource": "string",
            "id": "string",
            "ref": "string",
            "repositoryFilePath": "string",
            "repositoryLocation": "string",
            "repositoryName": "string",
            "storagePath": "string",
            "workspaceId": "string"
          }
        ],
        "label": "string",
        "maximumMemory": 134217728,
        "networkEgressPolicy": "NONE",
        "replicas": 0,
        "requiredMetadata": {},
        "requiredMetadataValues": [
          {
            "fieldName": "string",
            "value": "string"
          }
        ],
        "requiresHa": true,
        "versionMajor": 0,
        "versionMinor": 0
      },
      "maximumMemory": 134217728,
      "name": "string",
      "negativeClassLabel": "string",
      "networkEgressPolicy": "NONE",
      "positiveClassLabel": "string",
      "predictionThreshold": 0,
      "replicas": 0,
      "requiresHa": true,
      "supportsAnomalyDetection": true,
      "supportsBinaryClassification": true,
      "supportsRegression": true,
      "targetName": "string",
      "targetType": "Binary",
      "trainingDataAssignmentInProgress": true,
      "trainingDataFileName": "string",
      "trainingDataPartitionColumn": "string",
      "trainingDatasetId": "string",
      "trainingDatasetVersionId": "string",
      "updated": "string",
      "userProvidedId": "string"
    }
  ],
  "next": "http://example.com",
  "previous": "http://example.com",
  "totalCount": 0
}

Properties

Name Type Required Restrictions Description
count integer false none Number of items returned on this page.
data [CustomModelResponse] true none List of custom models.
next string(uri)¦null true none URL pointing to the next page (if null, there is no next page).
previous string(uri)¦null true none URL pointing to the previous page (if null, there is no previous page).
totalCount integer true none The total number of items across all pages.

CustomModelPredictionExplanations

{
  "customModelId": "string",
  "customModelVersionId": "string",
  "environmentId": "string",
  "environmentVersionId": "string"
}

Properties

Name Type Required Restrictions Description
customModelId string true none ID of the custom model.
customModelVersionId string true none ID of the custom model version.
environmentId string false none The ID of environment to use. If not specified, the customModelVersion's dependency environment will be used.
environmentVersionId string false none The ID of environment version to use. Defaults to the latest successfully built version.

CustomModelResourceLimits

{
  "desiredCustomModelContainerSize": 134217728,
  "maxCustomModelContainerSize": 134217728,
  "maxCustomModelReplicasPerDeployment": 0,
  "maxCustomModelTestingParallelUsers": 0
}

Properties

Name Type Required Restrictions Description
desiredCustomModelContainerSize integer¦null false none The maximum memory that might be allocated by the custom-model. If exceeded, the custom-model will be killed
maxCustomModelContainerSize integer¦null false none The maximum memory that might be allocated by the custom-model. If exceeded, the custom-model will be killed
maxCustomModelReplicasPerDeployment integer¦null false none A fixed number of replicas that will be set for the given custom-model.
maxCustomModelTestingParallelUsers integer true none The maximum number of parallel users that can be used for Custom Model Testing checks

CustomModelResponse

{
  "calibratePredictions": true,
  "classLabels": [
    "string"
  ],
  "created": "string",
  "createdBy": "string",
  "customModelType": "training",
  "deploymentsCount": 0,
  "description": "string",
  "desiredMemory": 134217728,
  "id": "string",
  "language": "string",
  "latestVersion": {
    "baseEnvironmentId": "string",
    "baseEnvironmentVersionId": "string",
    "created": "string",
    "customModelId": "string",
    "dependencies": [
      {
        "constraints": [
          {
            "constraintType": "<",
            "version": "string"
          }
        ],
        "extras": "string",
        "line": "string",
        "lineNumber": 0,
        "packageName": "string"
      }
    ],
    "description": "string",
    "desiredMemory": 134217728,
    "id": "string",
    "isFrozen": true,
    "items": [
      {
        "commitSha": "string",
        "created": "string",
        "fileName": "string",
        "filePath": "string",
        "fileSource": "string",
        "id": "string",
        "ref": "string",
        "repositoryFilePath": "string",
        "repositoryLocation": "string",
        "repositoryName": "string",
        "storagePath": "string",
        "workspaceId": "string"
      }
    ],
    "label": "string",
    "maximumMemory": 134217728,
    "networkEgressPolicy": "NONE",
    "replicas": 0,
    "requiredMetadata": {},
    "requiredMetadataValues": [
      {
        "fieldName": "string",
        "value": "string"
      }
    ],
    "requiresHa": true,
    "versionMajor": 0,
    "versionMinor": 0
  },
  "maximumMemory": 134217728,
  "name": "string",
  "negativeClassLabel": "string",
  "networkEgressPolicy": "NONE",
  "positiveClassLabel": "string",
  "predictionThreshold": 0,
  "replicas": 0,
  "requiresHa": true,
  "supportsAnomalyDetection": true,
  "supportsBinaryClassification": true,
  "supportsRegression": true,
  "targetName": "string",
  "targetType": "Binary",
  "trainingDataAssignmentInProgress": true,
  "trainingDataFileName": "string",
  "trainingDataPartitionColumn": "string",
  "trainingDatasetId": "string",
  "trainingDatasetVersionId": "string",
  "updated": "string",
  "userProvidedId": "string"
}

Properties

Name Type Required Restrictions Description
calibratePredictions boolean false none Determines whether ot not predictions should be calibrated by DataRobot.Only applies to anomaly detection.
classLabels [string] false none If the model is a multiclass classifier, these are the model's class labels
created string true none ISO-8601 timestamp of when the model was created.
createdBy string true none The username of the custom model creator.
customModelType string false none The type of custom model.
deploymentsCount integer true none The number of models deployed.
description string true none The description of the model.
desiredMemory integer¦null false none The amount of memory that is expected to be allocated by the custom model.
id string true none The ID of the custom model.
language string true none The programming language used to write the model.
latestVersion CustomModelVersionResponse true none The latest version for the custom model (if this field is empty, the model is not ready for use).
maximumMemory integer¦null false none The maximum memory that might be allocated by the custom-model. If exceeded, the custom-model will be killed
name string true none The name of the model.
negativeClassLabel string false none If the model is a binary classifier, this is the negative class label.
networkEgressPolicy string¦null false none Network egress policy.
positiveClassLabel string false none If the model is a binary classifier, this is the positive class label.
predictionThreshold number false none If the model is a binary classifier, this is the prediction threshold.
replicas integer¦null false none A fixed number of replicas that will be set for the given custom-model.
requiresHa boolean¦null false none Require all custom model replicas to be deployed on different Kubernetes nodes for predictions fault tolerance.
supportsAnomalyDetection boolean false none Whether the model supports anomaly detection.
supportsBinaryClassification boolean true none Whether the model supports binary classification.
supportsRegression boolean true none Whether the model supports regression.
targetName string false none The name of the target for labeling predictions.
targetType string true none The target type of custom model.
trainingDataAssignmentInProgress boolean false none Indicates if training data is currently being assigned to the custom model.
trainingDataFileName string¦null false none The name of the file that was used as training data if it was assigned previously.
trainingDataPartitionColumn string¦null false none The name of the column containing the partition assignments in training data if it was assigned previously and partitioning was provided.
trainingDatasetId string¦null false none The ID of the dataset that was used as training data if it was assigned previously.
trainingDatasetVersionId string¦null false none The ID of the dataset version that was used as training data if it was assigned previously.
updated string true none ISO-8601 timestamp of when model was last updated.
userProvidedId string false none A user-provided unique ID associated with the given custom inference model.

Enumerated Values

Property Value
customModelType training
customModelType inference
networkEgressPolicy NONE
networkEgressPolicy DR_API_ACCESS
networkEgressPolicy PUBLIC
targetType Binary
targetType Regression
targetType Multiclass
targetType Anomaly
targetType Transform
targetType Unstructured

CustomModelShortResponse

{
  "id": "string",
  "name": "string"
}

Properties

Name Type Required Restrictions Description
id string true none The ID of the custom model.
name string true none User-friendly name of the model.

CustomModelTesting

{
  "errorCheck": {
    "message": "string",
    "status": "not_tested"
  },
  "longRunningService": {
    "message": "string",
    "status": "not_tested"
  },
  "nullValueImputation": {
    "message": "string",
    "status": "not_tested"
  },
  "sideEffects": {
    "message": "string",
    "status": "not_tested"
  }
}

Properties

Name Type Required Restrictions Description
errorCheck TestingStatus false none Ensures that the model can make predictions on the provided test dataset.
longRunningService TestingStatus false none Ensures that the custom model image can build and launch. If it cannot, the test is marked as Failed and subsequent test are aborted.
nullValueImputation TestingStatus false none Verifies that the model can impute null values. Required for Feature Impact.
sideEffects TestingStatus false none Verifies that predictions made on the dataset match row-wise predictions for the same dataset. Fails if the predictions do not match.

CustomModelTests

{
  "configuration": {
    "errorCheck": "fail",
    "longRunningService": "fail",
    "nullValueImputation": "skip",
    "sideEffects": "skip"
  },
  "customModelId": "string",
  "customModelVersionId": "string",
  "datasetId": "string",
  "datasetVersionId": "string",
  "desiredMemory": 134217728,
  "environmentId": "string",
  "environmentVersionId": "string",
  "maximumMemory": 134217728,
  "networkEgressPolicy": "NONE",
  "replicas": 0,
  "requiresHa": true
}

Properties

Name Type Required Restrictions Description
configuration CustomModelTestsConfig false none Key value map of Testing type and Testing type config.
customModelId string true none The ID of the custom model to test.
customModelVersionId string true none The ID of custom model version to use.
datasetId string false none The ID of the dataset to use for testing. Dataset ID is required for regular (non-unstructured) custom models.
datasetVersionId string false none The ID of the version of the dataset item to use as the testing dataset. Defaults to the latest version.
desiredMemory integer¦null false none The amount of memory that is expected to be allocated by the custom model.
environmentId string false none The ID of environment to use. If not specified, the customModelVersion's dependency environment will be used.
environmentVersionId string false none The ID of environment version to use. Defaults to the latest successfully built version.
maximumMemory integer¦null false none The maximum memory that might be allocated by the custom-model. If exceeded, the custom-model will be killed
networkEgressPolicy string¦null false none Network egress policy.
replicas integer¦null false none A fixed number of replicas that will be set for the given custom-model.
requiresHa boolean¦null false none Require all custom model replicas to be deployed on different Kubernetes nodes for predictions fault tolerance.

Enumerated Values

Property Value
networkEgressPolicy NONE
networkEgressPolicy DR_API_ACCESS
networkEgressPolicy PUBLIC

CustomModelTestsConfig

{
  "errorCheck": "fail",
  "longRunningService": "fail",
  "nullValueImputation": "skip",
  "sideEffects": "skip"
}

Properties

Name Type Required Restrictions Description
errorCheck string false none Ensures that the model can make predictions on the provided test dataset.
longRunningService string false none Ensures that the custom model image can build and launch. If it cannot, the test is marked as Failed and subsequent test are aborted.
nullValueImputation string false none Verifies that the model can impute null values. Required for Feature Impact.
sideEffects string false none Verifies that predictions made on the dataset match row-wise predictions for the same dataset. Fails if the predictions do not match.

Enumerated Values

Property Value
errorCheck fail
errorCheck skip
longRunningService fail
nullValueImputation skip
nullValueImputation warn
nullValueImputation fail
sideEffects skip
sideEffects warn
sideEffects fail

CustomModelTestsListResponse

{
  "count": 0,
  "data": [
    {
      "completedAt": "string",
      "created": "string",
      "createdBy": "string",
      "customModel": {
        "id": "string",
        "name": "string"
      },
      "customModelImageId": "string",
      "customModelVersion": {
        "id": "string",
        "label": "string"
      },
      "datasetId": "string",
      "datasetVersionId": "string",
      "desiredMemory": 134217728,
      "executionEnvironment": {
        "id": "string",
        "name": "string"
      },
      "executionEnvironmentVersion": {
        "id": "string",
        "label": "string"
      },
      "id": "string",
      "imageType": "customModelImage",
      "maximumMemory": 134217728,
      "networkEgressPolicy": "NONE",
      "overallStatus": "not_tested",
      "replicas": 0,
      "requiresHa": true,
      "testingStatus": {
        "errorCheck": {
          "message": "string",
          "status": "not_tested"
        },
        "longRunningService": {
          "message": "string",
          "status": "not_tested"
        },
        "nullValueImputation": {
          "message": "string",
          "status": "not_tested"
        },
        "sideEffects": {
          "message": "string",
          "status": "not_tested"
        }
      }
    }
  ],
  "next": "http://example.com",
  "previous": "http://example.com",
  "totalCount": 0
}

Properties

Name Type Required Restrictions Description
count integer false none Number of items returned on this page.
data [CustomModelTestsResponse] true none List of custom model tests.
next string(uri)¦null true none URL pointing to the next page (if null, there is no next page).
previous string(uri)¦null true none URL pointing to the previous page (if null, there is no previous page).
totalCount integer true none The total number of items across all pages.

CustomModelTestsLogTailResponse

{
  "log": "string"
}

Properties

Name Type Required Restrictions Description
log string true none The N lines of the log.

CustomModelTestsResponse

{
  "completedAt": "string",
  "created": "string",
  "createdBy": "string",
  "customModel": {
    "id": "string",
    "name": "string"
  },
  "customModelImageId": "string",
  "customModelVersion": {
    "id": "string",
    "label": "string"
  },
  "datasetId": "string",
  "datasetVersionId": "string",
  "desiredMemory": 134217728,
  "executionEnvironment": {
    "id": "string",
    "name": "string"
  },
  "executionEnvironmentVersion": {
    "id": "string",
    "label": "string"
  },
  "id": "string",
  "imageType": "customModelImage",
  "maximumMemory": 134217728,
  "networkEgressPolicy": "NONE",
  "overallStatus": "not_tested",
  "replicas": 0,
  "requiresHa": true,
  "testingStatus": {
    "errorCheck": {
      "message": "string",
      "status": "not_tested"
    },
    "longRunningService": {
      "message": "string",
      "status": "not_tested"
    },
    "nullValueImputation": {
      "message": "string",
      "status": "not_tested"
    },
    "sideEffects": {
      "message": "string",
      "status": "not_tested"
    }
  }
}

Properties

Name Type Required Restrictions Description
completedAt string true none ISO-8601 timestamp of when the testing attempt was completed.
created string true none ISO-8601 timestamp of when the testing entry was created.
createdBy string true none The username of the user that started the custom model test.
customModel CustomModelShortResponse true none Custom model used for testing.
customModelImageId string¦null true none If testing was successful, ID of the custom inference model image that can be used for a deployment, otherwise null.
customModelVersion CustomModelVersionShortResponse true none Custom model version used for testing.
datasetId string true none ID of the dataset used for testing.
datasetVersionId string true none ID of the specific dataset version used for testing.
desiredMemory integer¦null false none The amount of memory that is expected to be allocated by the custom model.
executionEnvironment ExecutionEnvironmentShortResponse true none Execution environment used for testing.
executionEnvironmentVersion ExecutionEnvironmentVersionShortResponse true none Execution environment version used for testing.
id string true none ID of the testing history entry.
imageType string false none The type of the image, either customModelImage if the testing attempt is using a customModelImage as its model or customModelVersion if the testing attempt is using a customModelVersion with dependency management.
maximumMemory integer¦null false none The maximum memory that might be allocated by the custom-model. If exceeded, the custom-model will be killed
networkEgressPolicy string¦null false none Network egress policy.
overallStatus string true none The overall status of the testing history entry.
replicas integer¦null false none A fixed number of replicas that will be set for the given custom-model.
requiresHa boolean¦null false none Require all custom model replicas to be deployed on different Kubernetes nodes for predictions fault tolerance.
testingStatus CustomModelTesting true none Maps the testing types to their status and message for the testing entry. Testing type represents a single check executed during the test.

Enumerated Values

Property Value
imageType customModelImage
imageType customModelVersion
networkEgressPolicy NONE
networkEgressPolicy DR_API_ACCESS
networkEgressPolicy PUBLIC
overallStatus not_tested
overallStatus queued
overallStatus failed
overallStatus canceled
overallStatus succeeded
overallStatus in_progress
overallStatus aborted
overallStatus warning
overallStatus skipped

CustomModelUpdate

{
  "classLabels": [
    "string"
  ],
  "description": "string",
  "desiredMemory": 134217728,
  "language": "string",
  "maximumMemory": 134217728,
  "name": "string",
  "negativeClassLabel": "string",
  "networkEgressPolicy": "NONE",
  "positiveClassLabel": "string",
  "predictionThreshold": 0.5,
  "replicas": 0,
  "requiresHa": true,
  "targetName": "string"
}

Properties

Name Type Required Restrictions Description
classLabels [string] false none The class labels for multiclass classification. Required for multiclass inference models. If using one of the [DataRobot] base environments and your model produces an ndarray of unlabeled class probabilities, the order of the labels should match the order of the predicted output
description string false none The user-friendly description of the model.
desiredMemory integer¦null false none The amount of memory that is expected to be allocated by the custom model.
language string false none Programming language name in which model is written.
maximumMemory integer¦null false none The maximum memory that might be allocated by the custom-model. If exceeded, the custom-model will be killed
name string false none The user-friendly name for the model.
negativeClassLabel string¦null false none The negative class label for custom models that support binary classification. If specified, positiveClassLabel must also be specified. Default value is "0".
networkEgressPolicy string¦null false none Network egress policy.
positiveClassLabel string¦null false none The positive class label for custom models that support binary classification. If specified, negativeClassLabel must also be specified. Default value is "1".
predictionThreshold number false none The prediction threshold which will be used for binary classification custom model.
replicas integer¦null false none A fixed number of replicas that will be set for the given custom-model.
requiresHa boolean¦null false none Require all custom model replicas to be deployed on different Kubernetes nodes for predictions fault tolerance.
targetName string¦null false none The name of the target for labeling predictions. Required for model type 'inference'. Specifying this value for a model type 'training' will result in an error.

Enumerated Values

Property Value
networkEgressPolicy NONE
networkEgressPolicy DR_API_ACCESS
networkEgressPolicy PUBLIC

CustomModelVersionCreateFromLatest

{
  "baseEnvironmentId": "string",
  "desiredMemory": 134217728,
  "file": "string",
  "filePath": "string",
  "filesToDelete": "string",
  "isMajorUpdate": "false",
  "maximumMemory": 134217728,
  "networkEgressPolicy": "NONE",
  "replicas": 0,
  "requiredMetadata": "string",
  "requiredMetadataValues": "string",
  "requiresHa": true
}

Properties

Name Type Required Restrictions Description
baseEnvironmentId string true none The base environment to use with this model version.
desiredMemory integer¦null false none The amount of memory that is expected to be allocated by the custom model.
file string(binary) false none A file with code for a custom task or a custom model. For each file supplied as form data, you must have a corresponding filePath supplied that shows the relative location of the file. For example, you have two files: /home/username/custom-task/main.py and /home/username/custom-task/helpers/helper.py. When uploading these files, you would also need to include two filePath fields of, "main.py" and "helpers/helper.py". If the supplied file already exists at the supplied filePath, the old file is replaced by the new file.
filePath any false none The local path of the file being uploaded. See the file field explanation for more details.

oneOf

Name Type Required Restrictions Description
» anonymous string false none none

xor

Name Type Required Restrictions Description
» anonymous [string] false none none

continued

Name Type Required Restrictions Description
filesToDelete any false none The IDs of the files to be deleted.

oneOf

Name Type Required Restrictions Description
» anonymous string false none none

xor

Name Type Required Restrictions Description
» anonymous [string] false none none

continued

Name Type Required Restrictions Description
isMajorUpdate string true none If set to true, new major version will created, otherwise minor version will be created.
maximumMemory integer¦null false none The maximum memory that might be allocated by the custom-model. If exceeded, the custom-model will be killed
networkEgressPolicy string¦null false none Network egress policy.
replicas integer¦null false none A fixed number of replicas that will be set for the given custom-model.
requiredMetadata string false none Additional parameters required by the execution environment. The required keys are defined by the fieldNames in the base environment's requiredMetadataKeys. Once set, they cannot be changed. If you to change them, make a new version.
requiredMetadataValues string false none Additional parameters required by the execution environment. The required fieldNames are defined by the fieldNames in the base environment's requiredMetadataKeys.
requiresHa boolean¦null false none Require all custom model replicas to be deployed on different Kubernetes nodes for predictions fault tolerance.

Enumerated Values

Property Value
isMajorUpdate false
isMajorUpdate False
isMajorUpdate true
isMajorUpdate True
networkEgressPolicy NONE
networkEgressPolicy DR_API_ACCESS
networkEgressPolicy PUBLIC

CustomModelVersionCreateFromRepository

{
  "baseEnvironmentId": "string",
  "isMajorUpdate": true,
  "ref": "string",
  "repositoryId": "string",
  "requiredMetadata": {},
  "requiredMetadataValues": [
    {
      "fieldName": "string",
      "value": "string"
    }
  ],
  "sourcePath": "string"
}

Properties

Name Type Required Restrictions Description
baseEnvironmentId string false none The base environment to use with this version.
isMajorUpdate boolean false none If set to true, new major version will created, otherwise minor version will be created.
ref string false none Remote reference (branch, commit, etc). Latest, if not specified.
repositoryId string true none The ID of remote repository used to pull sources. This ID can be found using the /api/v2/remoteRepositories/ endpoint.
requiredMetadata object false none Additional parameters required by the execution environment. The required keys are defined by the fieldNames in the base environment's requiredMetadataKeys. Once set, they cannot be changed. If you to change them, make a new version.
requiredMetadataValues [RequiredMetadataValue] false none Additional parameters required by the execution environment. The required fieldNames are defined by the fieldNames in the base environment's requiredMetadataKeys.
sourcePath any false none A remote repository file path to be pulled into a custom model or custom task.

oneOf

Name Type Required Restrictions Description
» anonymous string false none none

xor

Name Type Required Restrictions Description
» anonymous [string] false none none

CustomModelVersionCreateWithEnvironmentVersion

{
  "baseEnvironmentId": "string",
  "baseEnvironmentVersionId": "string",
  "desiredMemory": 134217728,
  "file": "string",
  "filePath": "string",
  "isMajorUpdate": "false",
  "maximumMemory": 134217728,
  "networkEgressPolicy": "NONE",
  "replicas": 0,
  "requiredMetadata": "string",
  "requiredMetadataValues": "string",
  "requiresHa": true
}

Properties

Name Type Required Restrictions Description
baseEnvironmentId string false none The base environment to use with this model version.
baseEnvironmentVersionId string false none The base environment version ID to use with this model version.Can be set only by user with correct permissions.
desiredMemory integer¦null false none The amount of memory that is expected to be allocated by the custom model.
file string(binary) false none A file with code for a custom task or a custom model. For each file supplied as form data, you must have a corresponding filePath supplied that shows the relative location of the file. For example, you have two files: /home/username/custom-task/main.py and /home/username/custom-task/helpers/helper.py. When uploading these files, you would also need to include two filePath fields of, "main.py" and "helpers/helper.py". If the supplied file already exists at the supplied filePath, the old file is replaced by the new file.
filePath any false none The local path of the file being uploaded. See the file field explanation for more details.

oneOf

Name Type Required Restrictions Description
» anonymous string false none none

xor

Name Type Required Restrictions Description
» anonymous [string] false none none

continued

Name Type Required Restrictions Description
isMajorUpdate string true none If set to true, new major version will created, otherwise minor version will be created.
maximumMemory integer¦null false none The maximum memory that might be allocated by the custom-model. If exceeded, the custom-model will be killed
networkEgressPolicy string¦null false none Network egress policy.
replicas integer¦null false none A fixed number of replicas that will be set for the given custom-model.
requiredMetadata string false none Additional parameters required by the execution environment. The required keys are defined by the fieldNames in the base environment's requiredMetadataKeys. Once set, they cannot be changed. If you to change them, make a new version.
requiredMetadataValues string false none Additional parameters required by the execution environment. The required fieldNames are defined by the fieldNames in the base environment's requiredMetadataKeys.
requiresHa boolean¦null false none Require all custom model replicas to be deployed on different Kubernetes nodes for predictions fault tolerance.

Enumerated Values

Property Value
isMajorUpdate false
isMajorUpdate False
isMajorUpdate true
isMajorUpdate True
networkEgressPolicy NONE
networkEgressPolicy DR_API_ACCESS
networkEgressPolicy PUBLIC

CustomModelVersionListResponse

{
  "count": 0,
  "data": [
    {
      "baseEnvironmentId": "string",
      "baseEnvironmentVersionId": "string",
      "created": "string",
      "customModelId": "string",
      "dependencies": [
        {
          "constraints": [
            {
              "constraintType": "<",
              "version": "string"
            }
          ],
          "extras": "string",
          "line": "string",
          "lineNumber": 0,
          "packageName": "string"
        }
      ],
      "description": "string",
      "desiredMemory": 134217728,
      "id": "string",
      "isFrozen": true,
      "items": [
        {
          "commitSha": "string",
          "created": "string",
          "fileName": "string",
          "filePath": "string",
          "fileSource": "string",
          "id": "string",
          "ref": "string",
          "repositoryFilePath": "string",
          "repositoryLocation": "string",
          "repositoryName": "string",
          "storagePath": "string",
          "workspaceId": "string"
        }
      ],
      "label": "string",
      "maximumMemory": 134217728,
      "networkEgressPolicy": "NONE",
      "replicas": 0,
      "requiredMetadata": {},
      "requiredMetadataValues": [
        {
          "fieldName": "string",
          "value": "string"
        }
      ],
      "requiresHa": true,
      "versionMajor": 0,
      "versionMinor": 0
    }
  ],
  "next": "http://example.com",
  "previous": "http://example.com",
  "totalCount": 0
}

Properties

Name Type Required Restrictions Description
count integer false none Number of items returned on this page.
data [CustomModelVersionResponse] true none List of custom model versions.
next string(uri)¦null true none URL pointing to the next page (if null, there is no next page).
previous string(uri)¦null true none URL pointing to the previous page (if null, there is no previous page).
totalCount integer true none The total number of items across all pages.

CustomModelVersionMetadataUpdate

{
  "description": "string",
  "requiredMetadata": {},
  "requiredMetadataValues": [
    {
      "fieldName": "string",
      "value": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
description string false none New description for the custom task or model.
requiredMetadata object false none Additional parameters required by the execution environment. The required keys are defined by the fieldNames in the base environment's requiredMetadataKeys.
requiredMetadataValues [RequiredMetadataValue] false none Additional parameters required by the execution environment. The required fieldNames are defined by the fieldNames in the base environment's requiredMetadataKeys.

CustomModelVersionResponse

{
  "baseEnvironmentId": "string",
  "baseEnvironmentVersionId": "string",
  "created": "string",
  "customModelId": "string",
  "dependencies": [
    {
      "constraints": [
        {
          "constraintType": "<",
          "version": "string"
        }
      ],
      "extras": "string",
      "line": "string",
      "lineNumber": 0,
      "packageName": "string"
    }
  ],
  "description": "string",
  "desiredMemory": 134217728,
  "id": "string",
  "isFrozen": true,
  "items": [
    {
      "commitSha": "string",
      "created": "string",
      "fileName": "string",
      "filePath": "string",
      "fileSource": "string",
      "id": "string",
      "ref": "string",
      "repositoryFilePath": "string",
      "repositoryLocation": "string",
      "repositoryName": "string",
      "storagePath": "string",
      "workspaceId": "string"
    }
  ],
  "label": "string",
  "maximumMemory": 134217728,
  "networkEgressPolicy": "NONE",
  "replicas": 0,
  "requiredMetadata": {},
  "requiredMetadataValues": [
    {
      "fieldName": "string",
      "value": "string"
    }
  ],
  "requiresHa": true,
  "versionMajor": 0,
  "versionMinor": 0
}

Properties

Name Type Required Restrictions Description
baseEnvironmentId string¦null false none The base environment to use with this model version.
baseEnvironmentVersionId string¦null false none The base environment version to use with this model version.
created string true none ISO-8601 timestamp of when the model was created.
customModelId string true none the ID of the custom model.
dependencies [DependencyResponse] false none The parsed dependencies of the custom model version if the version has a valid requirements.txt file.
description string¦null true none Description of a custom model version.
desiredMemory integer¦null false none The amount of memory that is expected to be allocated by the custom model.
id string true none the ID of the custom model version created.
isFrozen boolean true none If the version is frozen and immutable (i.e. it is either deployed or has been edited, causing a newer version to be yielded).
items [DeprecatedCustomModelWorkspaceItemResponse] true none List of file items.
label string true none A semantic version number of the major and minor version.
maximumMemory integer¦null false none The maximum memory that might be allocated by the custom-model. If exceeded, the custom-model will be killed
networkEgressPolicy string¦null false none Network egress policy.
replicas integer¦null false none A fixed number of replicas that will be set for the given custom-model.
requiredMetadata object false none Additional parameters required by the execution environment. The required keys are defined by the fieldNames in the base environment's requiredMetadataKeys. Once set, they cannot be changed. If you to change them, make a new version.
requiredMetadataValues [RequiredMetadataValue] false none Additional parameters required by the execution environment. The required fieldNames are defined by the fieldNames in the base environment's requiredMetadataKeys.
requiresHa boolean¦null false none Require all custom model replicas to be deployed on different Kubernetes nodes for predictions fault tolerance.
versionMajor integer true none The major version number, incremented on deployments or larger file changes.
versionMinor integer true none The minor version number, incremented on general file changes.

Enumerated Values

Property Value
networkEgressPolicy NONE
networkEgressPolicy DR_API_ACCESS
networkEgressPolicy PUBLIC

CustomModelVersionShortResponse

{
  "id": "string",
  "label": "string"
}

Properties

Name Type Required Restrictions Description
id string true none The ID of the custom model version.
label string true none User-friendly name of the model version.

DependencyConstraint

{
  "constraintType": "<",
  "version": "string"
}

Properties

Name Type Required Restrictions Description
constraintType string true none The constraint type to apply to the version.
version string true none The version label to use in the constraint.

Enumerated Values

Property Value
constraintType <
constraintType <=
constraintType ==
constraintType >=
constraintType >

DependencyResponse

{
  "constraints": [
    {
      "constraintType": "<",
      "version": "string"
    }
  ],
  "extras": "string",
  "line": "string",
  "lineNumber": 0,
  "packageName": "string"
}

Properties

Name Type Required Restrictions Description
constraints [DependencyConstraint] true none Constraints that should be applied to the dependency when installed.
extras string false none The dependency's package extras.
line string true none The original line from the requirements.txt file.
lineNumber integer true none The line number the requirement was on in requirements.txt.
packageName string true none The dependency's package name.

DeprecatedCustomModelWorkspaceItemResponse

{
  "commitSha": "string",
  "created": "string",
  "fileName": "string",
  "filePath": "string",
  "fileSource": "string",
  "id": "string",
  "ref": "string",
  "repositoryFilePath": "string",
  "repositoryLocation": "string",
  "repositoryName": "string",
  "storagePath": "string",
  "workspaceId": "string"
}

Properties

Name Type Required Restrictions Description
commitSha string¦null false none SHA1 hash pointing to the original file revision (set only for files pulled from Git-like repositories).
created string true none ISO-8601 timestamp of when the file item was created.
fileName string true none Name of the file item.
filePath string true none Path of the file item.
fileSource string true none Source of the file item.
id string true none ID of the file item.
ref string¦null false none Remote reference (branch, commit, tag). Branch "master", if not specified.
repositoryFilePath string¦null false none Full path to the file in the remote repository.
repositoryLocation string¦null false none URL to remote repository from which the file was pulled (e.g. Git server or S3 Bucket name).
repositoryName string¦null false none Name of the repository from which the file was pulled.
storagePath string true none Storage path of the file item.
workspaceId string true none Workspace ID of the file item.

DeprecatedTrainingDataAssignment

{
  "datasetId": "string",
  "datasetName": "string",
  "datasetVersionId": "string",
  "partitionColumn": "string"
}

Properties

Name Type Required Restrictions Description
datasetId string¦null false none The ID of the dataset.
datasetName string¦null false none A user-friendly name for the dataset.
datasetVersionId string¦null false none The ID of the dataset version.
partitionColumn string¦null false none The name of the column containing the partition assignments.

ExecutionEnvironmentShortResponse

{
  "id": "string",
  "name": "string"
}

Properties

Name Type Required Restrictions Description
id string true none The ID of the execution environment.
name string true none User-friendly name of the execution environment.

ExecutionEnvironmentVersionShortResponse

{
  "id": "string",
  "label": "string"
}

Properties

Name Type Required Restrictions Description
id string true none The ID of the execution environment version.
label string true none User-friendly name of the execution environment version.

FeatureImpactCreatePayload

{
  "rowCount": 10
}

Properties

Name Type Required Restrictions Description
rowCount integer false none The sample size to use for Feature Impact computation. It is possible to re-compute Feature Impact with a different row count.

FeatureImpactCreateResponse

{
  "statusId": "string"
}

Properties

Name Type Required Restrictions Description
statusId string true none ID that can be used with GET /api/v2/status/{statusId}/ for tracking job status.

FeatureImpactItem

{
  "featureName": "string",
  "impactNormalized": 1,
  "impactUnnormalized": 0,
  "redundantWith": "string"
}

Properties

Name Type Required Restrictions Description
featureName string true none The name of the feature.
impactNormalized number true none The same as impactUnnormalized, but normalized such that the highest value is 1.
impactUnnormalized number true none How much worse the error metric score is when making predictions on modified data.
redundantWith string¦null true none Name of feature that has the highest correlation with this feature.

FeatureImpactResponse

{
  "count": 0,
  "featureImpacts": [
    {
      "featureName": "string",
      "impactNormalized": 1,
      "impactUnnormalized": 0,
      "redundantWith": "string"
    }
  ],
  "next": "http://example.com",
  "previous": "http://example.com",
  "ranRedundancyDetection": true,
  "rowCount": 0,
  "shapBased": true
}

Properties

Name Type Required Restrictions Description
count integer true none Number of feature impact records in a given batch.
featureImpacts [FeatureImpactItem] true none A list which contains feature impact scores for each feature used by a model. If the model has more than 1000 features, the most important 1000 features are returned.
next string(uri)¦null true none URL for the next page of results or null.
previous string(uri)¦null true none URL for the next page of results or null.
ranRedundancyDetection boolean true none Indicates whether redundant feature identification was run while calculating this feature impact.
rowCount integer¦null true none The number of rows that was used to calculate feature impact. For the feature impact calculated with the default logic, without specifying the rowCount, we return null here.
shapBased boolean true none Indicates whether feature impact was calculated using Shapley values. True for anomaly detection models when the project is unsupervised, as permutation approach is not applicable. Note that supervised projects must use an alternative route for SHAP impact: /api/v2/projects/(projectId)/models/(modelId)/shapImpact/

GeneratedMetadata

{
  "outputColumns": [
    [
      "string"
    ]
  ],
  "outputDatasets": [
    "string"
  ]
}

Properties

Name Type Required Restrictions Description
outputColumns [array] true none A list of column lists that are associated with the output datasets from the custom model conversion process.
outputDatasets [string] true none A list of output datasets from the custom model conversion process.

RequiredMetadataValue

{
  "fieldName": "string",
  "value": "string"
}

Properties

Name Type Required Restrictions Description
fieldName string true none The required field name. This value will be added as an environment variable when running custom models.
value string true none The value for the given field.

SharingUpdateOrRemoveWithGrant

{
  "data": [
    {
      "canShare": true,
      "role": "ADMIN",
      "username": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
data [UserRoleWithGrant] true none List of sharing roles to update.

TestingStatus

{
  "message": "string",
  "status": "not_tested"
}

Properties

Name Type Required Restrictions Description
message string true none Test message.
status string true none Test status.

Enumerated Values

Property Value
status not_tested
status queued
status failed
status canceled
status succeeded
status in_progress
status aborted
status warning
status skipped

UserRoleWithGrant

{
  "canShare": true,
  "role": "ADMIN",
  "username": "string"
}

Properties

Name Type Required Restrictions Description
canShare boolean false none Whether the org/group/user should be able to share with others.If true, the org/group/user will be able to grant any role up to and includingtheir own to other orgs/groups/user. If role is NO_ROLE canShare is ignored.
role string¦null true none The role to set on the entity. When it is None, the role of this user will be removedfrom this entity.
username string true none Username of the user to update the access role for.

Enumerated Values

Property Value
role ADMIN
role CONSUMER
role DATA_SCIENTIST
role EDITOR
role OBSERVER
role OWNER
role READ_ONLY
role READ_WRITE
role USER

Updated March 22, 2023
Back to top