Skip to content

On-premise users: click in-app to access the full platform documentation for your version of DataRobot.

ML Ops

This page outlines the operations, endpoints, parameters, and example requests and responses for the ML Ops.

GET /api/v2/customTemplates/

Retrieve a list of custom templates.

Code samples

curl -X GET https://app.datarobot.com/api/v2/customTemplates/ \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Parameters

Name In Type Required Description
offset query integer false Number of results to skip.
limit query integer false At most this many results are returned. The default may change without notice.
orderBy query string false The order to sort the custom templates.
search query string false Only return custom templates whose name or description contain this text.
tag query string false Only return custom templates with a matching tag.
templateSubType query string false Only return custom templates of this sub-type.
templateType query string false Only return custom templates of this type.

Enumerated Values

Parameter Value
orderBy [name, -name, templateType, -templateType, templateSubType, -templateSubType]

Example responses

200 Response

{
  "count": 0,
  "data": [
    {
      "defaultEnvironment": {
        "environmentId": "string",
        "environmentVersionId": "string"
      },
      "defaultResourceBundleId": "cpu.nano",
      "description": "string",
      "enabled": true,
      "id": "string",
      "items": [
        {
          "id": "string",
          "name": "string"
        }
      ],
      "name": "string",
      "templateMetadata": {
        "readme": "string",
        "resourceBundleIds": [
          "string"
        ],
        "source": {},
        "tags": [
          "string"
        ]
      },
      "templateSubType": "string",
      "templateType": "string"
    }
  ],
  "next": "http://example.com",
  "previous": "http://example.com",
  "totalCount": 0
}

Responses

Status Meaning Description Schema
200 OK A paginated list of custom templates. CustomTemplateListResponse
403 Forbidden User does not have permission to access custom templates. None

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

BearerAuth

POST /api/v2/customTemplates/

Create a custom template.

Code samples

curl -X POST https://app.datarobot.com/api/v2/customTemplates/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {access-token}" \
  -d '{CustomTemplateCreatePayload}'

Body parameter

{
  "defaultEnvironment": "string",
  "defaultResourceBundleId": "cpu.nano",
  "description": "string",
  "file": "string",
  "name": "string",
  "templateMetadata": "string",
  "templateSubType": "string",
  "templateType": "string"
}

Parameters

Name In Type Required Description
body body CustomTemplateCreatePayload false none

Responses

Status Meaning Description Schema
201 Created Custom template is successfully created. None
403 Forbidden User does not have permission to create a custom template. None

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

BearerAuth

DELETE /api/v2/customTemplates/{customTemplateId}/

Delete a custom template.

Code samples

curl -X DELETE https://app.datarobot.com/api/v2/customTemplates/{customTemplateId}/ \
  -H "Authorization: Bearer {access-token}"

Parameters

Name In Type Required Description
customTemplateId path string true The ID of the custom template.

Responses

Status Meaning Description Schema
204 No Content Requested custom template has been successfully deleted None
403 Forbidden User does not have permission to delete a custom template. None
404 Not Found Custom template was not found. None

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

BearerAuth

GET /api/v2/customTemplates/{customTemplateId}/

Retrieve a single custom template.

Code samples

curl -X GET https://app.datarobot.com/api/v2/customTemplates/{customTemplateId}/ \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Parameters

Name In Type Required Description
customTemplateId path string true The ID of the custom template.

Example responses

200 Response

{
  "defaultEnvironment": {
    "environmentId": "string",
    "environmentVersionId": "string"
  },
  "defaultResourceBundleId": "cpu.nano",
  "description": "string",
  "enabled": true,
  "id": "string",
  "items": [
    {
      "id": "string",
      "name": "string"
    }
  ],
  "name": "string",
  "templateMetadata": {
    "readme": "string",
    "resourceBundleIds": [
      "string"
    ],
    "source": {},
    "tags": [
      "string"
    ]
  },
  "templateSubType": "string",
  "templateType": "string"
}

Responses

Status Meaning Description Schema
200 OK A given custom template. CustomTemplateEntity
403 Forbidden User does not have permission to access a particular custom template. None

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

BearerAuth

PATCH /api/v2/customTemplates/{customTemplateId}/

Update given custom template.

Code samples

curl -X PATCH https://app.datarobot.com/api/v2/customTemplates/{customTemplateId}/ \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
  -d '{undefined}'

Body parameter

