# Tracking Agent
URL: https://docs.datarobot.com/en/docs/api/reference/public-api/tracking_agent.html

> Use the endpoints described below to manage tracking agent. When you enable the monitoring agent feature, you have access to the agent installation and MLOps components, all packaged within a single tarball.

# Tracking Agent

Use the endpoints described below to manage tracking agent. When you enable the monitoring agent feature, you have access to the agent installation and MLOps components, all packaged within a single tarball.

## Submit external deployment prediction data by deployment ID

Operation path: `POST /api/v2/deployments/{deploymentId}/predictionInputs/fromDataset/`

Authentication requirements: `BearerAuth`

Assigns prediction dataset to the external deployment to enable the analysis of historical model performance. Multiple datasets containing historical predictions for the external deployment can be uploaded. This requires one request for each dataset. For a regression deployment, predictions can be either an int or float. For a classification (binary/multiclass) deployment, predictions must be lists with each list containing probabilities for each class.

### Body parameter

```
{
  "properties": {
    "datasetId": {
      "description": "the ID of the dataset",
      "type": "string"
    },
    "datasetVersionId": {
      "description": "the ID of the dataset version",
      "type": "string"
    }
  },
  "required": [
    "datasetId"
  ],
  "type": "object"
}
```

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| deploymentId | path | string | true | Unique identifier of the deployment. |
| body | body | PredictionDatasetAssignment | false | none |

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 202 | Accepted | Submitted successfully. | None |
| 405 | Method Not Allowed | Data can only be uploaded to an external deployment. | None |
| 422 | Unprocessable Entity | Unable to process predictions upload. | None |

# Schemas

## PredictionDatasetAssignment

```
{
  "properties": {
    "datasetId": {
      "description": "the ID of the dataset",
      "type": "string"
    },
    "datasetVersionId": {
      "description": "the ID of the dataset version",
      "type": "string"
    }
  },
  "required": [
    "datasetId"
  ],
  "type": "object"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| datasetId | string | true |  | the ID of the dataset |
| datasetVersionId | string | false |  | the ID of the dataset version |

---
