Skip to content

アプリケーション内で をクリックすると、お使いのDataRobotバージョンに関する全プラットフォームドキュメントにアクセスできます。

Custom Tasks

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

GET /api/v2/customTasks/

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

Code samples

# You can also use wget
curl -X GET https://app.datarobot.com/api/v2/customTasks/?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.
orderBy query string false Sort order which will be applied to custom task 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 tasks being returned in order of creation time descending.
searchFor query string false String to search for occurrence in custom task's description, language and name. Search is case insensitive. If not specified, all custom tasks will be returned.

Enumerated Values

Parameter Value
orderBy created
orderBy -created
orderBy updated
orderBy -updated

Example responses

200 Response

{
  "count": 0,
  "data": [
    {
      "calibratePredictions": true,
      "created": "string",
      "createdBy": "string",
      "customModelType": "training",
      "description": "string",
      "id": "string",
      "language": "string",
      "latestVersion": {
        "baseEnvironmentId": "string",
        "baseEnvironmentVersionId": "string",
        "created": "string",
        "customModelId": "string",
        "customTaskId": "string",
        "dependencies": [
          {
            "constraints": [
              {
                "constraintType": "<",
                "version": "string"
              }
            ],
            "extras": "string",
            "line": "string",
            "lineNumber": 0,
            "packageName": "string"
          }
        ],
        "description": "string",
        "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"
          }
        ],
        "label": "string",
        "maximumMemory": 134217728,
        "outboundNetworkPolicy": "ISOLATED",
        "requiredMetadata": {},
        "requiredMetadataValues": [
          {
            "fieldName": "string",
            "value": "string"
          }
        ],
        "versionMajor": 0,
        "versionMinor": 0,
        "warning": [
          "string"
        ]
      },
      "maximumMemory": 134217728,
      "name": "string",
      "targetType": "Binary",
      "updated": "string"
    }
  ],
  "next": "http://example.com",
  "previous": "http://example.com",
  "totalCount": 0
}

Responses

Status Meaning Description Schema
200 OK OK. CustomTaskListResponse

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

BearerAuth

POST /api/v2/customTasks/

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

A custom task may either be an estimator or a transform. Estimators must support a single target type (e.g. binaryClassification, regression). Regression and anomaly detection models are 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
}

Transforms are expected to return a dataframe or sparse matrix with the same number of rows as the input feature matrix. At this time, only numeric outputs are supported for custom transforms.

Code samples

# You can also use wget
curl -X POST https://app.datarobot.com/api/v2/customTasks/ \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Body parameter

{
  "calibratePredictions": "True",
  "description": "string",
  "language": "string",
  "maximumMemory": 134217728,
  "name": "string",
  "targetType": "Binary"
}

Parameters

Name In Type Required Description
body body CustomTaskCreate false none

Example responses

201 Response

{
  "calibratePredictions": true,
  "created": "string",
  "createdBy": "string",
  "customModelType": "training",
  "description": "string",
  "id": "string",
  "language": "string",
  "latestVersion": {
    "baseEnvironmentId": "string",
    "baseEnvironmentVersionId": "string",
    "created": "string",
    "customModelId": "string",
    "customTaskId": "string",
    "dependencies": [
      {
        "constraints": [
          {
            "constraintType": "<",
            "version": "string"
          }
        ],
        "extras": "string",
        "line": "string",
        "lineNumber": 0,
        "packageName": "string"
      }
    ],
    "description": "string",
    "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"
      }
    ],
    "label": "string",
    "maximumMemory": 134217728,
    "outboundNetworkPolicy": "ISOLATED",
    "requiredMetadata": {},
    "requiredMetadataValues": [
      {
        "fieldName": "string",
        "value": "string"
      }
    ],
    "versionMajor": 0,
    "versionMinor": 0,
    "warning": [
      "string"
    ]
  },
  "maximumMemory": 134217728,
  "name": "string",
  "targetType": "Binary",
  "updated": "string"
}

Responses

Status Meaning Description Schema
201 Created Custom task successfully created. CustomTaskResponse
403 Forbidden Custom task creation is not enabled. None
422 Unprocessable Entity Input parameters invalid None

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

BearerAuth

POST /api/v2/customTasks/fromCustomTask/

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

Code samples

# You can also use wget
curl -X POST https://app.datarobot.com/api/v2/customTasks/fromCustomTask/ \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Body parameter

{
  "customTaskId": "string"
}

Parameters

Name In Type Required Description
body body CustomTaskCopy false none

Example responses

201 Response

