# Update metrics endpoint settings

Patch `https://app.mk.io/api/v1/projects/:project_name/metricsEndpoint`

See [our Grafana dashboard](https://grafana.com/grafana/dashboards/21657-mk-io-metrics-monitor/) documentation for details.

Enable the metrics endpoint for this project by setting `spec.enabled` to `true`.

RBAC Capability Required: `mkio.metrics.update`

## Authentication

Authorization Bearer

Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Path parameters

- **project_name** string Required

## Request

This endpoint expects an object.

- **kind** string Optional  
  The kind of record.
- **spec** object [MetricsSpecSchema](https://docs.mediakind.com/api-reference/management-api/schemas/metricsspecschema) Required  
  Specification.  
  - **enabled** boolean Required  
    Is metrics enabled?

## Response

**200 OK**

- **kind** string Optional  
  The kind of record.
- **spec** object [MetricsSpecSchema](https://docs.mediakind.com/api-reference/management-api/schemas/metricsspecschema) Required  
  Specification.  
  - **enabled** boolean Required  
    Is metrics enabled?
- **status** object [MetricsStatusSchema](https://docs.mediakind.com/api-reference/management-api/schemas/metricsstatusschema) Optional  
  Status when spec.enabled is true.  
  - **password** string Required  
    Password for metrics.
  - **url** string Required  
    URL for metrics.
  - **username** string Required  
    Username for metrics.

## Errors

### 400 Bad Request

- **error** object [ErrorDetail](https://docs.mediakind.com/api-reference/management-api/schemas/errordetail) Required  
  Pertinent information about the error  
  - **code** string Required  
  The error code.  
  - **detail** string Required  
    The error message.
  - **extraDetail** map from strings to any Optional  
    Extra information regarding this error.  
    - [any key] any  
  - **ref** string Required  
    A reference to the request that caused the error.
  - **status** integer Required  
    The HTTP status code

### 401 Unauthorized

### 403 Forbidden

### 404 Not Found

### 429 Too Many Requests

### 500 Internal Server Error
