# Custom Scoring metrics

> Custom Scoring metrics - Use the endpoints described below to manage custom scoring metrics.

This Markdown file sits beside the HTML page at the same path (with a `.md` suffix). It summarizes the topic and lists links for tools and LLM context.

Companion generated at `2026-06-26T15:16:24.691816+00:00` (UTC).

## Primary page

- [Custom Scoring metrics](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md): Full documentation for this topic (Markdown sidecar).

## Sections on this page

- [List Custom Scoring Metrics](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#list-custom-scoring-metrics): In-page section heading.
- [Parameters](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#customscoringmetrics_list-parameters): In-page section heading.
- [Enumerated Values](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#enumerated-values): In-page section heading.
- [Example responses](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#example-responses): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#responses): In-page section heading.
- [Create A Custom Scoring Metric](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#create-a-custom-scoring-metric): In-page section heading.
- [Body parameter](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#body-parameter): In-page section heading.
- [Parameters](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#customscoringmetrics_create-parameters): In-page section heading.
- [Example responses](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#example-responses_1): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#responses_1): In-page section heading.
- [Delete A Custom Scoring Metric By Metric Id by metric ID](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#delete-a-custom-scoring-metric-by-metric-id-by-metric-id): In-page section heading.
- [Parameters](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#customscoringmetrics_delete-parameters): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#responses_2): In-page section heading.
- [Retrieve A Custom Scoring Metric By Metric Id by metric ID](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#retrieve-a-custom-scoring-metric-by-metric-id-by-metric-id): In-page section heading.
- [Parameters](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#customscoringmetrics_retrieve-parameters): In-page section heading.
- [Example responses](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#example-responses_2): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#responses_3): In-page section heading.
- [Update A Custom Scoring Metric By Metric Id by metric ID](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#update-a-custom-scoring-metric-by-metric-id-by-metric-id): In-page section heading.
- [Body parameter](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#body-parameter_1): In-page section heading.
- [Parameters](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#customscoringmetrics_patch-parameters): In-page section heading.
- [Example responses](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#example-responses_3): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#responses_4): In-page section heading.
- [List versions Of A Custom Scoring Metric By Metric Id by metric ID](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#list-versions-of-a-custom-scoring-metric-by-metric-id-by-metric-id): In-page section heading.
- [Parameters](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#customscoringmetricsversions_list-parameters): In-page section heading.
- [Example responses](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#example-responses_4): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#responses_5): In-page section heading.
- [Upload A New Version Of A Custom Scoring Metric By Metric Id by metric ID](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#upload-a-new-version-of-a-custom-scoring-metric-by-metric-id-by-metric-id): In-page section heading.
- [Body parameter](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#body-parameter_2): In-page section heading.
- [Parameters](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#customscoringmetricsversions_create-parameters): In-page section heading.
- [Example responses](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#example-responses_5): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#responses_6): In-page section heading.
- [Delete A Custom Scoring Metric Version By Metric Id by metric ID](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#delete-a-custom-scoring-metric-version-by-metric-id-by-metric-id): In-page section heading.
- [Parameters](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#customscoringmetricsversions_delete-parameters): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#responses_7): In-page section heading.
- [Retrieve A Custom Scoring Metric Version By Metric Id by metric ID](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#retrieve-a-custom-scoring-metric-version-by-metric-id-by-metric-id): In-page section heading.
- [Parameters](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#customscoringmetricsversions_retrieve-parameters): In-page section heading.
- [Example responses](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#example-responses_6): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#responses_8): In-page section heading.
- [Retrieve A Custom Scoring Metric Version's File Contents By Metric Id by metric ID](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#retrieve-a-custom-scoring-metric-versions-file-contents-by-metric-id-by-metric-id): In-page section heading.
- [Parameters](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#customscoringmetricsversionsfiles_list-parameters): In-page section heading.
- [Example responses](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#example-responses_7): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#responses_9): In-page section heading.
- [CustomMetric](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#tocS_CustomMetric): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#properties): In-page section heading.
- [CustomMetricTag](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#tocS_CustomMetricTag): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#properties_1): In-page section heading.
- [CustomScoringMetricCreate](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#tocS_CustomScoringMetricCreate): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#properties_2): In-page section heading.
- [Enumerated Values](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#enumerated-values_1): In-page section heading.
- [CustomScoringMetricListResponse](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#tocS_CustomScoringMetricListResponse): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#properties_3): In-page section heading.
- [CustomScoringMetricResponse](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#tocS_CustomScoringMetricResponse): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#properties_4): In-page section heading.
- [Enumerated Values](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#enumerated-values_2): In-page section heading.
- [CustomScoringMetricUpdate](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#tocS_CustomScoringMetricUpdate): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#properties_5): In-page section heading.
- [CustomScoringMetricVersionCreate](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#tocS_CustomScoringMetricVersionCreate): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#properties_6): In-page section heading.
- [CustomScoringMetricVersionFilesResponse](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#tocS_CustomScoringMetricVersionFilesResponse): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#properties_7): In-page section heading.
- [CustomScoringMetricVersionListResponse](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#tocS_CustomScoringMetricVersionListResponse): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#properties_8): In-page section heading.
- [CustomScoringMetricVersionResponse](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#tocS_CustomScoringMetricVersionResponse): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#properties_9): In-page section heading.
- [Enumerated Values](https://docs.datarobot.com/en/docs/api/reference/public-api/custom_scoring_metrics.html.md#enumerated-values_3): In-page section heading.

## Related documentation

- [Developer documentation](https://docs.datarobot.com/en/docs/api/index.html.md): Linked from this page.
- [API reference](https://docs.datarobot.com/en/docs/api/reference/index.html.md): Linked from this page.

## Documentation content

Use the endpoints described below to manage custom scoring metrics.

## List Custom Scoring Metrics

Operation path: `GET /api/v2/customScoringMetrics/`

Authentication requirements: `BearerAuth`

List all custom scoring metrics, optionally filtered by target type or search.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| targetType | query | string | false | Filter by target type. |
| search | query | string | false | Search by metric name. |
| isArchived | query | boolean | false | Include archived metrics. |
| offset | query | integer | false | Pagination offset. |
| limit | query | integer | false | Pagination limit. |

### Enumerated Values

| Parameter | Value |
| --- | --- |
| targetType | [Regression, Binary, Multiclass, regression, binary, multiclass] |

### Example responses

> 200 Response

```
{
  "properties": {
    "count": {
      "description": "The number of items returned on this page.",
      "type": "integer"
    },
    "data": {
      "description": "A list of custom scoring metrics.",
      "items": {
        "properties": {
          "createdAt": {
            "description": "Creation timestamp.",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "description": "Description.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "Metric id.",
            "type": "string"
          },
          "isArchived": {
            "description": "Archived flag.",
            "type": "boolean"
          },
          "latestVersionNum": {
            "description": "Latest version number.",
            "type": "integer"
          },
          "name": {
            "description": "Name.",
            "type": "string"
          },
          "organizationId": {
            "description": "Organization id.",
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "default": [],
            "description": "Tags.",
            "items": {
              "properties": {
                "name": {
                  "description": "Name of the tag.",
                  "maxLength": 255,
                  "minLength": 1,
                  "type": "string"
                },
                "value": {
                  "description": "Value of the tag.",
                  "type": "string"
                }
              },
              "required": [
                "name",
                "value"
              ],
              "type": "object",
              "x-versionadded": "v2.47"
            },
            "maxItems": 50,
            "type": "array"
          },
          "targetType": {
            "description": "Target type.",
            "enum": [
              "Regression",
              "Binary",
              "Multiclass",
              "regression",
              "binary",
              "multiclass"
            ],
            "type": "string"
          },
          "updatedAt": {
            "description": "Last updated timestamp.",
            "type": [
              "string",
              "null"
            ]
          },
          "userId": {
            "description": "Creator user id.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "isArchived",
          "latestVersionNum",
          "name",
          "targetType",
          "userId"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "next": {
      "description": "The url of the next page (if null, there is no next page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "previous": {
      "description": "The url of the previous page (if null, there is no previous page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "data",
    "next",
    "previous"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | none | CustomScoringMetricListResponse |

## Create A Custom Scoring Metric

Operation path: `POST /api/v2/customScoringMetrics/`

Authentication requirements: `BearerAuth`

Create a new custom scoring metric container for a given target type.

### Body parameter

```
{
  "properties": {
    "description": {
      "description": "Description of the custom scoring metric.",
      "type": [
        "string",
        "null"
      ]
    },
    "name": {
      "description": "Name of the custom scoring metric.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "tags": {
      "default": [],
      "description": "Optional tags for the custom scoring metric.",
      "items": {
        "properties": {
          "name": {
            "description": "Name of the tag.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "value": {
            "description": "Value of the tag.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 50,
      "type": "array"
    },
    "targetType": {
      "description": "Target type for this metric (regression, binary, or multiclass).",
      "enum": [
        "Regression",
        "Binary",
        "Multiclass",
        "regression",
        "binary",
        "multiclass"
      ],
      "type": "string"
    }
  },
  "required": [
    "name",
    "targetType"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}
```

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| body | body | CustomScoringMetricCreate | false | none |

### Example responses

> 201 Response

```
{
  "properties": {
    "createdAt": {
      "description": "Creation timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "description": "Description.",
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "description": "Metric id.",
      "type": "string"
    },
    "isArchived": {
      "description": "Archived flag.",
      "type": "boolean"
    },
    "latestVersionNum": {
      "description": "Latest version number.",
      "type": "integer"
    },
    "name": {
      "description": "Name.",
      "type": "string"
    },
    "organizationId": {
      "description": "Organization id.",
      "type": [
        "string",
        "null"
      ]
    },
    "tags": {
      "default": [],
      "description": "Tags.",
      "items": {
        "properties": {
          "name": {
            "description": "Name of the tag.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "value": {
            "description": "Value of the tag.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 50,
      "type": "array"
    },
    "targetType": {
      "description": "Target type.",
      "enum": [
        "Regression",
        "Binary",
        "Multiclass",
        "regression",
        "binary",
        "multiclass"
      ],
      "type": "string"
    },
    "updatedAt": {
      "description": "Last updated timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "userId": {
      "description": "Creator user id.",
      "type": "string"
    }
  },
  "required": [
    "id",
    "isArchived",
    "latestVersionNum",
    "name",
    "targetType",
    "userId"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 201 | Created | none | CustomScoringMetricResponse |

## Delete A Custom Scoring Metric By Metric Id by metric ID

Operation path: `DELETE /api/v2/customScoringMetrics/{metricId}/`

Authentication requirements: `BearerAuth`

Archive (soft-delete) a custom scoring metric.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| metricId | path | string | true | The ID of the custom scoring metric. |

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 204 | No Content | none | None |

## Retrieve A Custom Scoring Metric By Metric Id by metric ID

Operation path: `GET /api/v2/customScoringMetrics/{metricId}/`

Authentication requirements: `BearerAuth`

Get details of a single custom scoring metric.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| metricId | path | string | true | The ID of the custom scoring metric. |

### Example responses

> 200 Response

```
{
  "properties": {
    "createdAt": {
      "description": "Creation timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "description": "Description.",
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "description": "Metric id.",
      "type": "string"
    },
    "isArchived": {
      "description": "Archived flag.",
      "type": "boolean"
    },
    "latestVersionNum": {
      "description": "Latest version number.",
      "type": "integer"
    },
    "name": {
      "description": "Name.",
      "type": "string"
    },
    "organizationId": {
      "description": "Organization id.",
      "type": [
        "string",
        "null"
      ]
    },
    "tags": {
      "default": [],
      "description": "Tags.",
      "items": {
        "properties": {
          "name": {
            "description": "Name of the tag.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "value": {
            "description": "Value of the tag.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 50,
      "type": "array"
    },
    "targetType": {
      "description": "Target type.",
      "enum": [
        "Regression",
        "Binary",
        "Multiclass",
        "regression",
        "binary",
        "multiclass"
      ],
      "type": "string"
    },
    "updatedAt": {
      "description": "Last updated timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "userId": {
      "description": "Creator user id.",
      "type": "string"
    }
  },
  "required": [
    "id",
    "isArchived",
    "latestVersionNum",
    "name",
    "targetType",
    "userId"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | none | CustomScoringMetricResponse |

## Update A Custom Scoring Metric By Metric Id by metric ID

Operation path: `PATCH /api/v2/customScoringMetrics/{metricId}/`

Authentication requirements: `BearerAuth`

Update the name, description, or tags of a custom scoring metric.

### Body parameter

```
{
  "properties": {
    "description": {
      "description": "Updated description.",
      "type": [
        "string",
        "null"
      ]
    },
    "name": {
      "description": "Updated name.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "tags": {
      "description": "Updated tags.",
      "items": {
        "properties": {
          "name": {
            "description": "Name of the tag.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "value": {
            "description": "Value of the tag.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 50,
      "type": "array"
    }
  },
  "type": "object",
  "x-versionadded": "v2.47"
}
```

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| metricId | path | string | true | The ID of the custom scoring metric. |
| body | body | CustomScoringMetricUpdate | false | none |

### Example responses

> 200 Response

```
{
  "properties": {
    "createdAt": {
      "description": "Creation timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "description": "Description.",
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "description": "Metric id.",
      "type": "string"
    },
    "isArchived": {
      "description": "Archived flag.",
      "type": "boolean"
    },
    "latestVersionNum": {
      "description": "Latest version number.",
      "type": "integer"
    },
    "name": {
      "description": "Name.",
      "type": "string"
    },
    "organizationId": {
      "description": "Organization id.",
      "type": [
        "string",
        "null"
      ]
    },
    "tags": {
      "default": [],
      "description": "Tags.",
      "items": {
        "properties": {
          "name": {
            "description": "Name of the tag.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "value": {
            "description": "Value of the tag.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 50,
      "type": "array"
    },
    "targetType": {
      "description": "Target type.",
      "enum": [
        "Regression",
        "Binary",
        "Multiclass",
        "regression",
        "binary",
        "multiclass"
      ],
      "type": "string"
    },
    "updatedAt": {
      "description": "Last updated timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "userId": {
      "description": "Creator user id.",
      "type": "string"
    }
  },
  "required": [
    "id",
    "isArchived",
    "latestVersionNum",
    "name",
    "targetType",
    "userId"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | none | CustomScoringMetricResponse |

## List versions Of A Custom Scoring Metric By Metric Id by metric ID

Operation path: `GET /api/v2/customScoringMetrics/{metricId}/versions/`

Authentication requirements: `BearerAuth`

List all versions for a given custom scoring metric.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| offset | query | integer | false | Pagination offset. |
| limit | query | integer | false | Pagination limit. |
| metricId | path | string | true | The ID of the custom scoring metric. |

### Example responses

> 200 Response

```
{
  "properties": {
    "count": {
      "description": "The number of items returned on this page.",
      "type": "integer"
    },
    "data": {
      "description": "A list of custom scoring metric versions.",
      "items": {
        "properties": {
          "createdAt": {
            "description": "Creation timestamp.",
            "type": [
              "string",
              "null"
            ]
          },
          "customScoringMetricRegistryId": {
            "description": "Parent metric id.",
            "type": "string"
          },
          "description": {
            "description": "Version notes.",
            "type": [
              "string",
              "null"
            ]
          },
          "filesCatalogId": {
            "description": "Files catalog id backing this version.",
            "type": "string"
          },
          "filesCatalogVersionId": {
            "description": "Files catalog version id.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "Version id.",
            "type": "string"
          },
          "metrics": {
            "default": [],
            "description": "Parsed metric definitions.",
            "items": {
              "properties": {
                "description": {
                  "default": "Untitled",
                  "description": "Custom metric description.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "entryPoint": {
                  "description": "Custom metric function entry point in the Python code on lrs.",
                  "type": "string"
                },
                "label": {
                  "description": "Custom metrics UI label. will appear in metrics list in UI screen.",
                  "type": "string"
                },
                "lowerIsBetter": {
                  "default": true,
                  "description": "Indicates whether to maximize or minimize the metric function.",
                  "type": "boolean"
                },
                "name": {
                  "description": "Custom metrics function name. must match the Python code function name.",
                  "type": "string"
                },
                "primaryMetric": {
                  "description": "Indicates whether this metric is used for project gridsearch hyperparameter search.",
                  "type": "boolean"
                },
                "useWeights": {
                  "default": false,
                  "description": "Indicates whether this metric is using weights.",
                  "type": "boolean"
                }
              },
              "required": [
                "entryPoint",
                "label",
                "name",
                "primaryMetric"
              ],
              "type": "object",
              "x-versionadded": "v2.47"
            },
            "maxItems": 100,
            "type": "array"
          },
          "stage": {
            "description": "Lifecycle stage.",
            "enum": [
              "draft",
              "Draft",
              "DRAFT",
              "registered",
              "Registered",
              "REGISTERED",
              "archived",
              "Archived",
              "ARCHIVED"
            ],
            "type": "string"
          },
          "targetType": {
            "description": "Target type.",
            "enum": [
              "Regression",
              "Binary",
              "Multiclass",
              "regression",
              "binary",
              "multiclass"
            ],
            "type": "string"
          },
          "userId": {
            "description": "Creator user id.",
            "type": [
              "string",
              "null"
            ]
          },
          "validationStatus": {
            "description": "Validation status.",
            "enum": [
              "pending",
              "Pending",
              "PENDING",
              "valid",
              "Valid",
              "VALID",
              "invalid",
              "Invalid",
              "INVALID"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "versionNum": {
            "description": "Version number.",
            "type": "integer"
          }
        },
        "required": [
          "customScoringMetricRegistryId",
          "filesCatalogId",
          "id",
          "stage",
          "targetType",
          "versionNum"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "next": {
      "description": "The url of the next page (if null, there is no next page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "previous": {
      "description": "The url of the previous page (if null, there is no previous page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "data",
    "next",
    "previous"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | none | CustomScoringMetricVersionListResponse |

## Upload A New Version Of A Custom Scoring Metric By Metric Id by metric ID

Operation path: `POST /api/v2/customScoringMetrics/{metricId}/versions/`

Authentication requirements: `BearerAuth`

Upload metadata.yaml and custom_metrics.py to create a new version. Files are submitted as multipart form data (metadataFile and codeFile).

### Body parameter

```
{
  "properties": {
    "description": {
      "description": "Version-level notes.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "type": "object",
  "x-versionadded": "v2.47"
}
```

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| metricId | path | string | true | The ID of the custom scoring metric. |
| body | body | CustomScoringMetricVersionCreate | false | none |

### Example responses

> 201 Response

```
{
  "properties": {
    "createdAt": {
      "description": "Creation timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "customScoringMetricRegistryId": {
      "description": "Parent metric id.",
      "type": "string"
    },
    "description": {
      "description": "Version notes.",
      "type": [
        "string",
        "null"
      ]
    },
    "filesCatalogId": {
      "description": "Files catalog id backing this version.",
      "type": "string"
    },
    "filesCatalogVersionId": {
      "description": "Files catalog version id.",
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "description": "Version id.",
      "type": "string"
    },
    "metrics": {
      "default": [],
      "description": "Parsed metric definitions.",
      "items": {
        "properties": {
          "description": {
            "default": "Untitled",
            "description": "Custom metric description.",
            "type": [
              "string",
              "null"
            ]
          },
          "entryPoint": {
            "description": "Custom metric function entry point in the Python code on lrs.",
            "type": "string"
          },
          "label": {
            "description": "Custom metrics UI label. will appear in metrics list in UI screen.",
            "type": "string"
          },
          "lowerIsBetter": {
            "default": true,
            "description": "Indicates whether to maximize or minimize the metric function.",
            "type": "boolean"
          },
          "name": {
            "description": "Custom metrics function name. must match the Python code function name.",
            "type": "string"
          },
          "primaryMetric": {
            "description": "Indicates whether this metric is used for project gridsearch hyperparameter search.",
            "type": "boolean"
          },
          "useWeights": {
            "default": false,
            "description": "Indicates whether this metric is using weights.",
            "type": "boolean"
          }
        },
        "required": [
          "entryPoint",
          "label",
          "name",
          "primaryMetric"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 100,
      "type": "array"
    },
    "stage": {
      "description": "Lifecycle stage.",
      "enum": [
        "draft",
        "Draft",
        "DRAFT",
        "registered",
        "Registered",
        "REGISTERED",
        "archived",
        "Archived",
        "ARCHIVED"
      ],
      "type": "string"
    },
    "targetType": {
      "description": "Target type.",
      "enum": [
        "Regression",
        "Binary",
        "Multiclass",
        "regression",
        "binary",
        "multiclass"
      ],
      "type": "string"
    },
    "userId": {
      "description": "Creator user id.",
      "type": [
        "string",
        "null"
      ]
    },
    "validationStatus": {
      "description": "Validation status.",
      "enum": [
        "pending",
        "Pending",
        "PENDING",
        "valid",
        "Valid",
        "VALID",
        "invalid",
        "Invalid",
        "INVALID"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "versionNum": {
      "description": "Version number.",
      "type": "integer"
    }
  },
  "required": [
    "customScoringMetricRegistryId",
    "filesCatalogId",
    "id",
    "stage",
    "targetType",
    "versionNum"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 201 | Created | none | CustomScoringMetricVersionResponse |

## Delete A Custom Scoring Metric Version By Metric Id by metric ID

Operation path: `DELETE /api/v2/customScoringMetrics/{metricId}/versions/{versionId}/`

Authentication requirements: `BearerAuth`

Delete a specific version of a custom scoring metric.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| metricId | path | string | true | The ID of the custom scoring metric. |
| versionId | path | string | true | The ID of the custom scoring metric version. |

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 204 | No Content | none | None |

## Retrieve A Custom Scoring Metric Version By Metric Id by metric ID

Operation path: `GET /api/v2/customScoringMetrics/{metricId}/versions/{versionId}/`

Authentication requirements: `BearerAuth`

Get details of a single custom scoring metric version.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| metricId | path | string | true | The ID of the custom scoring metric. |
| versionId | path | string | true | The ID of the custom scoring metric version. |

### Example responses

> 200 Response

```
{
  "properties": {
    "createdAt": {
      "description": "Creation timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "customScoringMetricRegistryId": {
      "description": "Parent metric id.",
      "type": "string"
    },
    "description": {
      "description": "Version notes.",
      "type": [
        "string",
        "null"
      ]
    },
    "filesCatalogId": {
      "description": "Files catalog id backing this version.",
      "type": "string"
    },
    "filesCatalogVersionId": {
      "description": "Files catalog version id.",
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "description": "Version id.",
      "type": "string"
    },
    "metrics": {
      "default": [],
      "description": "Parsed metric definitions.",
      "items": {
        "properties": {
          "description": {
            "default": "Untitled",
            "description": "Custom metric description.",
            "type": [
              "string",
              "null"
            ]
          },
          "entryPoint": {
            "description": "Custom metric function entry point in the Python code on lrs.",
            "type": "string"
          },
          "label": {
            "description": "Custom metrics UI label. will appear in metrics list in UI screen.",
            "type": "string"
          },
          "lowerIsBetter": {
            "default": true,
            "description": "Indicates whether to maximize or minimize the metric function.",
            "type": "boolean"
          },
          "name": {
            "description": "Custom metrics function name. must match the Python code function name.",
            "type": "string"
          },
          "primaryMetric": {
            "description": "Indicates whether this metric is used for project gridsearch hyperparameter search.",
            "type": "boolean"
          },
          "useWeights": {
            "default": false,
            "description": "Indicates whether this metric is using weights.",
            "type": "boolean"
          }
        },
        "required": [
          "entryPoint",
          "label",
          "name",
          "primaryMetric"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 100,
      "type": "array"
    },
    "stage": {
      "description": "Lifecycle stage.",
      "enum": [
        "draft",
        "Draft",
        "DRAFT",
        "registered",
        "Registered",
        "REGISTERED",
        "archived",
        "Archived",
        "ARCHIVED"
      ],
      "type": "string"
    },
    "targetType": {
      "description": "Target type.",
      "enum": [
        "Regression",
        "Binary",
        "Multiclass",
        "regression",
        "binary",
        "multiclass"
      ],
      "type": "string"
    },
    "userId": {
      "description": "Creator user id.",
      "type": [
        "string",
        "null"
      ]
    },
    "validationStatus": {
      "description": "Validation status.",
      "enum": [
        "pending",
        "Pending",
        "PENDING",
        "valid",
        "Valid",
        "VALID",
        "invalid",
        "Invalid",
        "INVALID"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "versionNum": {
      "description": "Version number.",
      "type": "integer"
    }
  },
  "required": [
    "customScoringMetricRegistryId",
    "filesCatalogId",
    "id",
    "stage",
    "targetType",
    "versionNum"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | none | CustomScoringMetricVersionResponse |

## Retrieve A Custom Scoring Metric Version's File Contents By Metric Id by metric ID

Operation path: `GET /api/v2/customScoringMetrics/{metricId}/versions/{versionId}/files/`

Authentication requirements: `BearerAuth`

Get the raw metadata.yaml and custom_metrics.py file contents for a specific custom scoring metric version.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| metricId | path | string | true | The ID of the custom scoring metric. |
| versionId | path | string | true | The ID of the custom scoring metric version. |

### Example responses

> 200 Response

```
{
  "properties": {
    "codeFileContents": {
      "description": "Raw contents of the custom metrics Python file.",
      "type": "string"
    },
    "codeFileName": {
      "description": "Code file name as stored in the catalog.",
      "type": "string"
    },
    "metadataFileContents": {
      "description": "Raw contents of the metadata file as a utf-8 string.",
      "type": "string"
    },
    "metadataFileName": {
      "description": "Metadata file name as stored in the catalog.",
      "type": "string"
    }
  },
  "required": [
    "codeFileContents",
    "codeFileName",
    "metadataFileContents",
    "metadataFileName"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | none | CustomScoringMetricVersionFilesResponse |

# Schemas

## CustomMetric

```
{
  "properties": {
    "description": {
      "default": "Untitled",
      "description": "Custom metric description.",
      "type": [
        "string",
        "null"
      ]
    },
    "entryPoint": {
      "description": "Custom metric function entry point in the Python code on lrs.",
      "type": "string"
    },
    "label": {
      "description": "Custom metrics UI label. will appear in metrics list in UI screen.",
      "type": "string"
    },
    "lowerIsBetter": {
      "default": true,
      "description": "Indicates whether to maximize or minimize the metric function.",
      "type": "boolean"
    },
    "name": {
      "description": "Custom metrics function name. must match the Python code function name.",
      "type": "string"
    },
    "primaryMetric": {
      "description": "Indicates whether this metric is used for project gridsearch hyperparameter search.",
      "type": "boolean"
    },
    "useWeights": {
      "default": false,
      "description": "Indicates whether this metric is using weights.",
      "type": "boolean"
    }
  },
  "required": [
    "entryPoint",
    "label",
    "name",
    "primaryMetric"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| description | string,null | false |  | Custom metric description. |
| entryPoint | string | true |  | Custom metric function entry point in the Python code on lrs. |
| label | string | true |  | Custom metrics UI label. will appear in metrics list in UI screen. |
| lowerIsBetter | boolean | false |  | Indicates whether to maximize or minimize the metric function. |
| name | string | true |  | Custom metrics function name. must match the Python code function name. |
| primaryMetric | boolean | true |  | Indicates whether this metric is used for project gridsearch hyperparameter search. |
| useWeights | boolean | false |  | Indicates whether this metric is using weights. |

## CustomMetricTag

```
{
  "properties": {
    "name": {
      "description": "Name of the tag.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "value": {
      "description": "Value of the tag.",
      "type": "string"
    }
  },
  "required": [
    "name",
    "value"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| name | string | true | maxLength: 255minLength: 1minLength: 1 | Name of the tag. |
| value | string | true |  | Value of the tag. |

## CustomScoringMetricCreate

```
{
  "properties": {
    "description": {
      "description": "Description of the custom scoring metric.",
      "type": [
        "string",
        "null"
      ]
    },
    "name": {
      "description": "Name of the custom scoring metric.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "tags": {
      "default": [],
      "description": "Optional tags for the custom scoring metric.",
      "items": {
        "properties": {
          "name": {
            "description": "Name of the tag.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "value": {
            "description": "Value of the tag.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 50,
      "type": "array"
    },
    "targetType": {
      "description": "Target type for this metric (regression, binary, or multiclass).",
      "enum": [
        "Regression",
        "Binary",
        "Multiclass",
        "regression",
        "binary",
        "multiclass"
      ],
      "type": "string"
    }
  },
  "required": [
    "name",
    "targetType"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| description | string,null | false |  | Description of the custom scoring metric. |
| name | string | true | maxLength: 255minLength: 1minLength: 1 | Name of the custom scoring metric. |
| tags | [CustomMetricTag] | false | maxItems: 50 | Optional tags for the custom scoring metric. |
| targetType | string | true |  | Target type for this metric (regression, binary, or multiclass). |

### Enumerated Values

| Property | Value |
| --- | --- |
| targetType | [Regression, Binary, Multiclass, regression, binary, multiclass] |

## CustomScoringMetricListResponse

```
{
  "properties": {
    "count": {
      "description": "The number of items returned on this page.",
      "type": "integer"
    },
    "data": {
      "description": "A list of custom scoring metrics.",
      "items": {
        "properties": {
          "createdAt": {
            "description": "Creation timestamp.",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "description": "Description.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "Metric id.",
            "type": "string"
          },
          "isArchived": {
            "description": "Archived flag.",
            "type": "boolean"
          },
          "latestVersionNum": {
            "description": "Latest version number.",
            "type": "integer"
          },
          "name": {
            "description": "Name.",
            "type": "string"
          },
          "organizationId": {
            "description": "Organization id.",
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "default": [],
            "description": "Tags.",
            "items": {
              "properties": {
                "name": {
                  "description": "Name of the tag.",
                  "maxLength": 255,
                  "minLength": 1,
                  "type": "string"
                },
                "value": {
                  "description": "Value of the tag.",
                  "type": "string"
                }
              },
              "required": [
                "name",
                "value"
              ],
              "type": "object",
              "x-versionadded": "v2.47"
            },
            "maxItems": 50,
            "type": "array"
          },
          "targetType": {
            "description": "Target type.",
            "enum": [
              "Regression",
              "Binary",
              "Multiclass",
              "regression",
              "binary",
              "multiclass"
            ],
            "type": "string"
          },
          "updatedAt": {
            "description": "Last updated timestamp.",
            "type": [
              "string",
              "null"
            ]
          },
          "userId": {
            "description": "Creator user id.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "isArchived",
          "latestVersionNum",
          "name",
          "targetType",
          "userId"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "next": {
      "description": "The url of the next page (if null, there is no next page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "previous": {
      "description": "The url of the previous page (if null, there is no previous page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "data",
    "next",
    "previous"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| count | integer | false |  | The number of items returned on this page. |
| data | [CustomScoringMetricResponse] | true | maxItems: 1000 | A list of custom scoring metrics. |
| next | string,null(uri) | true |  | The url of the next page (if null, there is no next page). |
| previous | string,null(uri) | true |  | The url of the previous page (if null, there is no previous page). |

## CustomScoringMetricResponse

```
{
  "properties": {
    "createdAt": {
      "description": "Creation timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "description": "Description.",
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "description": "Metric id.",
      "type": "string"
    },
    "isArchived": {
      "description": "Archived flag.",
      "type": "boolean"
    },
    "latestVersionNum": {
      "description": "Latest version number.",
      "type": "integer"
    },
    "name": {
      "description": "Name.",
      "type": "string"
    },
    "organizationId": {
      "description": "Organization id.",
      "type": [
        "string",
        "null"
      ]
    },
    "tags": {
      "default": [],
      "description": "Tags.",
      "items": {
        "properties": {
          "name": {
            "description": "Name of the tag.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "value": {
            "description": "Value of the tag.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 50,
      "type": "array"
    },
    "targetType": {
      "description": "Target type.",
      "enum": [
        "Regression",
        "Binary",
        "Multiclass",
        "regression",
        "binary",
        "multiclass"
      ],
      "type": "string"
    },
    "updatedAt": {
      "description": "Last updated timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "userId": {
      "description": "Creator user id.",
      "type": "string"
    }
  },
  "required": [
    "id",
    "isArchived",
    "latestVersionNum",
    "name",
    "targetType",
    "userId"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| createdAt | string,null | false |  | Creation timestamp. |
| description | string,null | false |  | Description. |
| id | string | true |  | Metric id. |
| isArchived | boolean | true |  | Archived flag. |
| latestVersionNum | integer | true |  | Latest version number. |
| name | string | true |  | Name. |
| organizationId | string,null | false |  | Organization id. |
| tags | [CustomMetricTag] | false | maxItems: 50 | Tags. |
| targetType | string | true |  | Target type. |
| updatedAt | string,null | false |  | Last updated timestamp. |
| userId | string | true |  | Creator user id. |

### Enumerated Values

| Property | Value |
| --- | --- |
| targetType | [Regression, Binary, Multiclass, regression, binary, multiclass] |

## CustomScoringMetricUpdate

```
{
  "properties": {
    "description": {
      "description": "Updated description.",
      "type": [
        "string",
        "null"
      ]
    },
    "name": {
      "description": "Updated name.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "tags": {
      "description": "Updated tags.",
      "items": {
        "properties": {
          "name": {
            "description": "Name of the tag.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "value": {
            "description": "Value of the tag.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 50,
      "type": "array"
    }
  },
  "type": "object",
  "x-versionadded": "v2.47"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| description | string,null | false |  | Updated description. |
| name | string | false | maxLength: 255minLength: 1minLength: 1 | Updated name. |
| tags | [CustomMetricTag] | false | maxItems: 50 | Updated tags. |

## CustomScoringMetricVersionCreate

```
{
  "properties": {
    "description": {
      "description": "Version-level notes.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "type": "object",
  "x-versionadded": "v2.47"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| description | string,null | false |  | Version-level notes. |

## CustomScoringMetricVersionFilesResponse

```
{
  "properties": {
    "codeFileContents": {
      "description": "Raw contents of the custom metrics Python file.",
      "type": "string"
    },
    "codeFileName": {
      "description": "Code file name as stored in the catalog.",
      "type": "string"
    },
    "metadataFileContents": {
      "description": "Raw contents of the metadata file as a utf-8 string.",
      "type": "string"
    },
    "metadataFileName": {
      "description": "Metadata file name as stored in the catalog.",
      "type": "string"
    }
  },
  "required": [
    "codeFileContents",
    "codeFileName",
    "metadataFileContents",
    "metadataFileName"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| codeFileContents | string | true |  | Raw contents of the custom metrics Python file. |
| codeFileName | string | true |  | Code file name as stored in the catalog. |
| metadataFileContents | string | true |  | Raw contents of the metadata file as a utf-8 string. |
| metadataFileName | string | true |  | Metadata file name as stored in the catalog. |

## CustomScoringMetricVersionListResponse

```
{
  "properties": {
    "count": {
      "description": "The number of items returned on this page.",
      "type": "integer"
    },
    "data": {
      "description": "A list of custom scoring metric versions.",
      "items": {
        "properties": {
          "createdAt": {
            "description": "Creation timestamp.",
            "type": [
              "string",
              "null"
            ]
          },
          "customScoringMetricRegistryId": {
            "description": "Parent metric id.",
            "type": "string"
          },
          "description": {
            "description": "Version notes.",
            "type": [
              "string",
              "null"
            ]
          },
          "filesCatalogId": {
            "description": "Files catalog id backing this version.",
            "type": "string"
          },
          "filesCatalogVersionId": {
            "description": "Files catalog version id.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "Version id.",
            "type": "string"
          },
          "metrics": {
            "default": [],
            "description": "Parsed metric definitions.",
            "items": {
              "properties": {
                "description": {
                  "default": "Untitled",
                  "description": "Custom metric description.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "entryPoint": {
                  "description": "Custom metric function entry point in the Python code on lrs.",
                  "type": "string"
                },
                "label": {
                  "description": "Custom metrics UI label. will appear in metrics list in UI screen.",
                  "type": "string"
                },
                "lowerIsBetter": {
                  "default": true,
                  "description": "Indicates whether to maximize or minimize the metric function.",
                  "type": "boolean"
                },
                "name": {
                  "description": "Custom metrics function name. must match the Python code function name.",
                  "type": "string"
                },
                "primaryMetric": {
                  "description": "Indicates whether this metric is used for project gridsearch hyperparameter search.",
                  "type": "boolean"
                },
                "useWeights": {
                  "default": false,
                  "description": "Indicates whether this metric is using weights.",
                  "type": "boolean"
                }
              },
              "required": [
                "entryPoint",
                "label",
                "name",
                "primaryMetric"
              ],
              "type": "object",
              "x-versionadded": "v2.47"
            },
            "maxItems": 100,
            "type": "array"
          },
          "stage": {
            "description": "Lifecycle stage.",
            "enum": [
              "draft",
              "Draft",
              "DRAFT",
              "registered",
              "Registered",
              "REGISTERED",
              "archived",
              "Archived",
              "ARCHIVED"
            ],
            "type": "string"
          },
          "targetType": {
            "description": "Target type.",
            "enum": [
              "Regression",
              "Binary",
              "Multiclass",
              "regression",
              "binary",
              "multiclass"
            ],
            "type": "string"
          },
          "userId": {
            "description": "Creator user id.",
            "type": [
              "string",
              "null"
            ]
          },
          "validationStatus": {
            "description": "Validation status.",
            "enum": [
              "pending",
              "Pending",
              "PENDING",
              "valid",
              "Valid",
              "VALID",
              "invalid",
              "Invalid",
              "INVALID"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "versionNum": {
            "description": "Version number.",
            "type": "integer"
          }
        },
        "required": [
          "customScoringMetricRegistryId",
          "filesCatalogId",
          "id",
          "stage",
          "targetType",
          "versionNum"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "next": {
      "description": "The url of the next page (if null, there is no next page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "previous": {
      "description": "The url of the previous page (if null, there is no previous page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "data",
    "next",
    "previous"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| count | integer | false |  | The number of items returned on this page. |
| data | [CustomScoringMetricVersionResponse] | true | maxItems: 1000 | A list of custom scoring metric versions. |
| next | string,null(uri) | true |  | The url of the next page (if null, there is no next page). |
| previous | string,null(uri) | true |  | The url of the previous page (if null, there is no previous page). |

## CustomScoringMetricVersionResponse

```
{
  "properties": {
    "createdAt": {
      "description": "Creation timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "customScoringMetricRegistryId": {
      "description": "Parent metric id.",
      "type": "string"
    },
    "description": {
      "description": "Version notes.",
      "type": [
        "string",
        "null"
      ]
    },
    "filesCatalogId": {
      "description": "Files catalog id backing this version.",
      "type": "string"
    },
    "filesCatalogVersionId": {
      "description": "Files catalog version id.",
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "description": "Version id.",
      "type": "string"
    },
    "metrics": {
      "default": [],
      "description": "Parsed metric definitions.",
      "items": {
        "properties": {
          "description": {
            "default": "Untitled",
            "description": "Custom metric description.",
            "type": [
              "string",
              "null"
            ]
          },
          "entryPoint": {
            "description": "Custom metric function entry point in the Python code on lrs.",
            "type": "string"
          },
          "label": {
            "description": "Custom metrics UI label. will appear in metrics list in UI screen.",
            "type": "string"
          },
          "lowerIsBetter": {
            "default": true,
            "description": "Indicates whether to maximize or minimize the metric function.",
            "type": "boolean"
          },
          "name": {
            "description": "Custom metrics function name. must match the Python code function name.",
            "type": "string"
          },
          "primaryMetric": {
            "description": "Indicates whether this metric is used for project gridsearch hyperparameter search.",
            "type": "boolean"
          },
          "useWeights": {
            "default": false,
            "description": "Indicates whether this metric is using weights.",
            "type": "boolean"
          }
        },
        "required": [
          "entryPoint",
          "label",
          "name",
          "primaryMetric"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 100,
      "type": "array"
    },
    "stage": {
      "description": "Lifecycle stage.",
      "enum": [
        "draft",
        "Draft",
        "DRAFT",
        "registered",
        "Registered",
        "REGISTERED",
        "archived",
        "Archived",
        "ARCHIVED"
      ],
      "type": "string"
    },
    "targetType": {
      "description": "Target type.",
      "enum": [
        "Regression",
        "Binary",
        "Multiclass",
        "regression",
        "binary",
        "multiclass"
      ],
      "type": "string"
    },
    "userId": {
      "description": "Creator user id.",
      "type": [
        "string",
        "null"
      ]
    },
    "validationStatus": {
      "description": "Validation status.",
      "enum": [
        "pending",
        "Pending",
        "PENDING",
        "valid",
        "Valid",
        "VALID",
        "invalid",
        "Invalid",
        "INVALID"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "versionNum": {
      "description": "Version number.",
      "type": "integer"
    }
  },
  "required": [
    "customScoringMetricRegistryId",
    "filesCatalogId",
    "id",
    "stage",
    "targetType",
    "versionNum"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| createdAt | string,null | false |  | Creation timestamp. |
| customScoringMetricRegistryId | string | true |  | Parent metric id. |
| description | string,null | false |  | Version notes. |
| filesCatalogId | string | true |  | Files catalog id backing this version. |
| filesCatalogVersionId | string,null | false |  | Files catalog version id. |
| id | string | true |  | Version id. |
| metrics | [CustomMetric] | false | maxItems: 100 | Parsed metric definitions. |
| stage | string | true |  | Lifecycle stage. |
| targetType | string | true |  | Target type. |
| userId | string,null | false |  | Creator user id. |
| validationStatus | string,null | false |  | Validation status. |
| versionNum | integer | true |  | Version number. |

### Enumerated Values

| Property | Value |
| --- | --- |
| stage | [draft, Draft, DRAFT, registered, Registered, REGISTERED, archived, Archived, ARCHIVED] |
| targetType | [Regression, Binary, Multiclass, regression, binary, multiclass] |
| validationStatus | [pending, Pending, PENDING, valid, Valid, VALID, invalid, Invalid, INVALID] |