{
  "calibratePredictions": true,
  "created": "string",
  "createdBy": "string",
  "customModelType": "training",
  "description": "string",
  "id": "string",
  "language": "string",
  "latestVersion": {
    "baseEnvironmentId": "string",
    "baseEnvironmentVersionId": "string",
    "created": "string",
    "customModelId": "string",
    "customTaskId": "string",
    "dependencies": [
      {
        "constraints": [
          {
            "constraintType": "<",
            "version": "string"
          }
        ],
        "extras": "string",
        "line": "string",
        "lineNumber": 0,
        "packageName": "string"
      }
    ],
    "description": "string",
    "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"
      }
    ],
    "label": "string",
    "maximumMemory": 134217728,
    "outboundNetworkPolicy": "ISOLATED",
    "requiredMetadata": {},
    "requiredMetadataValues": [
      {
        "fieldName": "string",
        "value": "string"
      }
    ],
    "versionMajor": 0,
    "versionMinor": 0,
    "warning": [
      "string"
    ]
  },
  "maximumMemory": 134217728,
  "name": "string",
  "targetType": "Binary",
  "updated": "string"
}

Responses

Status Meaning Description Schema
201 Created Successfully created copy. CustomTaskResponse

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

BearerAuth

DELETE /api/v2/customTasks/{customTaskId}/

Delete a custom task. Only users who have permission to edit custom task can delete it. Only custom tasks which are not currently deployed, used in a blueprint, or in the AIcatalog can be deleted. Relevant CustomTaskImage will be deleted also.

Code samples

# You can also use wget
curl -X DELETE https://app.datarobot.com/api/v2/customTasks/{customTaskId}/ \
  -H "Authorization: Bearer {access-token}"

Parameters

Name In Type Required Description
customTaskId path string true ID of the custom task.

Responses

Status Meaning Description Schema
204 No Content Record deleted. None
409 Conflict This custom task is currently deployed, trained, or part of a user blueprint, and cannot be deleted. The response body will contain link where these conflicts can be retrieved. None

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

BearerAuth

GET /api/v2/customTasks/{customTaskId}/

Retrieve metadata for a custom task

Code samples

# You can also use wget
curl -X GET https://app.datarobot.com/api/v2/customTasks/{customTaskId}/ \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Parameters

Name In Type Required Description
customTaskId path string true ID of the custom task.

Example responses

200 Response

{
  "calibratePredictions": true,
  "created": "string",
  "createdBy": "string",
  "customModelType": "training",
  "description": "string",
  "id": "string",
  "language": "string",
  "latestVersion": {
    "baseEnvironmentId": "string",
    "baseEnvironmentVersionId": "string",
    "created": "string",
    "customModelId": "string",
    "customTaskId": "string",
    "dependencies": [
      {
        "constraints": [
          {
            "constraintType": "<",
            "version": "string"
          }
        ],
        "extras": "string",
        "line": "string",
        "lineNumber": 0,
        "packageName": "string"
      }
    ],
    "description": "string",
    "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"
      }
    ],
    "label": "string",
    "maximumMemory": 134217728,
    "outboundNetworkPolicy": "ISOLATED",
    "requiredMetadata": {},
    "requiredMetadataValues": [
      {
        "fieldName": "string",
        "value": "string"
      }
    ],
    "versionMajor": 0,
    "versionMinor": 0,
    "warning": [
      "string"
    ]
  },
  "maximumMemory": 134217728,
  "name": "string",
  "targetType": "Binary",
  "updated": "string"
}

Responses

Status Meaning Description Schema
200 OK OK. CustomTaskResponse

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

BearerAuth

PATCH /api/v2/customTasks/{customTaskId}/

Updates metadata for an existing custom task.

All custom tasks must support one target type (e.g. binaryClassification, regression, transform).

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 task has active deployments.

Code samples

# You can also use wget
curl -X PATCH https://app.datarobot.com/api/v2/customTasks/{customTaskId}/ \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Body parameter

{
  "description": "string",
  "language": "string",
  "maximumMemory": 134217728,
  "name": "string"
}

Parameters

Name In Type Required Description
customTaskId path string true ID of the custom task.
body body CustomTaskUpdate false none

Example responses

201 Response

{
  "calibratePredictions": true,
  "created": "string",
  "createdBy": "string",
  "customModelType": "training",
  "description": "string",
  "id": "string",
  "language": "string",
  "latestVersion": {
    "baseEnvironmentId": "string",
    "baseEnvironmentVersionId": "string",
    "created": "string",
    "customModelId": "string",
    "customTaskId": "string",
    "dependencies": [
      {
        "constraints": [
          {
            "constraintType": "<",
            "version": "string"
          }
        ],
        "extras": "string",
        "line": "string",
        "lineNumber": 0,
        "packageName": "string"
      }
    ],
    "description": "string",
    "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"
      }
    ],
    "label": "string",
    "maximumMemory": 134217728,
    "outboundNetworkPolicy": "ISOLATED",
    "requiredMetadata": {},
    "requiredMetadataValues": [
      {
        "fieldName": "string",
        "value": "string"
      }
    ],
    "versionMajor": 0,
    "versionMinor": 0,
    "warning": [
      "string"
    ]
  },
  "maximumMemory": 134217728,
  "name": "string",
  "targetType": "Binary",
  "updated": "string"
}

Responses

Status Meaning Description Schema
201 Created Created. CustomTaskResponse
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/customTasks/{customTaskId}/accessControl/

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

