update metrics endpoint settings.md
Update metrics endpoint settings
PATCH https://app.mk.io/api/v1/projects/{project_name}/metricsEndpoint
See our Grafana dashboard documentation for details.
Enable the metrics endpoint for this project by setting spec.enabled to true.
RBAC Capability Required: mkio.metrics.update
Authentication
Authorizationheader — Bearer authentication of the formBearer <token>.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_name |
string | Yes | — |
Request body
Content type: application/json
kind· string · Optional — The kind of record.spec· object · Required — Specification.enabled· boolean · Required — Is metrics enabled?
Example request
curl -X PATCH "https://app.mk.io/api/v1/projects/{project_name}/metricsEndpoint" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"kind": "string",
"spec": {
"enabled": true
}
}'
Responses
200 — OK
kind· string · Optional — The kind of record.spec· object · Required — Specification.enabled· boolean · Required — Is metrics enabled?
status· object · 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.
Example:
{
"kind": "string",
"spec": {
"enabled": true
},
"status": {
"password": "string",
"url": "string",
"username": "string"
}
}
400 — Bad Request
error· object · Required — Pertinent information about the errorcode· 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 — map of additional properties
ref· string · Required — A reference to the request that caused the error.status· integer · Required — The HTTP status code
Example:
{
"error": {
"code": "string",
"detail": "string",
"extraDetail": {
"key": null
}
},
"ref": "string",
"status": 0
}
401 — Unauthorized
Example:
{
"error": {
"code": "string",
"detail": "string",
"extraDetail": {
"key": null
}
},
"ref": "string",
"status": 0
}
403 — Forbidden
Example:
{
"error": {
"code": "string",
"detail": "string",
"extraDetail": {
"key": null
}
},
"ref": "string",
"status": 0
}
404 — Not Found
Example:
{
"error": {
"code": "string",
"detail": "string",
"extraDetail": {
"key": null
}
},
"ref": "string",
"status": 0
}
429 — Too Many Requests
Example:
{
"error": {
"code": "string",
"detail": "string",
"extraDetail": {
"key": null
}
},
"ref": "string",
"status": 0
}
500 — Internal Server Error
Example:
{
"error": {
"code": "string",
"detail": "string",
"extraDetail": {
"key": null
}
},
"ref": "string",
"status": 0
}
Source spec: management-api · operationId: [patch]_/api/v1/projects/{project_name}/metricsEndpoint