Start typing to search.

API Reference

Update a metrics config

View Markdown

Update a metrics config

PUT /api/metrics/config/{id}

Update a metrics config

Operation ID: updateMetricsConfig

Authentication

Option 1

  • BearerAuth (http bearer) API key token. Create via POST /api/api-keys. Format: envoy_<hex>

Option 2

  • CookieAuth (apiKey) Session cookie set after login + TOTP verification

Path parameters

  • idinteger, required Resource ID

Request body

The request body is required.

application/json

  • Type: object
  • Properties:
    • backend (string)
    • config (object)
      • Additional properties: allowed
    • enabled (boolean)

Success responses

200

Config updated

Content type: application/json

  • Type: object

Error responses

404

Resource not found

Content type: application/json

  • Reference: Error
    • Type: object
    • Properties:
      • error (string)
        • Example: NOT_FOUND
      • message (string)
        • Example: Resource not found

Example:

{
  "error": "NOT_FOUND",
  "message": "Resource not found"
}

Examples

cURL

curl --request PUT \
  --url 'https://your-envoy.example.com/api/metrics/config/YOUR_ID' \
  --header 'Authorization: Bearer $API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "backend": "string",
  "config": {},
  "enabled": true
}'

JavaScript (fetch)

const response = await fetch('https://your-envoy.example.com/api/metrics/config/YOUR_ID', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "backend": "string",
    "config": {},
    "enabled": true
  }),
});
 
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = response.status === 204 ? null : await response.json();
console.log(data);