Code samples

# You can also use wget
curl -X GET https://app.datarobot.com/api/v2/customTasks/{customTaskId}/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.
customTaskId path string true ID of the custom task.

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 task and their roles on it. CustomTaskAccessControlListResponse
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/customTasks/{customTaskId}/accessControl/

Grant access or update roles for users on this custom task 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 https://app.datarobot.com/api/v2/customTasks/{customTaskId}/accessControl/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {access-token}"

Body parameter

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

Parameters

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

Responses

Status Meaning Description Schema
204 No Content Roles updated successfully. None
409 Conflict The request would leave the custom task 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/customTasks/{customTaskId}/download/

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

Code samples

# You can also use wget
curl -X GET https://app.datarobot.com/api/v2/customTasks/{customTaskId}/download/ \
  -H "Authorization: Bearer {access-token}"

Parameters

Name In Type Required Description
customTaskId path string true ID of the custom task.

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/customTasks/{customTaskId}/versions/

List custom task versions.

Code samples

# You can also use wget
curl -X GET https://app.datarobot.com/api/v2/customTasks/{customTaskId}/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.
customTaskId path string true ID of the custom task.

Example responses

200 Response

{
  "count": 0,
  "data": [
    {
      "baseEnvironmentId": "string",
      "baseEnvironmentVersionId": "string",
      "created": "string",
      "customModelId": "string",
      "customTaskId": "string",
      "dependencies": [
        {
          "constraints": [
            {
              "constraintType": "<",
              "version": "string"
            }
          ],
          "extras": "string",
          "line": "string",
          "lineNumber": 0,
          "packageName": "string"
        }
      ],
      "description": "string",
      "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"
        }
      ],
      "label": "string",
      "maximumMemory": 134217728,
      "outboundNetworkPolicy": "ISOLATED",
      "requiredMetadata": {},
      "requiredMetadataValues": [
        {
          "fieldName": "string",
          "value": "string"
        }
      ],
      "versionMajor": 0,
      "versionMinor": 0,
      "warning": [
        "string"
      ]
    }
  ],
  "next": "http://example.com",
  "previous": "http://example.com",
  "totalCount": 0
}

Responses

Status Meaning Description Schema
200 OK OK. CustomTaskVersionListResponse
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

PATCH /api/v2/customTasks/{customTaskId}/versions/

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

Code samples

# You can also use wget
curl -X PATCH https://app.datarobot.com/api/v2/customTasks/{customTaskId}/versions/ \
  -H "Content-Type: multipart/form-data" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Body parameter

baseEnvironmentId: string
file: string
filePath: string
filesToDelete: string
isMajorUpdate: "false"
maximumMemory: 134217728
outboundNetworkPolicy: ISOLATED
requiredMetadata: string
requiredMetadataValues: string

Parameters

Name In Type Required Description
customTaskId path string true ID of the custom task.
body body CustomTaskVersionCreateFromLatest false none

Example responses

201 Response

{
  "baseEnvironmentId": "string",
  "baseEnvironmentVersionId": "string",
  "created": "string",
  "customModelId": "string",
  "customTaskId": "string",
  "dependencies": [
    {
      "constraints": [
        {
          "constraintType": "<",
          "version": "string"
        }
      ],
      "extras": "string",
      "line": "string",
      "lineNumber": 0,
      "packageName": "string"
    }
  ],
  "description": "string",
  "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"
    }
  ],
  "label": "string",
  "maximumMemory": 134217728,
  "outboundNetworkPolicy": "ISOLATED",
  "requiredMetadata": {},
  "requiredMetadataValues": [
    {
      "fieldName": "string",
      "value": "string"
    }
  ],
  "versionMajor": 0,
  "versionMinor": 0,
  "warning": [
    "string"
  ]
}

Responses

Status Meaning Description Schema
201 Created Item successfully created. CustomTaskVersionResponse
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/customTasks/{customTaskId}/versions/

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

Code samples

# You can also use wget
curl -X POST https://app.datarobot.com/api/v2/customTasks/{customTaskId}/versions/ \
  -H "Content-Type: multipart/form-data" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Body parameter

baseEnvironmentId: string
file: string
filePath: string
isMajorUpdate: "false"
maximumMemory: 134217728
outboundNetworkPolicy: ISOLATED
requiredMetadata: string
requiredMetadataValues: string

Parameters

Name In Type Required Description
customTaskId path string true ID of the custom task.
body body CustomTaskVersionCreate false none

Example responses

201 Response

{
  "baseEnvironmentId": "string",
  "baseEnvironmentVersionId": "string",
  "created": "string",
  "customModelId": "string",
  "customTaskId": "string",
  "dependencies": [
    {
      "constraints": [
        {
          "constraintType": "<",
          "version": "string"
        }
      ],
      "extras": "string",
      "line": "string",
      "lineNumber": 0,
      "packageName": "string"
    }
  ],
  "description": "string",
  "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"
    }
  ],
  "label": "string",
  "maximumMemory": 134217728,
  "outboundNetworkPolicy": "ISOLATED",
  "requiredMetadata": {},
  "requiredMetadataValues": [
    {
      "fieldName": "string",
      "value": "string"
    }
  ],
  "versionMajor": 0,
  "versionMinor": 0,
  "warning": [
    "string"
  ]
}

