/alerts/config - Get the caller's alerting layer

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://api.my.nethesis.it/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "my.nethesis.it MCP server": {
    "url": "https://api.my.nethesis.it/mcp"
  }
}

Close
GET /alerts/config

Returns the CALLER's own alerting configuration layer. No inherited ancestor layers, no merged effective view: every organization sees only its own configuration. The server-side merge that backs the Mimir YAML stays inside the backend.

When the caller has never saved a layer the response body contains an empty layer (toggles all null, recipient lists empty) and the two audit fields set to null. The UI uses that state to render a first-save form.

Requires read:alerts permission.

Responses

  • 200 application/json

    Caller's layer

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data object

      The caller's alerting configuration. This is what POST /alerts/config accepts and what GET /alerts/config returns; the merged effective config that backs Mimir is computed server-side and never exposed.

      Each recipient carries its own severities[] (empty = all severities); email recipients additionally carry per-recipient language and format. Channel toggles under enabled are tri-state: null = no opinion at this layer (inherit), true = enabled, false = disabled (Owner only — non-Owner false is normalised to null on save).

      Body size: the request body is capped at 1 MiB on POST. Oversized requests are rejected with HTTP 413 before binding.

      Hide data attributes Show data attributes object
      • enabled object

        Per-layer enable/disable for each notification channel. Each value is tri-state:

        • true — explicitly enabled at this layer
        • false — explicitly disabled (Owner only; non-Owner false is normalised to null on save)
        • null — no opinion at this layer; effective state inherits from the merge of any ancestor layer that took a position. If no layer in the chain enables a channel, the channel stays off.
        Hide enabled attributes Show enabled attributes object
        • email boolean | null
        • webhook boolean | null
        • telegram boolean | null
      • email_recipients array[object]

        Not more than 50 elements.

        Hide email_recipients attributes Show email_recipients attributes object
        • address string(email) Required

          Maximum length is 320.

        • severities array[string]

          Severity scope for this recipient. Empty (or omitted) means "all severities" — the recipient lands on every per-severity receiver. A non-empty subset narrows delivery to those severities.

          Not more than 3 elements. Values are critical, warning, or info.

        • language string

          Rendering language for this recipient's email body and subject. Defaults to en when omitted.

          Values are en or it.

        • format string

          Body format preference. html (default) emits multipart with an html primary body and text alternative; plain emits only a text body.

          Values are html or plain.

        • scope object

          Narrows a recipient to the alerts of some organizations and/or some systems; an alert matches when it falls in any list. Omitted or all lists empty means every system the layer reaches. Every id must belong to the caller's hierarchy, otherwise the save fails with out_of_scope on <channel>_recipients.<i>.scope.

          Hide scope attributes Show scope attributes object
          • managed_organization_ids array[string]

            "Managed by": the systems of each organization and of its whole sub-tree (a distributor's resellers and customers, a reseller's customers).

            Not more than 100 elements. Format of each should match the following pattern: ^[A-Za-z0-9_-]{1,255}$.

          • assigned_organization_ids array[string]

            Only the systems assigned to each organization itself, not those of the organizations it manages.

            Not more than 100 elements. Format of each should match the following pattern: ^[A-Za-z0-9_-]{1,255}$.

          • system_ids array[string]

            Not more than 500 elements. Format of each should match the following pattern: ^[A-Za-z0-9_-]{1,255}$.

      • webhook_recipients array[object]

        Not more than 20 elements.

        Hide webhook_recipients attributes Show webhook_recipients attributes object
        • name string Required

          Descriptive label for the webhook target (UI only).

          Maximum length is 100.

        • url string(uri) Required

          Webhook URL. Validation rejects non-public destinations (loopback, RFC1918, RFC6598 CGNAT, link-local, multicast, cloud metadata) and requires a canonical hostname (containing at least one letter) or a valid IP literal. Only http/https schemes are accepted; URLs cannot embed userinfo.

          Maximum length is 2048.

        • severities array[string]

          Not more than 3 elements. Values are critical, warning, or info.

        • scope object

          Narrows a recipient to the alerts of some organizations and/or some systems; an alert matches when it falls in any list. Omitted or all lists empty means every system the layer reaches. Every id must belong to the caller's hierarchy, otherwise the save fails with out_of_scope on <channel>_recipients.<i>.scope.

          Hide scope attributes Show scope attributes object
          • managed_organization_ids array[string]

            "Managed by": the systems of each organization and of its whole sub-tree (a distributor's resellers and customers, a reseller's customers).

            Not more than 100 elements. Format of each should match the following pattern: ^[A-Za-z0-9_-]{1,255}$.

          • assigned_organization_ids array[string]

            Only the systems assigned to each organization itself, not those of the organizations it manages.

            Not more than 100 elements. Format of each should match the following pattern: ^[A-Za-z0-9_-]{1,255}$.

          • system_ids array[string]

            Not more than 500 elements. Format of each should match the following pattern: ^[A-Za-z0-9_-]{1,255}$.

      • telegram_recipients array[object]

        Not more than 20 elements.

        Hide telegram_recipients attributes Show telegram_recipients attributes object
        • bot_token string Required

          Maximum length is 256.

        • chat_id integer(int64) Required
        • message_thread_id integer(int64)

          Topic of a forum-enabled supergroup to post into. Omit to post in the General topic (or in the plain chat when topics are off).

          Minimum value is 1.

        • severities array[string]

          Not more than 3 elements. Values are critical, warning, or info.

        • scope object

          Narrows a recipient to the alerts of some organizations and/or some systems; an alert matches when it falls in any list. Omitted or all lists empty means every system the layer reaches. Every id must belong to the caller's hierarchy, otherwise the save fails with out_of_scope on <channel>_recipients.<i>.scope.

          Hide scope attributes Show scope attributes object
          • managed_organization_ids array[string]

            "Managed by": the systems of each organization and of its whole sub-tree (a distributor's resellers and customers, a reseller's customers).

            Not more than 100 elements. Format of each should match the following pattern: ^[A-Za-z0-9_-]{1,255}$.

          • assigned_organization_ids array[string]

            Only the systems assigned to each organization itself, not those of the organizations it manages.

            Not more than 100 elements. Format of each should match the following pattern: ^[A-Za-z0-9_-]{1,255}$.

          • system_ids array[string]

            Not more than 500 elements. Format of each should match the following pattern: ^[A-Za-z0-9_-]{1,255}$.

      • scope_names object

        Display names of the organizations and systems referenced by recipient scopes; ids no longer resolvable are absent.

        Hide scope_names attributes Show scope_names attributes object
        • organizations object
          Hide organizations attribute Show organizations attribute object
          • * object Additional properties
            Hide * attributes Show * attributes object
            • name string
            • type string

              Values are distributor, reseller, or customer.

        • systems object
          Hide systems attribute Show systems attribute object
          • * object Additional properties
            Hide * attributes Show * attributes object
            • name string
            • organization_name string
      • updated_by_name string | null
      • updated_at string(date-time) | null
      • propagation object | null

        Progress of the last background fan-out of this layer (saves reaching more than 10 tenants). Null when none ran since the backend started. Kept in memory only.

        Hide propagation attributes Show propagation attributes object | null
        • state string

          Values are running, done, or incomplete.

        • total integer

          Tenants to push

        • pushed integer

          Tenants pushed so far

        • failed integer

          Tenants still failing after the retries

        • started_at string(date-time)
        • finished_at string(date-time) | null
  • 401 application/json

    Unauthorized - invalid or missing token

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data object | null
  • 403 application/json

    Forbidden - insufficient permissions

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data object | null
GET /alerts/config
curl \
 --request GET 'https://my.nethesis.it/backend/api/alerts/config' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "code": 200,
  "message": "alerting layer retrieved successfully",
  "data": {
    "enabled": {
      "email": true,
      "webhook": null,
      "telegram": null
    },
    "email_recipients": [
      {
        "address": "noc@reseller.example",
        "severities": [
          "critical"
        ],
        "language": "it",
        "format": "html"
      }
    ],
    "webhook_recipients": [],
    "telegram_recipients": [],
    "updated_by_name": "Reseller Admin",
    "updated_at": "2026-05-09T10:14:00Z"
  }
}
{
  "code": 200,
  "message": "alerting layer retrieved successfully",
  "data": {
    "enabled": {
      "email": null,
      "webhook": null,
      "telegram": null
    },
    "email_recipients": [],
    "webhook_recipients": [],
    "telegram_recipients": [],
    "updated_by_name": null,
    "updated_at": null
  }
}
Response examples (401)
{
  "code": 401,
  "message": "invalid token",
  "data": {}
}
Response examples (403)
{
  "code": 403,
  "message": "insufficient permissions",
  "data": {}
}