{
  "defaultEnvironment": "string",
  "defaultResourceBundleId": "cpu.nano",
  "description": "string",
  "file": "string",
  "name": "string",
  "templateMetadata": "string",
  "templateSubType": "string",
  "templateType": "string"
}

Parameters

Name In Type Required Description
customTemplateId path string true The ID of the custom template.
body body CustomTemplateUpdatePayload false none

Example responses

200 Response

{
  "defaultEnvironment": {
    "environmentId": "string",
    "environmentVersionId": "string"
  },
  "defaultResourceBundleId": "cpu.nano",
  "description": "string",
  "enabled": true,
  "id": "string",
  "items": [
    {
      "id": "string",
      "name": "string"
    }
  ],
  "name": "string",
  "templateMetadata": {
    "readme": "string",
    "resourceBundleIds": [
      "string"
    ],
    "source": {},
    "tags": [
      "string"
    ]
  },
  "templateSubType": "string",
  "templateType": "string"
}

Responses

Status Meaning Description Schema
200 OK Custom template successfully updated. CustomTemplateEntity
403 Forbidden User does not have permission to update a custom template. None

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

BearerAuth

Schemas

CustomTemplateCreatePayload

{
  "defaultEnvironment": "string",
  "defaultResourceBundleId": "cpu.nano",
  "description": "string",
  "file": "string",
  "name": "string",
  "templateMetadata": "string",
  "templateSubType": "string",
  "templateType": "string"
}

Properties

Name Type Required Restrictions Description
defaultEnvironment string true Specifies the default environment for the custom metric template.
defaultResourceBundleId string false Specifies the default resource bundle for the custom metric template.
description string true maxLength: 10000
A description of the custom template.
file string(binary) true The file to be used to create the custom metric template.
name string true maxLength: 255
The name of the custom template.
templateMetadata string¦null false Specifies permanent metadata for the custom template.
templateSubType string true maxLength: 255
Defines sub-type of the custom template.
templateType string true maxLength: 255
Defines type of the custom template.

Enumerated Values

Property Value
defaultResourceBundleId [cpu.nano, cpu.micro, cpu.small, cpu.medium, cpu.large, cpu.xlarge, cpu.2xlarge, cpu.3xlarge, cpu.4xlarge, cpu.5xlarge, cpu.6xlarge, cpu.7xlarge, cpu.8xlarge, cpu.16xlarge, DRAWSG4dn.xlargeFrac1Regular, DRAWSG4dn.2xlargeFrac1Regular, DRAWSG5.2xlargeFrac1Regular, DRAWSG5.12xlargeFrac1Regular, DRAWSG5.48xlargeFrac1Regular, DRAWSG6e.xlargeFrac1Regular, DRAWSG6e.12xlargeFrac1Regular, DRAWSG6e.48xlargeFrac1Regular, gpu.small, gpu.medium, gpu.large, gpu.xlarge, gpu.2xlarge, gpu.3xlarge, gpu.5xlarge, gpu.7xlarge, starter, basic, basic.8x, train.l, infer.s, infer.m, infer.l]

CustomTemplateEntity

{
  "defaultEnvironment": {
    "environmentId": "string",
    "environmentVersionId": "string"
  },
  "defaultResourceBundleId": "cpu.nano",
  "description": "string",
  "enabled": true,
  "id": "string",
  "items": [
    {
      "id": "string",
      "name": "string"
    }
  ],
  "name": "string",
  "templateMetadata": {
    "readme": "string",
    "resourceBundleIds": [
      "string"
    ],
    "source": {},
    "tags": [
      "string"
    ]
  },
  "templateSubType": "string",
  "templateType": "string"
}

Properties

Name Type Required Restrictions Description
defaultEnvironment DefaultEnvironment true Specifies the default environment for the custom template.
defaultResourceBundleId string¦null true Specifies the default resource bundle for the custom metric template.
description string true maxLength: 10000
A description of the custom template.
enabled boolean true Determines whether the template is enabled.
id string true The ID of the custom template.
items [CustomTemplateFile] true maxItems: 1000
A list of custom files.
name string true maxLength: 255
The name of the custom template.
templateMetadata TemplateMetadata true Specifies permanent metadata for the custom template.
templateSubType string¦null true maxLength: 255
Defines the type of the custom template.
templateType string true maxLength: 255
Defines the type of the custom template.

Enumerated Values