Responses

Status Meaning Description Schema
201 Created Item successfully created. CustomTaskVersionResponse
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/customTasks/{customTaskId}/versions/fromRepository/

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

Code samples

# You can also use wget
curl -X PATCH https://app.datarobot.com/api/v2/customTasks/{customTaskId}/versions/fromRepository/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {access-token}"

Body parameter

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

Parameters

Name In Type Required Description
customTaskId path string true ID of the custom task.
body body CustomTaskVersionCreateFromRepository false none

Responses

Status Meaning Description Schema
202 Accepted Accepted: request placed to a queue for processing. None
422 Unprocessable Entity Input parameters are invalid. 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/customTasks/{customTaskId}/versions/fromRepository/

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

Code samples

# You can also use wget
curl -X POST https://app.datarobot.com/api/v2/customTasks/{customTaskId}/versions/fromRepository/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {access-token}"

Body parameter

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

Parameters

Name In Type Required Description
customTaskId path string true ID of the custom task.
body body CustomTaskVersionCreateFromRepository false none

Responses

Status Meaning Description Schema
202 Accepted Accepted: request placed to a queue for processing. None
422 Unprocessable Entity Input parameters are invalid. 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/customTasks/{customTaskId}/versions/{customTaskVersionId}/

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

Code samples

# You can also use wget
curl -X GET https://app.datarobot.com/api/v2/customTasks/{customTaskId}/versions/{customTaskVersionId}/ \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Parameters

Name In Type Required Description
customTaskId path string true ID of the custom task.
customTaskVersionId path string true ID of the custom task version.

Example responses

200 Response

{
  "baseEnvironmentId": "string",
  "baseEnvironmentVersionId": "string",
  "created": "string",
  "customModelId": "string",
  "customTaskId": "string",
  "dependencies": [
    {
      "constraints": [
        {
          "constraintType": "<",
          "version": "string"
        }
      ],
      "extras": "string",
      "line": "string",
      "lineNumber": 0,
      "packageName": "string"
    }
  ],
  "description": "string",
  "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"
    }
  ],
  "label": "string",
  "maximumMemory": 134217728,
  "outboundNetworkPolicy": "ISOLATED",
  "requiredMetadata": {},
  "requiredMetadataValues": [
    {
      "fieldName": "string",
      "value": "string"
    }
  ],
  "versionMajor": 0,
  "versionMinor": 0,
  "warning": [
    "string"
  ]
}

Responses

Status Meaning Description Schema
200 OK OK. CustomTaskVersionResponse

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

BearerAuth

PATCH /api/v2/customTasks/{customTaskId}/versions/{customTaskVersionId}/

Edit metadata of a specific task version.

Code samples

# You can also use wget
curl -X PATCH https://app.datarobot.com/api/v2/customTasks/{customTaskId}/versions/{customTaskVersionId}/ \
  -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
customTaskId path string true ID of the custom task.
customTaskVersionId path string true ID of the custom task version.
body body CustomTaskVersionMetadataUpdate false none

Example responses

200 Response

{
  "baseEnvironmentId": "string",
  "baseEnvironmentVersionId": "string",
  "created": "string",
  "customModelId": "string",
  "customTaskId": "string",
  "dependencies": [
    {
      "constraints": [
        {
          "constraintType": "<",
          "version": "string"
        }
      ],
      "extras": "string",
      "line": "string",
      "lineNumber": 0,
      "packageName": "string"
    }
  ],
  "description": "string",
  "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"
    }
  ],
  "label": "string",
  "maximumMemory": 134217728,
  "outboundNetworkPolicy": "ISOLATED",
  "requiredMetadata": {},
  "requiredMetadataValues": [
    {
      "fieldName": "string",
      "value": "string"
    }
  ],
  "versionMajor": 0,
  "versionMinor": 0,
  "warning": [
    "string"
  ]
}

Responses

Status Meaning Description Schema
200 OK The edit was successful. CustomTaskVersionResponse
404 Not Found Custom task not found or user does not have edit permissions. None

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

BearerAuth

DELETE /api/v2/customTasks/{customTaskId}/versions/{customTaskVersionId}/dependencyBuild/

Cancel the custom task version's dependency build.

Code samples

# You can also use wget
curl -X DELETE https://app.datarobot.com/api/v2/customTasks/{customTaskId}/versions/{customTaskVersionId}/dependencyBuild/ \
  -H "Authorization: Bearer {access-token}"

Parameters

Name In Type Required Description
customTaskId path string true ID of the custom task.
customTaskVersionId path string true ID of the custom task version.

Responses

