---
title: "Update Metric Source"
method: PATCH
path: "/api/endpoint-monitor/endpoints/{endpoint_id}/metric-source"
tags: ["endpoint-monitor"]
---

# Update Metric Source

`PATCH /api/endpoint-monitor/endpoints/{endpoint_id}/metric-source`

## Request

- Base URL: `https://api.deeptrace.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.deeptrace.com/api/endpoint-monitor/endpoints/{endpoint_id}/metric-source`
- Auth: none declared

Update the latency metric query for an endpoint. Validates the query first.

## Path parameters

- `endpoint_id` string, uuid, required

## Request body

- UpdateMetricSourceRequest: Request to update the monitored latency metric for an endpoint.
  - `name` string
  - `query` string, required
  - `provider` string
  - `datasource_uid` string

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/deeptrace/apis/deeptrace-api.md) - [All operations](https://skmtc.dev/deeptrace/apis/deeptrace-api/llms.txt) - [OpenAPI document](https://skmtc.dev/deeptrace/apis/deeptrace-api/revisions/855e59bb07f0?raw)