Property Value
defaultResourceBundleId [cpu.nano, cpu.micro, cpu.small, cpu.medium, cpu.large, cpu.xlarge, cpu.2xlarge, cpu.3xlarge, cpu.4xlarge, cpu.5xlarge, cpu.6xlarge, cpu.7xlarge, cpu.8xlarge, cpu.16xlarge, DRAWSG4dn.xlargeFrac1Regular, DRAWSG4dn.2xlargeFrac1Regular, DRAWSG5.2xlargeFrac1Regular, DRAWSG5.12xlargeFrac1Regular, DRAWSG5.48xlargeFrac1Regular, DRAWSG6e.xlargeFrac1Regular, DRAWSG6e.12xlargeFrac1Regular, DRAWSG6e.48xlargeFrac1Regular, gpu.small, gpu.medium, gpu.large, gpu.xlarge, gpu.2xlarge, gpu.3xlarge, gpu.5xlarge, gpu.7xlarge, starter, basic, basic.8x, train.l, infer.s, infer.m, infer.l]

CustomTemplateFile

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

Properties

Name Type Required Restrictions Description
id string true The ID of the custom template file.
name string true maxLength: 255
Name of the custom template file.

CustomTemplateListResponse

{
  "count": 0,
  "data": [
    {
      "defaultEnvironment": {
        "environmentId": "string",
        "environmentVersionId": "string"
      },
      "defaultResourceBundleId": "cpu.nano",
      "description": "string",
      "enabled": true,
      "id": "string",
      "items": [
        {
          "id": "string",
          "name": "string"
        }
      ],
      "name": "string",
      "templateMetadata": {
        "readme": "string",
        "resourceBundleIds": [
          "string"
        ],
        "source": {},
        "tags": [
          "string"
        ]
      },
      "templateSubType": "string",
      "templateType": "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 [CustomTemplateEntity] true maxItems: 100
A list of custom templates.
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.

CustomTemplateUpdatePayload

{
  "defaultEnvironment": "string",
  "defaultResourceBundleId": "cpu.nano",
  "description": "string",
  "file": "string",
  "name": "string",
  "templateMetadata": "string",
  "templateSubType": "string",
  "templateType": "string"
}

Properties

Name Type Required Restrictions Description
defaultEnvironment string false Specifies the default environment for the custom template.
defaultResourceBundleId string false Specifies the default resource bundle for the custom metric template.
description string false maxLength: 10000
A description of the custom template.
file string(binary) false The file to be used to create the custom template.
name string false maxLength: 255
The name of the custom template.
templateMetadata string¦null false Specifies permanent metadata for the custom template.
templateSubType string false maxLength: 255
Defines the sub-type of the custom template.
templateType string false maxLength: 255
Defines the type of the custom template.

Enumerated Values

Property Value
defaultResourceBundleId [cpu.nano, cpu.micro, cpu.small, cpu.medium, cpu.large, cpu.xlarge, cpu.2xlarge, cpu.3xlarge, cpu.4xlarge, cpu.5xlarge, cpu.6xlarge, cpu.7xlarge, cpu.8xlarge, cpu.16xlarge, DRAWSG4dn.xlargeFrac1Regular, DRAWSG4dn.2xlargeFrac1Regular, DRAWSG5.2xlargeFrac1Regular, DRAWSG5.12xlargeFrac1Regular, DRAWSG5.48xlargeFrac1Regular, DRAWSG6e.xlargeFrac1Regular, DRAWSG6e.12xlargeFrac1Regular, DRAWSG6e.48xlargeFrac1Regular, gpu.small, gpu.medium, gpu.large, gpu.xlarge, gpu.2xlarge, gpu.3xlarge, gpu.5xlarge, gpu.7xlarge, starter, basic, basic.8x, train.l, infer.s, infer.m, infer.l]

DefaultEnvironment

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

Specifies the default environment for the custom template.

Properties

Name Type Required Restrictions Description
environmentId string true The ID the environment to use for the public custom metric image.
environmentVersionId string true The ID of the specific environment version to use with the public custom metric image.

TemplateMetadata

{
  "readme": "string",
  "resourceBundleIds": [
    "string"
  ],
  "source": {},
  "tags": [
    "string"
  ]
}

Specifies permanent metadata for the custom template.

Properties

Name Type Required Restrictions Description
readme string¦null false maxLength: 1048576
Content of README.md file of the template.
resourceBundleIds [string]¦null false maxItems: 1000
Custom template resource bundle ids list.
source TemplateSource false Custom template source repo.
tags [string]¦null false maxItems: 1000
Custom template tags list.

TemplateSource

{}

Custom template source repo.

Properties

None


Updated February 12, 2025