Status Meaning Description Schema
204 No Content Custom task version's dependency build was cancelled. None
409 Conflict Custom task dependency build has reached a terminal state and cannot be cancelled. None
422 Unprocessable Entity No custom task dependency build started for specified version or dependency image is in use and cannot be deleted None

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

BearerAuth

GET /api/v2/customTasks/{customTaskId}/versions/{customTaskVersionId}/dependencyBuild/

Retrieve the custom task version's dependency build status.

Code samples

# You can also use wget
curl -X GET https://app.datarobot.com/api/v2/customTasks/{customTaskId}/versions/{customTaskVersionId}/dependencyBuild/ \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Parameters

Name In Type Required Description
customTaskId path string true ID of the custom task.
customTaskVersionId path string true ID of the custom task version.

Example responses

200 Response

{
  "buildEnd": "string",
  "buildLogLocation": "http://example.com",
  "buildStart": "string",
  "buildStatus": "submitted",
  "customTaskId": "string",
  "customTaskVersionId": "string"
}

Responses

Status Meaning Description Schema
200 OK The metadata from the custom task version's dependency build. CustomTaskVersionDependencyBuildMetadataResponse
422 Unprocessable Entity Custom task dependency build has not started. None

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

BearerAuth

POST /api/v2/customTasks/{customTaskId}/versions/{customTaskVersionId}/dependencyBuild/

Start a custom task version's dependency build. This is required to test, deploy, or train custom tasks.

Code samples

# You can also use wget
curl -X POST https://app.datarobot.com/api/v2/customTasks/{customTaskId}/versions/{customTaskVersionId}/dependencyBuild/ \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Parameters

Name In Type Required Description
customTaskId path string true ID of the custom task.
customTaskVersionId path string true ID of the custom task version.

Example responses

202 Response

{
  "buildEnd": "string",
  "buildLogLocation": "http://example.com",
  "buildStart": "string",
  "buildStatus": "submitted",
  "customTaskId": "string",
  "customTaskVersionId": "string"
}

Responses

Status Meaning Description Schema
202 Accepted Custom task version's dependency build has started. CustomTaskVersionDependencyBuildMetadataResponse
422 Unprocessable Entity Custom task dependency build has failed. None

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

BearerAuth

GET /api/v2/customTasks/{customTaskId}/versions/{customTaskVersionId}/dependencyBuildLog/

Retrieve the custom task version's dependency build log.

Code samples

# You can also use wget
curl -X GET https://app.datarobot.com/api/v2/customTasks/{customTaskId}/versions/{customTaskVersionId}/dependencyBuildLog/ \
  -H "Authorization: Bearer {access-token}"

Parameters

Name In Type Required Description
customTaskId path string true ID of the custom task.
customTaskVersionId path string true ID of the custom task version.

Responses

Status Meaning Description Schema
200 OK The log file generated during the custom task version's dependency build. None
404 Not Found Dependency build is in progress or could not be found. None
422 Unprocessable Entity Custom task dependency build has not started. None

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

BearerAuth

GET /api/v2/customTasks/{customTaskId}/versions/{customTaskVersionId}/download/

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

Code samples

# You can also use wget
curl -X GET https://app.datarobot.com/api/v2/customTasks/{customTaskId}/versions/{customTaskVersionId}/download/ \
  -H "Authorization: Bearer {access-token}"

Parameters

Name In Type Required Description
customTaskId path string true ID of the custom task.
customTaskVersionId path string true ID of the custom task version.

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/projects/{projectId}/models/{modelId}/logs/

Retrieve an archive (tar.gz) of the logs produced and persisted by a model. Note that only blueprints with custom tasks create persistent logs - this will not work with any other type of model.

Code samples

# You can also use wget
curl -X GET https://app.datarobot.com/api/v2/projects/{projectId}/models/{modelId}/logs/ \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Parameters

Name In Type Required Description
projectId path string true The project ID
modelId path string true The model ID

Example responses

200 Response

{
  "data": "string"
}

Responses

Status Meaning Description Schema
200 OK An archive (tar.gz) of the logs produced and persisted by a model. PersistentLogsForModelWithCustomTasksRetrieveResponse
403 Forbidden User does not have permissions to fetch model logs. None
404 Not Found Logs for this model could not be found. None

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

BearerAuth

GET /api/v2/projects/{projectId}/models/{modelId}/trainingArtifact/

Retrieve an archive (tar.gz) of the artifacts produced and persisted by a model. Note that only blueprints with custom tasks create these artifacts - this will not work with any other type of model.

Code samples

# You can also use wget
curl -X GET https://app.datarobot.com/api/v2/projects/{projectId}/models/{modelId}/trainingArtifact/ \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Parameters

Name In Type Required Description
projectId path string true The project ID
modelId path string true The model ID

Example responses

200 Response

{
  "data": "string"
}

Responses

Status Meaning Description Schema
200 OK An archive (tar.gz) of the artifacts produced by this model. ArtifactsForModelWithCustomTasksRetrieveResponse
403 Forbidden User does not have permissions to fetch this artifact. None
404 Not Found The model with this modelID does not have any artifacts. None

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

BearerAuth

Schemas

ArtifactsForModelWithCustomTasksRetrieveResponse

{
  "data": "string"
}

Properties

Name Type Required Restrictions Description
data string(binary) true An archive (tar.gz) of the artifacts produced and persisted by a model.

CustomTaskAccessControlListResponse

{
  "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 Number of items in current page.
data [CustomTaskAccessControlResponse] true List of the requested custom task access control entries.
next string(uri)¦null true URL pointing to the next page (if null, there is no next page)
previous string(uri)¦null true URL pointing to the previous page (if null, there is no previous page

CustomTaskAccessControlResponse

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

Properties

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

CustomTaskCopy

{
  "customTaskId": "string"
}

Properties

Name Type Required Restrictions Description
customTaskId string true ID of the custom task to copy.

CustomTaskCreate

{
  "calibratePredictions": "True",
  "description": "string",
  "language": "string",
  "maximumMemory": 134217728,
  "name": "string",
  "targetType": "Binary"
}

Properties

Name Type Required Restrictions Description
calibratePredictions boolean false Whether model predictions should be calibrated by DataRobot.Only applies to anomaly detection; 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.
description string false maxLength: 10000
The user-friendly description of the task.
language string false maxLength: 500
Programming language name in which task is written.
maximumMemory integer¦null false maximum: 15032385536
minimum: 134217728
DEPRECATED! The maximum memory that might be allocated by the custom-model. If exceeded, the custom-model will be killed.
name string true maxLength: 255
The user-friendly name for the task.
targetType string true The target type of the custom task

Enumerated Values

Property Value
targetType Binary
targetType Regression
targetType Multiclass
targetType Anomaly
targetType Transform
targetType TextGeneration

CustomTaskListResponse

{
  "count": 0,
  "data": [
    {
      "calibratePredictions": true,
      "created": "string",
      "createdBy": "string",
      "customModelType": "training",
      "description": "string",
      "id": "string",
      "language": "string",
      "latestVersion": {
        "baseEnvironmentId": "string",
        "baseEnvironmentVersionId": "string",
        "created": "string",
        "customModelId": "string",
        "customTaskId": "string",
        "dependencies": [
          {
            "constraints": [
              {
                "constraintType": "<",
                "version": "string"
              }
            ],
            "extras": "string",
            "line": "string",
            "lineNumber": 0,
            "packageName": "string"
          }
        ],
        "description": "string",
        "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"
          }
        ],
        "label": "string",
        "maximumMemory": 134217728,
        "outboundNetworkPolicy": "ISOLATED",
        "requiredMetadata": {},
        "requiredMetadataValues": [
          {
            "fieldName": "string",
            "value": "string"
          }
        ],
        "versionMajor": 0,
        "versionMinor": 0,
        "warning": [
          "string"
        ]
      },
      "maximumMemory": 134217728,
      "name": "string",
      "targetType": "Binary",
      "updated": "string"
    }
  ],
  "next": "http://example.com",
  "previous": "http://example.com",
  "totalCount": 0
}

Properties

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

CustomTaskResponse

{
  "calibratePredictions": true,
  "created": "string",
  "createdBy": "string",
  "customModelType": "training",
  "description": "string",
  "id": "string",
  "language": "string",
  "latestVersion": {
    "baseEnvironmentId": "string",
    "baseEnvironmentVersionId": "string",
    "created": "string",
    "customModelId": "string",
    "customTaskId": "string",
    "dependencies": [
      {
        "constraints": [
          {
            "constraintType": "<",
            "version": "string"
          }
        ],
        "extras": "string",
        "line": "string",
        "lineNumber": 0,
        "packageName": "string"
      }
    ],
    "description": "string",
    "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"
      }
    ],
    "label": "string",
    "maximumMemory": 134217728,
    "outboundNetworkPolicy": "ISOLATED",
    "requiredMetadata": {},
    "requiredMetadataValues": [
      {
        "fieldName": "string",
        "value": "string"
      }
    ],
    "versionMajor": 0,
    "versionMinor": 0,
    "warning": [
      "string"
    ]
  },
  "maximumMemory": 134217728,
  "name": "string",
  "targetType": "Binary",
  "updated": "string"
}

Properties

Name Type Required Restrictions Description
calibratePredictions boolean false Determines whether or not predictions should be calibrated by DataRobot. Only applies to anomaly detection.
created string true ISO-8601 timestamp of when the task was created.
createdBy string true The username of the custom task creator.
customModelType string true The type of custom task.
description string true The description of the task.
id string true The ID of the custom task.
language string true The programming language used by the task.
latestVersion CustomTaskVersionResponse true The latest version for the custom task (if this field is empty the task is not ready for use).
maximumMemory integer¦null false maximum: 15032385536
minimum: 134217728
DEPRECATED! The maximum memory that might be allocated by the custom-model. If exceeded, the custom-model will be killed.
name string true The name of the task.
targetType string true The target type of the custom task.
updated string true ISO-8601 timestamp of when task was last updated.

Enumerated Values

Property Value
customModelType training
customModelType inference
targetType Binary
targetType Regression
targetType Multiclass
targetType Anomaly
targetType Transform
targetType TextGeneration

CustomTaskUpdate

{
  "description": "string",
  "language": "string",
  "maximumMemory": 134217728,
  "name": "string"
}

Properties

Name Type Required Restrictions Description
description string false maxLength: 10000
The user-friendly description of the task.
language string false maxLength: 500
Programming language name in which task is written.
maximumMemory integer¦null false maximum: 15032385536
minimum: 134217728
DEPRECATED! The maximum memory that might be allocated by the custom-model. If exceeded, the custom-model will be killed.
name string false maxLength: 255
The user-friendly name for the task.

CustomTaskVersionCreate

{
  "baseEnvironmentId": "string",
  "file": "string",
  "filePath": "string",
  "isMajorUpdate": "false",
  "maximumMemory": 134217728,
  "outboundNetworkPolicy": "ISOLATED",
  "requiredMetadata": "string",
  "requiredMetadataValues": "string"
}

Properties

Name Type Required Restrictions Description
baseEnvironmentId string true The base environment to use with this custom task version.
file string(binary) false 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 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

xor

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

continued

Name Type Required Restrictions Description
isMajorUpdate string true If set to true, new major version will created, otherwise minor version will be created.
maximumMemory integer¦null false maximum: 15032385536
minimum: 134217728
DEPRECATED! The maximum memory that might be allocated by the custom-model. If exceeded, the custom-model will be killed.
outboundNetworkPolicy string false What kind of outbound network calls are allowed. If ISOLATED, then no outbound network calls are allowed. If PUBLIC, then network calls are allowed to any public ip address.
requiredMetadata string false 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 Additional parameters required by the execution environment. The required fieldNames are defined by the fieldNames in the base environment's requiredMetadataKeys.

Enumerated Values

Property Value
isMajorUpdate false
isMajorUpdate False
isMajorUpdate true
isMajorUpdate True
outboundNetworkPolicy ISOLATED
outboundNetworkPolicy PUBLIC

CustomTaskVersionCreateFromLatest

{
  "baseEnvironmentId": "string",
  "file": "string",
  "filePath": "string",
  "filesToDelete": "string",
  "isMajorUpdate": "false",
  "maximumMemory": 134217728,
  "outboundNetworkPolicy": "ISOLATED",
  "requiredMetadata": "string",
  "requiredMetadataValues": "string"
}

Properties

Name Type Required Restrictions Description
baseEnvironmentId string true The base environment to use with this custom task version.
file string(binary) false 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 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

xor

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

continued

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

oneOf

Name Type Required Restrictions Description
» anonymous string false none

xor

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

continued

Name Type Required Restrictions Description
isMajorUpdate string true If set to true, new major version will created, otherwise minor version will be created.
maximumMemory integer¦null false maximum: 15032385536
minimum: 134217728
DEPRECATED! The maximum memory that might be allocated by the custom-model. If exceeded, the custom-model will be killed.
outboundNetworkPolicy string false What kind of outbound network calls are allowed. If ISOLATED, then no outbound network calls are allowed. If PUBLIC, then network calls are allowed to any public ip address.
requiredMetadata string false 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 Additional parameters required by the execution environment. The required fieldNames are defined by the fieldNames in the base environment's requiredMetadataKeys.

Enumerated Values

Property Value
isMajorUpdate false
isMajorUpdate False
isMajorUpdate true
isMajorUpdate True
outboundNetworkPolicy ISOLATED
outboundNetworkPolicy PUBLIC

CustomTaskVersionCreateFromRepository

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

Properties

Name Type Required Restrictions Description
baseEnvironmentId string false The base environment to use with this version.
isMajorUpdate boolean false If set to true, new major version will created, otherwise minor version will be created.
outboundNetworkPolicy string false What kind of outbound network calls are allowed. If ISOLATED, then no outbound network calls are allowed. If PUBLIC, then network calls are allowed to any public ip address.
ref string false Remote reference (branch, commit, etc). Latest, if not specified.
repositoryId string true The ID of remote repository used to pull sources. This ID can be found using the /api/v2/remoteRepositories/ endpoint.
requiredMetadata object false 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 Additional parameters required by the execution environment. The required fieldNames are defined by the fieldNames in the base environment's requiredMetadataKeys.
sourcePath any false 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

xor

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

Enumerated Values

Property Value
outboundNetworkPolicy ISOLATED
outboundNetworkPolicy PUBLIC

CustomTaskVersionDependencyBuildMetadataResponse

{
  "buildEnd": "string",
  "buildLogLocation": "http://example.com",
  "buildStart": "string",
  "buildStatus": "submitted",
  "customTaskId": "string",
  "customTaskVersionId": "string"
}

Properties

Name Type Required Restrictions Description
buildEnd string¦null true The ISO-8601 encoded time when this build completed.
buildLogLocation string(uri)¦null true The URL to download the build logs from this build.
buildStart string true The ISO-8601 encoded time when this build started.
buildStatus string true The current status of the dependency build.
customTaskId string true The ID of custom task.
customTaskVersionId string true The ID of custom task version.

Enumerated Values

Property Value
buildStatus submitted
buildStatus processing
buildStatus failed
buildStatus success

CustomTaskVersionListResponse

{
  "count": 0,
  "data": [
    {
      "baseEnvironmentId": "string",
      "baseEnvironmentVersionId": "string",
      "created": "string",
      "customModelId": "string",
      "customTaskId": "string",
      "dependencies": [
        {
          "constraints": [
            {
              "constraintType": "<",
              "version": "string"
            }
          ],
          "extras": "string",
          "line": "string",
          "lineNumber": 0,
          "packageName": "string"
        }
      ],
      "description": "string",
      "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"
        }
      ],
      "label": "string",
      "maximumMemory": 134217728,
      "outboundNetworkPolicy": "ISOLATED",
      "requiredMetadata": {},
      "requiredMetadataValues": [
        {
          "fieldName": "string",
          "value": "string"
        }
      ],
      "versionMajor": 0,
      "versionMinor": 0,
      "warning": [
        "string"
      ]
    }
  ],
  "next": "http://example.com",
  "previous": "http://example.com",
  "totalCount": 0
}

Properties

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

CustomTaskVersionMetadataUpdate

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

Properties

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

CustomTaskVersionResponse

{
  "baseEnvironmentId": "string",
  "baseEnvironmentVersionId": "string",
  "created": "string",
  "customModelId": "string",
  "customTaskId": "string",
  "dependencies": [
    {
      "constraints": [
        {
          "constraintType": "<",
          "version": "string"
        }
      ],
      "extras": "string",
      "line": "string",
      "lineNumber": 0,
      "packageName": "string"
    }
  ],
  "description": "string",
  "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"
    }
  ],
  "label": "string",
  "maximumMemory": 134217728,
  "outboundNetworkPolicy": "ISOLATED",
  "requiredMetadata": {},
  "requiredMetadataValues": [
    {
      "fieldName": "string",
      "value": "string"
    }
  ],
  "versionMajor": 0,
  "versionMinor": 0,
  "warning": [
    "string"
  ]
}

Properties

Name Type Required Restrictions Description
baseEnvironmentId string¦null false The base environment to use with this task version.
baseEnvironmentVersionId string¦null false The base environment version to use with this task version.
created string true ISO-8601 timestamp of when the task was created.
customModelId string true an alias for customTaskId
customTaskId string true the ID of the custom task.
dependencies [DependencyResponse] false The parsed dependencies of the custom task version if the version has a valid requirements.txt file.
description string¦null true Description of a custom task version.
id string true the ID of the custom model version created.
isFrozen boolean true 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 [WorkspaceItemResponse] true List of file items.
label string true A semantic version number of the major and minor version.
maximumMemory integer¦null false maximum: 15032385536
minimum: 134217728
DEPRECATED! The maximum memory that might be allocated by the custom-model. If exceeded, the custom-model will be killed.
outboundNetworkPolicy string true What kind of outbound network calls are allowed. If ISOLATED, then no outbound network calls are allowed. If PUBLIC, then network calls are allowed to any public ip address.
requiredMetadata object false 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 want to change them, make a new version.
requiredMetadataValues [RequiredMetadataValue] false Additional parameters required by the execution environment. The required fieldNames are defined by the fieldNames in the base environment's requiredMetadataKeys.
versionMajor integer true The major version number, incremented on deployments or larger file changes.
versionMinor integer true The minor version number, incremented on general file changes.
warning [string] false Warnings about the custom task version

Enumerated Values

Property Value
outboundNetworkPolicy ISOLATED
outboundNetworkPolicy PUBLIC

DependencyConstraint

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

Properties

Name Type Required Restrictions Description
constraintType string true The constraint type to apply to the version.
version string true 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 Constraints that should be applied to the dependency when installed.
extras string false The dependency's package extras.
line string true The original line from the requirements.txt file.
lineNumber integer true The line number the requirement was on in requirements.txt.
packageName string true The dependency's package name.

PersistentLogsForModelWithCustomTasksRetrieveResponse

{
  "data": "string"
}

Properties

Name Type Required Restrictions Description
data string(binary) true An archive (tar.gz) of the logs produced and persisted by a model.

RequiredMetadataValue

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

Properties

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

SharingUpdateOrRemoveWithGrant

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

Properties

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

UserRoleWithGrant

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

Properties

Name Type Required Restrictions Description
canShare boolean false 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 The role to set on the entity. When it is None, the role of this user will be removedfrom this entity.
username string true 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

WorkspaceItemResponse

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

Properties

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

更新しました February 28, 2024