diff --git a/README.md b/README.md index b8abbd9..1539e6d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ The official Go client for the [Flashduty](https://flashcat.cloud) Open API — 📖 **API reference:** -> **Status:** All 304 Open API operations across 34 services are generated from the Flashduty OpenAPI specification, covered by unit tests, and validated end-to-end against the live API. +> **Status:** Typed API operations are generated from the Flashduty OpenAPI specification, covered by unit tests, and validated end-to-end against the live API. ## Install diff --git a/models_gen.go b/models_gen.go index 46c269b..fd7d579 100644 --- a/models_gen.go +++ b/models_gen.go @@ -8765,647 +8765,6 @@ type ServiceDeskPlusRequestMappingItem struct { Status string `json:"status" toon:"status"` } -// ServiceMapAnchor is generated from the Flashduty OpenAPI schema. -type ServiceMapAnchor struct { - // Optional process/entity ID within the host to anchor on. Omit to anchor on the whole host. - EntityID string `json:"entity_id,omitempty" toon:"entity_id,omitempty"` - // Stable ServiceMap host identifier, e.g. `host_0123...`. Must already be known to ServiceMap. - HostID string `json:"host_id" toon:"host_id"` -} - -// ServiceMapCapability is generated from the Flashduty OpenAPI schema. -type ServiceMapCapability struct { - // Capture mode, e.g. `ebpf` or `polling`. - CaptureMode string `json:"capture_mode" toon:"capture_mode"` - // True if ServiceMap collection is enabled on this host. - Enabled bool `json:"enabled" toon:"enabled"` - // Host ID this capability describes. - HostID string `json:"host_id" toon:"host_id"` - // True if the host has an inventory row with ServiceMap capability metadata at all. - Present bool `json:"present" toon:"present"` - // Machine-readable codes explaining the current capability status. - ReasonCodes []string `json:"reason_codes" toon:"reason_codes"` - // Configured reporting interval in milliseconds. - ReportIntervalMs int64 `json:"report_interval_ms" toon:"report_interval_ms"` - // True if the agent has produced at least one full snapshot. - SnapshotReady bool `json:"snapshot_ready" toon:"snapshot_ready"` - // Agent-reported capability status, e.g. `running`, `disabled`, `starting`, `failed`, `unsupported`. - Status string `json:"status" toon:"status"` -} - -// ServiceMapEdge is generated from the Flashduty OpenAPI schema. -type ServiceMapEdge struct { - // Traversal depth this edge was discovered at, relative to the anchor. - Depth int64 `json:"depth" toon:"depth"` - // Destination endpoint of the connection. - Destination ServiceMapEndpoint `json:"destination" toon:"destination"` - // Resolution of the destination endpoint to candidate target nodes. - EndpointResolution ServiceMapEndpointResolution `json:"endpoint_resolution" toon:"endpoint_resolution"` - // How the edge was observed, e.g. `connect`. - Evidence string `json:"evidence" toon:"evidence"` - // Timestamp the edge was first observed. - FirstSeen string `json:"first_seen" toon:"first_seen"` - // Host the edge's source node lives on. - HostID string `json:"host_id" toon:"host_id"` - // Edge ID, unique within its host. - ID string `json:"id" toon:"id"` - // Timestamp the edge was last observed. - LastSeen string `json:"last_seen" toon:"last_seen"` - // Opaque per-edge metrics payload, only present when `include_metrics=true` was requested. - Metrics any `json:"metrics" toon:"metrics"` - // Entity ID of the source node. - SourceEntityID string `json:"source_entity_id" toon:"source_entity_id"` - // Network namespace ID the connection originated from. - SourceNetnsID string `json:"source_netns_id" toon:"source_netns_id"` -} - -// ServiceMapEndpoint is generated from the Flashduty OpenAPI schema. -type ServiceMapEndpoint struct { - // Destination IP address. - IP string `json:"ip" toon:"ip"` - // Destination port. - Port int64 `json:"port" toon:"port"` - // Transport protocol, `tcp` or `udp`. - Protocol string `json:"protocol" toon:"protocol"` -} - -// ServiceMapEndpointResolution is generated from the Flashduty OpenAPI schema. -type ServiceMapEndpointResolution struct { - // Candidate nodes found for this endpoint, ranked by confidence. - Candidates []ServiceMapResolutionCandidate `json:"candidates" toon:"candidates"` - // True if the candidate list was cut short by an internal query budget. - CandidatesTruncated bool `json:"candidates_truncated" toon:"candidates_truncated"` - // The destination endpoint being resolved. - Endpoint ServiceMapEndpoint `json:"endpoint" toon:"endpoint"` - // Machine-readable reason code when `status` is not `resolved`, e.g. `no_current_listener`, `multiple_current_listeners`, `query_budget_exceeded`. - Reason string `json:"reason" toon:"reason"` - // Resolution outcome. `resolved` = exactly one confident candidate; `ambiguous` = multiple or low-confidence candidates; `unresolved` = no candidate found. - Status string `json:"status" toon:"status"` -} - -// ServiceMapFleetBrowseRequest is generated from the Flashduty OpenAPI schema. -type ServiceMapFleetBrowseRequest struct { - // Filter to hosts on any of these exact agent versions. Up to 20 values. - AgentVersions []string `json:"agent_versions,omitempty" toon:"agent_versions,omitempty"` - // Filter to hosts using any of these capture modes. `unknown` matches hosts that have not reported a capture mode yet. - CaptureModes []string `json:"capture_modes,omitempty" toon:"capture_modes,omitempty"` - // Opaque pagination cursor. Pass back the exact value from a previous response's `next_cursor`; omit for the first page. - Cursor string `json:"cursor,omitempty" toon:"cursor,omitempty"` - // Filter to hosts in any of these exact edge cluster names. Up to 20 values. - EdgeClusters []string `json:"edge_clusters,omitempty" toon:"edge_clusters,omitempty"` - // Maximum number of matching hosts to return in this page. Default 50, range 1-100. - Limit int64 `json:"limit,omitempty" toon:"limit,omitempty"` - // Maximum number of candidate hosts to examine while filling this page. Default 1000, range `limit`-2000. - ScanLimit int64 `json:"scan_limit,omitempty" toon:"scan_limit,omitempty"` - // Filter to hosts currently in any of these statuses. Up to 20 values. - Statuses []string `json:"statuses,omitempty" toon:"statuses,omitempty"` -} - -// ServiceMapFleetBrowseResponse is generated from the Flashduty OpenAPI schema. -type ServiceMapFleetBrowseResponse struct { - // Coverage of the candidate scan that produced this page. - Coverage ServiceMapFleetCoverage `json:"coverage" toon:"coverage"` - // Unix timestamp in milliseconds this response was generated. - GeneratedAtMs TimestampMilli `json:"generated_at_ms" toon:"generated_at_ms"` - // Matching hosts for this page. - Items []ServiceMapFleetHost `json:"items" toon:"items"` - // Opaque cursor to fetch the next page. Absent when there are no more candidates to scan. - NextCursor string `json:"next_cursor" toon:"next_cursor"` - // True if any host in this page failed to read status, or the scan was truncated. - Partial bool `json:"partial" toon:"partial"` - // True if `scan_limit` was reached before finding `limit` matches; `next_cursor` may still find more. - Truncated bool `json:"truncated" toon:"truncated"` - // Machine-readable reasons the scan was truncated, when `truncated=true`. - TruncationReasons []string `json:"truncation_reasons" toon:"truncation_reasons"` -} - -// ServiceMapFleetCoverage is generated from the Flashduty OpenAPI schema. -type ServiceMapFleetCoverage struct { - // Number of candidate hosts whose status could not be read. - Failed int64 `json:"failed" toon:"failed"` - // Number of scanned hosts that passed all filters. - Matched int64 `json:"matched" toon:"matched"` - // Number of matched hosts included in this page (`<= limit`). - Returned int64 `json:"returned" toon:"returned"` - // Number of distinct candidate hosts actually examined in this request. - Scanned int64 `json:"scanned" toon:"scanned"` - // Count of returned items per status value; always includes all seven status keys, zero-filled. Reflects only this page, not the account's full population. - States map[string]int64 `json:"states" toon:"states"` -} - -// ServiceMapFleetHost is generated from the Flashduty OpenAPI schema. -type ServiceMapFleetHost struct { - // Agent version reported by this host. - AgentVersion string `json:"agent_version" toon:"agent_version"` - // Edge cluster name this host belongs to. - EdgeCluster string `json:"edge_cluster" toon:"edge_cluster"` - // Stable ServiceMap host identifier. - HostID string `json:"host_id" toon:"host_id"` - // ServiceMap capability and current collection status for this host. - Servicemap ServiceMapFleetHostCapability `json:"servicemap" toon:"servicemap"` -} - -// ServiceMapFleetHostCapability is generated from the Flashduty OpenAPI schema. -type ServiceMapFleetHostCapability struct { - // True if the host has an authoritative current graph. - Authoritative bool `json:"authoritative" toon:"authoritative"` - // Agent-reported capability status, e.g. `running`, `disabled`, `starting`, `failed`, `unsupported`. - CapabilityStatus string `json:"capability_status" toon:"capability_status"` - // Capture mode, e.g. `ebpf` or `polling`. - CaptureMode string `json:"capture_mode" toon:"capture_mode"` - // Number of edges in the host's current graph. - EdgeCount int64 `json:"edge_count" toon:"edge_count"` - // True if ServiceMap collection is enabled on this host. - Enabled bool `json:"enabled" toon:"enabled"` - // Set to `status_unavailable` when this host's live status could not be read; other fields fall back to inventory-derived defaults in that case. - ErrorCode string `json:"error_code" toon:"error_code"` - // Freshness classification of the host's graph. `fresh` = the latest snapshot was received within 2× the report interval; `stale` = no new snapshot within 2× the report interval; `unknown` = no topology snapshot ever received, freshness undecidable. - FreshnessStatus string `json:"freshness_status" toon:"freshness_status"` - // True if a current graph can be fetched for this host right now. - GraphAvailable bool `json:"graph_available" toon:"graph_available"` - // Age in milliseconds of the host's graph data, relative to when this response was generated. - MaxAgeMs int64 `json:"max_age_ms" toon:"max_age_ms"` - // Number of nodes in the host's current graph. - NodeCount int64 `json:"node_count" toon:"node_count"` - // Unix timestamp in milliseconds the host's graph was observed by the agent. - ObservedAtMs TimestampMilli `json:"observed_at_ms" toon:"observed_at_ms"` - // Machine-readable codes explaining the current status. - ReasonCodes []string `json:"reason_codes" toon:"reason_codes"` - // Unix timestamp in milliseconds the host's current graph generation was received by the server. - ReceivedAtMs TimestampMilli `json:"received_at_ms" toon:"received_at_ms"` - // Configured reporting interval in milliseconds. - ReportIntervalMs int64 `json:"report_interval_ms" toon:"report_interval_ms"` - // True if the agent has produced at least one full snapshot. - SnapshotReady bool `json:"snapshot_ready" toon:"snapshot_ready"` - // Overall ServiceMap collection status. - // - // | Value | Meaning | - // |---|---| - // | `active` | Collection healthy: a fresh snapshot exists with no degradation. | - // | `degraded` | Collecting but quality is impaired: health reports are newer than the snapshot, the snapshot is truncated/degraded, or collection is failing. | - // | `stale` | A snapshot exists but is outdated (not updated within 2× the report interval). | - // | `initializing` | The agent has reported the capability but the first snapshot is not ready yet. | - // | `disabled` | Topology collection is disabled on this host. | - // | `unsupported` | The agent or kernel does not support this collection. | - // | `no_data` | No snapshot or health data received at all. | - Status string `json:"status" toon:"status"` -} - -// ServiceMapFleetSummaryCoverage is generated from the Flashduty OpenAPI schema. -type ServiceMapFleetSummaryCoverage struct { - // Number of matched hosts successfully classified into one of the seven statuses; equals the sum of `states`. - Classified int64 `json:"classified" toon:"classified"` - // Number of hosts whose candidate/detail read raced or whose live status could not be read. - Failed int64 `json:"failed" toon:"failed"` - // Number of scanned hosts that passed the agent version / edge cluster / capture mode filters and still have a current inventory row. - Matched int64 `json:"matched" toon:"matched"` - // Number of distinct candidate hosts actually examined. - Scanned int64 `json:"scanned" toon:"scanned"` - // Count of hosts per status value; always includes all seven keys, zero-filled. - States map[string]int64 `json:"states" toon:"states"` -} - -// ServiceMapFleetSummaryRequest is generated from the Flashduty OpenAPI schema. -type ServiceMapFleetSummaryRequest struct { - // Filter to hosts on any of these exact agent versions. Up to 20 values. - AgentVersions []string `json:"agent_versions,omitempty" toon:"agent_versions,omitempty"` - // Filter to hosts using any of these capture modes. `unknown` matches hosts that have not reported a capture mode yet. - CaptureModes []string `json:"capture_modes,omitempty" toon:"capture_modes,omitempty"` - // Filter to hosts in any of these exact edge cluster names. Up to 20 values. - EdgeClusters []string `json:"edge_clusters,omitempty" toon:"edge_clusters,omitempty"` - // Maximum number of candidate hosts to scan. Default 2000, range 1-5000. - ScanLimit int64 `json:"scan_limit,omitempty" toon:"scan_limit,omitempty"` -} - -// ServiceMapFleetSummaryResponse is generated from the Flashduty OpenAPI schema. -type ServiceMapFleetSummaryResponse struct { - // Aggregate status distribution across the scanned candidate hosts. - Coverage ServiceMapFleetSummaryCoverage `json:"coverage" toon:"coverage"` - // Unix timestamp in milliseconds this response was generated. - GeneratedAtMs TimestampMilli `json:"generated_at_ms" toon:"generated_at_ms"` - // True if the scan was truncated or any host failed to classify. - Partial bool `json:"partial" toon:"partial"` - // The normalized scan budget actually applied, echoing the default when the request omitted it. - ScanLimit int64 `json:"scan_limit" toon:"scan_limit"` - // True if `scan_limit` was reached before scanning every candidate host in the account. - Truncated bool `json:"truncated" toon:"truncated"` - // Machine-readable reasons the scan was truncated, when `truncated=true`. - TruncationReasons []string `json:"truncation_reasons" toon:"truncation_reasons"` -} - -// ServiceMapFreshness is generated from the Flashduty OpenAPI schema. -type ServiceMapFreshness struct { - // Age in milliseconds of the staleest graph covered, relative to now. - MaxAgeMs int64 `json:"max_age_ms" toon:"max_age_ms"` - // Unix timestamp in milliseconds of the most recently received graph among the hosts covered. - NewestReceivedAtMs TimestampMilli `json:"newest_received_at_ms" toon:"newest_received_at_ms"` - // Unix timestamp in milliseconds of the least recently received graph among the hosts covered. - OldestReceivedAtMs TimestampMilli `json:"oldest_received_at_ms" toon:"oldest_received_at_ms"` - // Freshness classification. `fresh` = the latest snapshot was received within 2× the report interval; `stale` = no new snapshot within 2× the report interval; `unknown` = no snapshot data, undecidable. - Status string `json:"status" toon:"status"` -} - -// ServiceMapHostCoverage is generated from the Flashduty OpenAPI schema. -type ServiceMapHostCoverage struct { - // True if the host's graph was degraded at collection time. - Degraded bool `json:"degraded" toon:"degraded"` - // Kubernetes enrichment status for this host, as self-reported by the agent. - KubernetesEnrichmentStatus string `json:"kubernetes_enrichment_status" toon:"kubernetes_enrichment_status"` - // Network-inventory enrichment status for this host, e.g. `complete`, `partial`, `unavailable`, as self-reported by the agent. - NetworkInventoryStatus string `json:"network_inventory_status" toon:"network_inventory_status"` - // Machine-readable codes explaining the current coverage status. - ReasonCodes []string `json:"reason_codes" toon:"reason_codes"` - // True if the host's graph was truncated at collection time. - Truncated bool `json:"truncated" toon:"truncated"` -} - -// ServiceMapNode is generated from the Flashduty OpenAPI schema. -type ServiceMapNode struct { - // Container name, when the node runs in a container. - ContainerName string `json:"container_name" toon:"container_name"` - // Human-readable display name. - DisplayName string `json:"display_name" toon:"display_name"` - // Executable file name. - ExecutableName string `json:"executable_name" toon:"executable_name"` - // Timestamp the node was first observed. - FirstSeen string `json:"first_seen" toon:"first_seen"` - // Host the node was observed on. - HostID string `json:"host_id" toon:"host_id"` - // Entity ID of the node, unique within its host. - ID string `json:"id" toon:"id"` - // Opaque, kind-specific identity payload. Shape depends on `kind`. - Identity any `json:"identity" toon:"identity"` - // Container image repository. - ImageRepository string `json:"image_repository" toon:"image_repository"` - // Container image tag/version. - ImageVersion string `json:"image_version" toon:"image_version"` - // Number of instances folded into this node, when the node represents a workload replica set. - InstanceCount int64 `json:"instance_count" toon:"instance_count"` - // Node kind, e.g. `process`, `container`. - Kind string `json:"kind" toon:"kind"` - // Timestamp the node was last observed. - LastSeen string `json:"last_seen" toon:"last_seen"` - // Kubernetes namespace, when known. - Namespace string `json:"namespace" toon:"namespace"` - // Opaque sample of underlying instances folded into this node, when applicable. - SampleInstances any `json:"sample_instances" toon:"sample_instances"` - // systemd unit name, when the node is a systemd-managed process. - SystemdUnit string `json:"systemd_unit" toon:"systemd_unit"` - // Kubernetes workload name, when known. - WorkloadName string `json:"workload_name" toon:"workload_name"` -} - -// ServiceMapResolutionCandidate is generated from the Flashduty OpenAPI schema. -type ServiceMapResolutionCandidate struct { - // Match confidence in `[0, 1]`; capped at 0.6 whenever more than one candidate is returned. - Confidence float64 `json:"confidence" toon:"confidence"` - // Destination IP actually being resolved against this candidate. - EffectiveIP string `json:"effective_ip" toon:"effective_ip"` - // Entity/process ID of the candidate listener. - EntityID string `json:"entity_id" toon:"entity_id"` - // Sequence number of the graph generation this candidate was observed in. - GraphSequence uint64 `json:"graph_sequence" toon:"graph_sequence"` - // Host ID of the candidate listener. - HostID string `json:"host_id" toon:"host_id"` - // Identifier of the matched listener. - ListenerID string `json:"listener_id" toon:"listener_id"` - // IP address the listener is bound to (may be a wildcard address). - ListenerIP string `json:"listener_ip" toon:"listener_ip"` - // How the listener matched the destination, e.g. `exact`, `wildcard`, `wildcard_dual_stack`, `wildcard_address_family_unknown`. - MatchKind string `json:"match_kind" toon:"match_kind"` - // Network namespace ID the candidate listener is in. - NetnsID string `json:"netns_id" toon:"netns_id"` - // Display name of the candidate's owning node, when known. - NodeDisplayName string `json:"node_display_name" toon:"node_display_name"` - // Kind of the candidate's owning node, when known. - NodeKind string `json:"node_kind" toon:"node_kind"` - // Unix timestamp in milliseconds when the candidate's graph generation was observed by the agent. - ObservedAtMs TimestampMilli `json:"observed_at_ms" toon:"observed_at_ms"` - // Destination port. - Port int64 `json:"port" toon:"port"` - // Transport protocol, `tcp` or `udp`. - Protocol string `json:"protocol" toon:"protocol"` -} - -// ServiceMapResolutionCounts is generated from the Flashduty OpenAPI schema. -type ServiceMapResolutionCounts struct { - // Number of edges resolved to multiple or low-confidence candidates. - Ambiguous int64 `json:"ambiguous" toon:"ambiguous"` - // Number of edges resolved to exactly one confident candidate. - Resolved int64 `json:"resolved" toon:"resolved"` - // Number of edges with no resolvable candidate. - Unresolved int64 `json:"unresolved" toon:"unresolved"` -} - -// ServiceMapStatusBatchCoverage is generated from the Flashduty OpenAPI schema. -type ServiceMapStatusBatchCoverage struct { - // Number of hosts whose status could not be read. - Failed int64 `json:"failed" toon:"failed"` - // Number of hosts requested (explicit `host_id`/`host_ids`, or the fleet sample size actually scanned). - Requested int64 `json:"requested" toon:"requested"` - // Count of items per status value; always includes all seven keys (`active`, `degraded`, `stale`, `initializing`, `disabled`, `unsupported`, `no_data`), zero-filled. - States map[string]int64 `json:"states" toon:"states"` - // Number of hosts whose status was read successfully. - Succeeded int64 `json:"succeeded" toon:"succeeded"` - // True if `fleet` mode found more candidates than `limit` allowed to return. - Truncated bool `json:"truncated" toon:"truncated"` -} - -// ServiceMapStatusItem is generated from the Flashduty OpenAPI schema. -type ServiceMapStatusItem struct { - // True if the host has an authoritative current graph. - Authoritative bool `json:"authoritative" toon:"authoritative"` - // The host's self-reported ServiceMap capability. - Capability ServiceMapCapability `json:"capability" toon:"capability"` - // Coverage and enrichment status for this host's graph. - Coverage ServiceMapHostCoverage `json:"coverage" toon:"coverage"` - // Number of edges in the host's current graph. - EdgeCount int64 `json:"edge_count" toon:"edge_count"` - // Set to `status_unavailable` when this host's status could not be read; other fields fall back to inventory-derived defaults in that case. - ErrorCode string `json:"error_code" toon:"error_code"` - // How recent the host's graph data is. - Freshness ServiceMapFreshness `json:"freshness" toon:"freshness"` - // True if a current graph can be fetched for this host right now. - GraphAvailable bool `json:"graph_available" toon:"graph_available"` - // Host ID this status describes. - HostID string `json:"host_id" toon:"host_id"` - // Unix timestamp in milliseconds of the most recent non-authoritative health signal, when more recent than the current graph. - LatestHealthAtMs TimestampMilli `json:"latest_health_at_ms" toon:"latest_health_at_ms"` - // Network scope resolved for this host, when known. - NetworkScopeID string `json:"network_scope_id" toon:"network_scope_id"` - // Number of nodes in the host's current graph. - NodeCount int64 `json:"node_count" toon:"node_count"` - // Unix timestamp in milliseconds the host's graph was observed by the agent. - ObservedAtMs TimestampMilli `json:"observed_at_ms" toon:"observed_at_ms"` - // Machine-readable codes explaining the current status. - ReasonCodes []string `json:"reason_codes" toon:"reason_codes"` - // Unix timestamp in milliseconds the host's current graph generation was received by the server. - ReceivedAtMs TimestampMilli `json:"received_at_ms" toon:"received_at_ms"` - // Configured reporting interval in milliseconds. - ReportIntervalMs int64 `json:"report_interval_ms" toon:"report_interval_ms"` - // Overall ServiceMap collection status. - // - // | Value | Meaning | - // |---|---| - // | `active` | Collection healthy: a fresh snapshot exists with no degradation. | - // | `degraded` | Collecting but quality is impaired: health reports are newer than the snapshot, the snapshot is truncated/degraded, or collection is failing. | - // | `stale` | A snapshot exists but is outdated (not updated within 2× the report interval). | - // | `initializing` | The agent has reported the capability but the first snapshot is not ready yet. | - // | `disabled` | Topology collection is disabled on this host. | - // | `unsupported` | The agent or kernel does not support this collection. | - // | `no_data` | No snapshot or health data received at all. | - Status string `json:"status" toon:"status"` -} - -// ServiceMapStatusRequest is generated from the Flashduty OpenAPI schema. -type ServiceMapStatusRequest struct { - // When `true`, ignore `host_id`/`host_ids` and instead sample up to `limit` fleet candidate hosts for the account. Default `false`. - Fleet bool `json:"fleet,omitempty" toon:"fleet,omitempty"` - // A single host ID to check. Combine with `host_ids` to check several; mutually exclusive with `fleet=true`. - HostID string `json:"host_id,omitempty" toon:"host_id,omitempty"` - // Multiple host IDs to check in one call, up to 200 combined with `host_id`. Mutually exclusive with `fleet=true`. - HostIDs []string `json:"host_ids,omitempty" toon:"host_ids,omitempty"` - // In `fleet` mode, the number of candidate hosts to sample. Ignored otherwise. Default 100, range 1-200. - Limit int64 `json:"limit,omitempty" toon:"limit,omitempty"` -} - -// ServiceMapStatusResponse is generated from the Flashduty OpenAPI schema. -type ServiceMapStatusResponse struct { - // Summary of how many hosts were successfully covered. - Coverage ServiceMapStatusBatchCoverage `json:"coverage" toon:"coverage"` - // Echoes whether this response was produced from a fleet sample rather than explicit host IDs. - Fleet bool `json:"fleet" toon:"fleet"` - // Unix timestamp in milliseconds this response was generated. - GeneratedAtMs TimestampMilli `json:"generated_at_ms" toon:"generated_at_ms"` - // Per-host status, in the same order the hosts were resolved. - Items []ServiceMapStatusItem `json:"items" toon:"items"` - // True if any host failed or the fleet sample was truncated. - Partial bool `json:"partial" toon:"partial"` -} - -// ServiceMapSummaryNeighbor is generated from the Flashduty OpenAPI schema. -type ServiceMapSummaryNeighbor struct { - // Active connection count for this relation, when the underlying agent reports it. - ActiveConnections int64 `json:"active_connections" toon:"active_connections"` - // Destination IP address. - DestinationIP string `json:"destination_ip" toon:"destination_ip"` - // Destination port. - DestinationPort int64 `json:"destination_port" toon:"destination_port"` - // Transport protocol of the destination. `tcp` = TCP connection; `udp` = UDP session. Collectors currently only report `tcp`; `udp` is reserved. - DestinationProtocol string `json:"destination_protocol" toon:"destination_protocol"` - // Edge ID. - EdgeID string `json:"edge_id" toon:"edge_id"` - // Timestamp this relation was last observed. - LastSeen string `json:"last_seen" toon:"last_seen"` - // Resolution outcome for this relation's destination. `resolved` = uniquely resolved to a listening entity on a host — the relation is reliable; `ambiguous` = multiple candidates exist (or the listener address family is unknown) — treat the relation as a lead to verify; `unresolved` = no candidate found, the destination identity is unknown. - ResolutionStatus string `json:"resolution_status" toon:"resolution_status"` - // Display name of the source node, when known. - SourceDisplayName string `json:"source_display_name" toon:"source_display_name"` - // Entity ID of the source node. - SourceEntityID string `json:"source_entity_id" toon:"source_entity_id"` - // Display name of the resolved target, when known. - TargetDisplayName string `json:"target_display_name" toon:"target_display_name"` - // Entity ID of the resolved target, when `resolution_status=resolved` and unambiguous. - TargetEntityID string `json:"target_entity_id" toon:"target_entity_id"` - // Host ID of the resolved target, when `resolution_status=resolved` and unambiguous. - TargetHostID string `json:"target_host_id" toon:"target_host_id"` -} - -// ServiceMapSummaryRequest is generated from the Flashduty OpenAPI schema. -type ServiceMapSummaryRequest struct { - // Host (and optional entity) to summarize. - Anchor ServiceMapAnchor `json:"anchor" toon:"anchor"` - // Optional integrity check: if set, must match the network scope already associated with `anchor.host_id`, or the request is rejected with `InvalidParameter`. - NetworkScopeID string `json:"network_scope_id,omitempty" toon:"network_scope_id,omitempty"` -} - -// ServiceMapSummaryResponse is generated from the Flashduty OpenAPI schema. -type ServiceMapSummaryResponse struct { - // Echo of the requested anchor entity ID, when one was given. - AnchorEntityID string `json:"anchor_entity_id" toon:"anchor_entity_id"` - // Echo of the requested anchor host ID. - AnchorHostID string `json:"anchor_host_id" toon:"anchor_host_id"` - // Always `true`; the summary is only ever built from an authoritative graph. - Authoritative bool `json:"authoritative" toon:"authoritative"` - // Pre-rendered natural-language evidence string summarizing this response, designed for LLM prompts. The structured fields above are the source of truth; this is a convenience rendering of them. - ContextRefDetail string `json:"context_ref_detail" toon:"context_ref_detail"` - // Aggregate coverage and enrichment status for the anchor host's graph. - Coverage ServiceMapTopologyCoverage `json:"coverage" toon:"coverage"` - // How recent the graph data is. - Freshness ServiceMapFreshness `json:"freshness" toon:"freshness"` - // `current` if the summary reflects the live graph; `last_known_good` if the latest ingestion is unhealthy and this reflects the last authoritative graph instead. - GraphRole string `json:"graph_role" toon:"graph_role"` - // False when `graph_role=last_known_good`, i.e. the most recent collection attempt was not authoritative. - LatestCollectionAuthoritative bool `json:"latest_collection_authoritative" toon:"latest_collection_authoritative"` - // Unix timestamp in milliseconds of the most recent non-authoritative health signal, when more recent than the current graph. - LatestHealthAtMs TimestampMilli `json:"latest_health_at_ms" toon:"latest_health_at_ms"` - // Up to 12 outbound relations, most informative first. - Neighbors []ServiceMapSummaryNeighbor `json:"neighbors" toon:"neighbors"` - // Network scope the summary was resolved within. - NetworkScopeID string `json:"network_scope_id" toon:"network_scope_id"` - // Unix timestamp in milliseconds the underlying data was observed by the agent. - ObservedAtMs TimestampMilli `json:"observed_at_ms" toon:"observed_at_ms"` - // Unix timestamp in milliseconds the current graph generation was received by the server. - ReceivedAtMs TimestampMilli `json:"received_at_ms" toon:"received_at_ms"` - // Counts of the anchor host's outbound relations by resolution outcome. - ResolutionCounts ServiceMapResolutionCounts `json:"resolution_counts" toon:"resolution_counts"` - // ServiceMap collection status of the anchor host. - // - // | Value | Meaning | - // |---|---| - // | `active` | Collection healthy: a fresh snapshot exists with no degradation. | - // | `degraded` | Collecting but quality is impaired: health reports are newer than the snapshot, the snapshot is truncated/degraded, or collection is failing. | - // | `stale` | A snapshot exists but is outdated (not updated within 2× the report interval). | - // | `initializing` | The agent has reported the capability but the first snapshot is not ready yet. | - // | `disabled` | Topology collection is disabled on this host. | - // | `unsupported` | The agent or kernel does not support this collection. | - // | `no_data` | No snapshot or health data received at all. | - Status string `json:"status" toon:"status"` - // True if the fixed-size summary omitted any neighbor or coverage detail to stay within its bounds. - Truncated bool `json:"truncated" toon:"truncated"` - // Machine-readable reasons the summary was truncated, when `truncated=true`. - TruncationReasons []string `json:"truncation_reasons" toon:"truncation_reasons"` -} - -// ServiceMapTopologyCoverage is generated from the Flashduty OpenAPI schema. -type ServiceMapTopologyCoverage struct { - // Distinct capture modes (e.g. `ebpf`) seen across loaded hosts. - CaptureModes []string `json:"capture_modes" toon:"capture_modes"` - // Number of loaded host graphs that were degraded at collection time. - DegradedHosts int64 `json:"degraded_hosts" toon:"degraded_hosts"` - // Always `outbound`; ServiceMap currently only models outbound relations. - Direction string `json:"direction" toon:"direction"` - // Number of distinct host graphs loaded to answer the query. - HostsLoaded int64 `json:"hosts_loaded" toon:"hosts_loaded"` - // Number of IPv6 wildcard listeners with a known IPV6_V6ONLY setting. - Ipv6OnlyKnownListenerCount int64 `json:"ipv6_only_known_listener_count" toon:"ipv6_only_known_listener_count"` - // Number of IPv6 wildcard listeners whose IPV6_V6ONLY setting could not be determined. - Ipv6OnlyUnknownListenerCount int64 `json:"ipv6_only_unknown_listener_count" toon:"ipv6_only_unknown_listener_count"` - // Number of IPv6 wildcard (unspecified-address) listeners observed. - Ipv6WildcardListenerCount int64 `json:"ipv6_wildcard_listener_count" toon:"ipv6_wildcard_listener_count"` - // Aggregate Kubernetes enrichment coverage across loaded hosts (worst per-host status wins). - // - // | Value | Meaning | - // |---|---| - // | `complete` | Every host has full pod-binding metadata for its entities. | - // | `partial` | At least one host has bindings but some pod metadata is missing or bindings were dropped. | - // | `unavailable` | At least one host has no pod bindings at all. | - // | `unknown` | No host loaded, or a host reported an unrecognized status. | - KubernetesEnrichmentStatus string `json:"kubernetes_enrichment_status" toon:"kubernetes_enrichment_status"` - // Aggregate listener address-family (IPv4/IPv6) resolution coverage across loaded hosts (worst per-host status wins). - // - // | Value | Meaning | - // |---|---| - // | `complete` | On every host, the IPv6-only attribute of all IPv6 wildcard listeners is known. | - // | `partial` | At least one host knows the IPv6-only attribute for only some IPv6 wildcard listeners. | - // | `unavailable` | At least one host knows the IPv6-only attribute of none of its IPv6 wildcard listeners. | - // | `unknown` | No host loaded, or a host reported an unrecognized status. | - ListenerAddressFamilyStatus string `json:"listener_address_family_status" toon:"listener_address_family_status"` - // Aggregate network-inventory enrichment coverage across loaded hosts (worst per-host status wins). - // - // | Value | Meaning | - // |---|---| - // | `complete` | Every requested network namespace on every host was scanned successfully with no errors. | - // | `partial` | At least one host failed to scan some namespaces, or scanning raised errors. | - // | `unavailable` | At least one host failed to scan all of its namespaces. | - // | `unknown` | No host loaded, or a host reported an unrecognized status. | - NetworkInventoryStatus string `json:"network_inventory_status" toon:"network_inventory_status"` - // Machine-readable reason codes explaining any degraded or truncated state among loaded hosts. - Reasons []string `json:"reasons" toon:"reasons"` - // Number of loaded host graphs that were truncated at collection time. - TruncatedHosts int64 `json:"truncated_hosts" toon:"truncated_hosts"` -} - -// ServiceMapTopologyRequest is generated from the Flashduty OpenAPI schema. -type ServiceMapTopologyRequest struct { - // Host (and optional entity) to start the traversal from. - Anchor ServiceMapAnchor `json:"anchor" toon:"anchor"` - // Time selector for the query. Only `now` is currently supported; omitting the field behaves the same. - At string `json:"at,omitempty" toon:"at,omitempty"` - // Maximum traversal depth from the anchor. Default 1, maximum 3. - Depth int64 `json:"depth,omitempty" toon:"depth,omitempty"` - // Traversal direction. Only `outbound` is currently supported; omitting the field behaves the same. - Direction string `json:"direction,omitempty" toon:"direction,omitempty"` - // Whether to include the raw per-edge `metrics` payload in the response. Default `false`. - IncludeMetrics bool `json:"include_metrics,omitempty" toon:"include_metrics,omitempty"` - // Maximum number of edges to examine before truncating. Default 200, maximum 1000. - MaxEdges int64 `json:"max_edges,omitempty" toon:"max_edges,omitempty"` - // Maximum number of nodes to return before truncating. Default 100, maximum 500. - MaxNodes int64 `json:"max_nodes,omitempty" toon:"max_nodes,omitempty"` - // Optional integrity check: if set, must match the network scope already associated with `anchor.host_id`, or the request is rejected with `InvalidParameter`. - NetworkScopeID string `json:"network_scope_id,omitempty" toon:"network_scope_id,omitempty"` - // How unresolved edges are projected. `full` (default) includes them in `edges` and `unresolved_endpoints`; `summary` omits them from `edges` and returns only a bounded sample in `unresolved_endpoints`. - UnresolvedMode string `json:"unresolved_mode,omitempty" toon:"unresolved_mode,omitempty"` -} - -// ServiceMapTopologyResponse is generated from the Flashduty OpenAPI schema. -type ServiceMapTopologyResponse struct { - // Echo of the requested anchor entity ID, when one was given. - AnchorEntityID string `json:"anchor_entity_id" toon:"anchor_entity_id"` - // Echo of the requested anchor host ID. - AnchorHostID string `json:"anchor_host_id" toon:"anchor_host_id"` - // Aggregate coverage and enrichment status across loaded hosts. - Coverage ServiceMapTopologyCoverage `json:"coverage" toon:"coverage"` - // Edges discovered during the traversal. Excludes unresolved edges when `unresolved_mode=summary`. - Edges []ServiceMapEdge `json:"edges" toon:"edges"` - // How recent the graph data is. - Freshness ServiceMapFreshness `json:"freshness" toon:"freshness"` - // Network scope the graph was resolved within. - NetworkScopeID string `json:"network_scope_id" toon:"network_scope_id"` - // Nodes discovered during the traversal. - Nodes []ServiceMapNode `json:"nodes" toon:"nodes"` - // Unix timestamp in milliseconds the underlying data was observed by the agent (the most recent among loaded hosts). - ObservedAtMs TimestampMilli `json:"observed_at_ms" toon:"observed_at_ms"` - // Counts of edges by resolution outcome. - ResolutionCounts ServiceMapResolutionCounts `json:"resolution_counts" toon:"resolution_counts"` - // True if any bound (`max_nodes`, `max_edges`, or an internal query budget) cut the traversal short. - Truncated bool `json:"truncated" toon:"truncated"` - // Machine-readable reasons the traversal was truncated, when `truncated=true`. - TruncationReasons []string `json:"truncation_reasons" toon:"truncation_reasons"` - // Sample or full set of edges whose destination could not be resolved, per `unresolved_projection`. - UnresolvedEndpoints []ServiceMapUnresolvedEndpoint `json:"unresolved_endpoints" toon:"unresolved_endpoints"` - // How unresolved edges were projected into this response. - UnresolvedProjection ServiceMapUnresolvedProjection `json:"unresolved_projection" toon:"unresolved_projection"` -} - -// ServiceMapUnresolvedEndpoint is generated from the Flashduty OpenAPI schema. -type ServiceMapUnresolvedEndpoint struct { - // Destination endpoint of the connection. - Destination ServiceMapEndpoint `json:"destination" toon:"destination"` - // Edge ID, unique within its host. - EdgeID string `json:"edge_id" toon:"edge_id"` - // Host the edge's source node lives on. - HostID string `json:"host_id" toon:"host_id"` - // Machine-readable reason the endpoint could not be resolved. - Reason string `json:"reason" toon:"reason"` - // Entity ID of the source node. - SourceEntityID string `json:"source_entity_id" toon:"source_entity_id"` - // Network namespace ID the connection originated from. - SourceNetnsID string `json:"source_netns_id" toon:"source_netns_id"` -} - -// ServiceMapUnresolvedProjection is generated from the Flashduty OpenAPI schema. -type ServiceMapUnresolvedProjection struct { - // Breakdown of `total` unresolved edges by reason code. - ByReason []ServiceMapUnresolvedReasonCount `json:"by_reason" toon:"by_reason"` - // The `unresolved_mode` that was applied. `full` = unresolved destinations are listed completely in `unresolved_endpoints` and their edges stay in `edges` (default); `summary` = unresolved edges are excluded from `edges` and `unresolved_endpoints` keeps at most 20 samples, complemented by the `by_reason` counts. - Mode string `json:"mode" toon:"mode"` - // Number of unresolved edges found but not returned (`total - returned`). - Omitted int64 `json:"omitted" toon:"omitted"` - // Number of unresolved edges included in `unresolved_endpoints`. - Returned int64 `json:"returned" toon:"returned"` - // Total number of unresolved edges found, regardless of how many were returned. - Total int64 `json:"total" toon:"total"` -} - -// ServiceMapUnresolvedReasonCount is generated from the Flashduty OpenAPI schema. -type ServiceMapUnresolvedReasonCount struct { - // Number of unresolved edges with this reason. - Count int64 `json:"count" toon:"count"` - // Machine-readable unresolved reason code. - Reason string `json:"reason" toon:"reason"` -} - // SessionDeleteRequest is generated from the Flashduty OpenAPI schema. type SessionDeleteRequest struct { // Target session ID, from the list returned by `POST /safari/session/list`. @@ -10351,64 +9710,6 @@ type StringMapPatch struct { Set map[string]string `json:"set,omitempty" toon:"set,omitempty"` } -// TargetInventoryServiceMapCapability is generated from the Flashduty OpenAPI schema. -type TargetInventoryServiceMapCapability struct { - // True if the current status derives from an authoritative graph snapshot. - Authoritative bool `json:"authoritative" toon:"authoritative"` - // Agent-reported capability status, e.g. `running`, `disabled`, `starting`, `failed`, `unsupported`. Omitted when the agent has not reported one. - CapabilityStatus string `json:"capability_status" toon:"capability_status"` - // Capture mode, e.g. `ebpf` or `polling`. Omitted when unknown. - CaptureMode string `json:"capture_mode" toon:"capture_mode"` - // Number of edges in the host's current graph. - EdgeCount int64 `json:"edge_count" toon:"edge_count"` - // Whether ServiceMap collection is enabled on the agent. - Enabled bool `json:"enabled" toon:"enabled"` - // Set to `status_unavailable` when the live status could not be read; other fields then fall back to inventory-derived values. Omitted otherwise. - ErrorCode string `json:"error_code" toon:"error_code"` - // Freshness classification of the host's graph. `fresh` = the latest snapshot was received within 2x the report interval; `stale` = no new snapshot within that window; `unknown` = not yet classified. Omitted when unknown. - FreshnessStatus string `json:"freshness_status" toon:"freshness_status"` - // True if a current graph can be fetched for this host right now. - GraphAvailable bool `json:"graph_available" toon:"graph_available"` - // Maximum snapshot age in milliseconds tolerated before it counts as stale. Omitted when not applicable. - MaxAgeMs int64 `json:"max_age_ms" toon:"max_age_ms"` - // Number of nodes in the host's current graph. - NodeCount int64 `json:"node_count" toon:"node_count"` - // Unix timestamp in milliseconds when the agent last observed graph generation. Omitted when unknown. - ObservedAtMs TimestampMilli `json:"observed_at_ms" toon:"observed_at_ms"` - // Machine-readable codes explaining the current capability status. Omitted when empty. - ReasonCodes []string `json:"reason_codes" toon:"reason_codes"` - // Unix timestamp in milliseconds when the server last received a snapshot. Omitted when unknown. - ReceivedAtMs TimestampMilli `json:"received_at_ms" toon:"received_at_ms"` - // Configured reporting interval in milliseconds. Omitted when unknown. - ReportIntervalMs int64 `json:"report_interval_ms" toon:"report_interval_ms"` - // True if the agent has produced at least one full snapshot. - SnapshotReady bool `json:"snapshot_ready" toon:"snapshot_ready"` - // ServiceMap collection status of the host. - // - // | Value | Meaning | - // |---|---| - // | `active` | Collection healthy: a fresh snapshot exists with no degradation. | - // | `degraded` | Collecting but quality is impaired: health reports are newer than the snapshot, the snapshot is truncated/degraded, or collection is failing. | - // | `stale` | A snapshot exists but is outdated (no update within 2x the report interval). | - // | `initializing` | The agent reported the capability but the first snapshot is not ready yet. | - // | `disabled` | Topology collection is disabled on this host. | - // | `unsupported` | The agent or kernel does not support collection. | - // | `no_data` | No snapshot or health data received yet. | - Status string `json:"status" toon:"status"` -} - -// TargetInventoryServiceMapCoverage is generated from the Flashduty OpenAPI schema. -type TargetInventoryServiceMapCoverage struct { - // Items whose live ServiceMap status read failed (`servicemap.error_code` set). - Failed int64 `json:"failed" toon:"failed"` - // True when at least one item's status read failed. - Partial bool `json:"partial" toon:"partial"` - // Items on this page that carry ServiceMap data. - Requested int64 `json:"requested" toon:"requested"` - // Items whose live ServiceMap status was read successfully. - Succeeded int64 `json:"succeeded" toon:"succeeded"` -} - // TargetsListRequest is generated from the Flashduty OpenAPI schema. type TargetsListRequest struct { // Optional consistency check. Must equal the authenticated account when supplied. @@ -10427,8 +9728,6 @@ type TargetsListResponse struct { Items []TargetsListResponseItemsItem `json:"items" toon:"items"` // Opaque cursor for the next page. Absent / empty means this is the last page. NextCursor *string `json:"next_cursor,omitempty" toon:"next_cursor,omitempty"` - // ServiceMap status-fetch coverage for this page. Omitted when no item on the page carries ServiceMap data. - ServicemapCoverage TargetInventoryServiceMapCoverage `json:"servicemap_coverage" toon:"servicemap_coverage"` // Total matches for the current `(account_id, keyword)` pair, independent of `cursor`. Total int64 `json:"total" toon:"total"` } @@ -11960,10 +11259,6 @@ type TargetsListResponseItemsItem struct { ClusterName string `json:"cluster_name" toon:"cluster_name"` // Edge instance address (`ip:port`), surfaced for diagnostics. EdgeIpport string `json:"edge_ipport" toon:"edge_ipport"` - // ID of the host agent reporting this target. Omitted when the target is not associated with a host. - HostID string `json:"host_id" toon:"host_id"` - // ServiceMap capability and latest status of the target's host. Omitted when the reporting agent has no ServiceMap capability. - Servicemap TargetInventoryServiceMapCapability `json:"servicemap" toon:"servicemap"` // Host target kind. Filtering by kind is not supported in v1. TargetKind string `json:"target_kind" toon:"target_kind"` // Target identifier; the list is sorted by this field ascending. diff --git a/openapi/openapi.en.json b/openapi/openapi.en.json index 45d0078..d19d92b 100644 --- a/openapi/openapi.en.json +++ b/openapi/openapi.en.json @@ -152,10 +152,6 @@ "name": "RUM/Session replay", "description": "Retrieve session replay metadata and recorded segments for RUM sessions." }, - { - "name": "Monitors/Service map", - "description": "Query network-observed service topology, dependency summaries, and ServiceMap collection status across hosts." - }, { "name": "RUM/Error ingestion rules", "description": "Configure and inspect the rules that decide which RUM errors get ingested and stored for an application, including their edit history." @@ -27665,19 +27661,19 @@ } } }, - "/monit/servicemap/status": { + "/rum/error-ingestion/rules/list": { "post": { - "operationId": "monit-servicemap-read-status", - "summary": "Get service map status", - "description": "Return ServiceMap collection status for one or more hosts, or a bounded fleet sample.", + "operationId": "rum-error-ingestion-rules-list", + "summary": "List error ingestion rules", + "description": "Return every error ingestion rule configured for a RUM application.", "tags": [ - "Monitors/Service map" + "RUM/Error ingestion rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/minute**; **5 requests/second** per account |\n| Permissions | **Targets Read** (`monit`) |\n\n## Usage\n\n- ServiceMap is an optional subsystem: a deployment without `redis.servicemap` configured returns `ServiceUnavailable`.\n- Exactly one selection mode is used per call: explicit `host_id`/`host_ids`, or `fleet=true`; combining `fleet=true` with either host field is rejected.\n- Unlike `POST /monit/servicemap/topology` and `POST /monit/servicemap/summary`, an unresolvable host does not fail the whole request — it is reported per item via `items[].error_code`.\n- `limit` (default 100, max 200) bounds the number of explicit hosts accepted, and in `fleet` mode, the number of candidate hosts sampled.", - "href": "/en/api-reference/monitors/service-map/monit-servicemap-read-status", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Deleted rules are excluded; only rules with status `enabled` or `disabled` are returned.\n- Rules are ordered newest-created first.", + "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-list", "metadata": { - "sidebarTitle": "Get service map status" + "sidebarTitle": "List error ingestion rules" } }, "responses": { @@ -27694,7 +27690,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ServiceMapStatusResponse" + "$ref": "#/components/schemas/RumErrorIngestionListResponse" } } } @@ -27703,59 +27699,44 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "fleet": false, "items": [ { - "host_id": "host_0123456789abcdef0123456789abcdef", - "network_scope_id": "ns_0123456789abcdef0123456789abcdef", - "status": "active", - "authoritative": true, - "graph_available": true, - "capability": { - "present": true, - "enabled": true, - "status": "running", - "host_id": "host_0123456789abcdef0123456789abcdef", - "capture_mode": "ebpf", - "report_interval_ms": 60000, - "snapshot_ready": true - }, - "freshness": { - "status": "fresh", - "newest_received_at_ms": 1784635557272, - "oldest_received_at_ms": 1784635557272, - "max_age_ms": 1200 - }, - "coverage": { - "degraded": false, - "truncated": false, - "network_inventory_status": "complete", - "kubernetes_enrichment_status": "unavailable" - }, - "observed_at_ms": 1784635556072, - "received_at_ms": 1784635557272, - "report_interval_ms": 60000, - "node_count": 12, - "edge_count": 8 - } - ], - "coverage": { - "requested": 1, - "succeeded": 1, - "failed": 0, - "truncated": false, - "states": { - "active": 1, - "degraded": 0, - "stale": 0, - "initializing": 0, - "disabled": 0, - "unsupported": 0, - "no_data": 0 + "rule_id": "9spXEVoMeZWujjz25yrgTe", + "rule_name": "Production console errors", + "description": "Only ingest TypeError/ReferenceError from production, excluding Safari.", + "filters": [ + [ + { + "key": "error.env", + "oper": "IN", + "vals": [ + "production" + ] + }, + { + "key": "error.error_type", + "oper": "IN", + "vals": [ + "TypeError", + "ReferenceError" + ] + } + ], + [ + { + "key": "error.browser_name", + "oper": "NOTIN", + "vals": [ + "Safari" + ] + } + ] + ], + "status": "enabled", + "created_at": 1786000000000, + "updated_at": 1786003600000 } - }, - "partial": false, - "generated_at_ms": 1784635558472 + ] } } } @@ -27767,9 +27748,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "503": { - "$ref": "#/components/responses/ServiceUnavailable" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -27782,29 +27760,29 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceMapStatusRequest" + "$ref": "#/components/schemas/RumErrorIngestionListRequest" }, "example": { - "host_id": "host_0123456789abcdef0123456789abcdef" + "application_id": "WoyQQ3BohkdtPivubEvE8o" } } } } } }, - "/monit/servicemap/topology": { + "/rum/error-ingestion/rules/create": { "post": { - "operationId": "monit-servicemap-read-topology", - "summary": "Get service map topology", - "description": "Return the outbound dependency graph around a host, discovered by live network observation.", + "operationId": "rum-error-ingestion-rules-create", + "summary": "Create an error ingestion rule", + "description": "Create a new error ingestion rule that filters which errors are stored.", "tags": [ - "Monitors/Service map" + "RUM/Error ingestion rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **20 requests/minute**; **1 request/second** per account |\n| Permissions | **Service Map Read** (`monit`) |\n\n## Usage\n\n- ServiceMap is an optional subsystem: a deployment without `redis.servicemap` configured returns `ServiceUnavailable`.\n- `at` currently only accepts `now` (or empty, which behaves identically).\n- `direction` currently only accepts `outbound` (or empty).\n- `anchor.host_id` must already be known to ServiceMap (have a current or recently retired graph); otherwise this returns `ResourceNotFound`.\n- `depth` (max 3), `max_nodes` (max 500), and `max_edges` (max 1000) bound the traversal; when a bound is hit, `truncated=true` and `truncation_reasons` explains why.\n- `unresolved_mode=summary` (vs. the default `full`) omits unresolved edges from `edges` and returns only a bounded sample in `unresolved_endpoints`.", - "href": "/en/api-reference/monitors/service-map/monit-servicemap-read-topology", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Create, update, enable, disable, and delete all snapshot the application's full current rule set into history first, so `history/list` reflects every mutation.\n- Every condition key in `filters` must be one of the supported `error.*` fields or a `context.*` path; unsupported keys are rejected with `InvalidParameter`.\n- New rules are created with status `enabled`; call `disable` afterward if the rule should start inactive.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-create", "metadata": { - "sidebarTitle": "Get service map topology" + "sidebarTitle": "Create an error ingestion rule" } }, "responses": { @@ -27821,7 +27799,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ServiceMapTopologyResponse" + "$ref": "#/components/schemas/RumErrorIngestionCreateResponse" } } } @@ -27830,106 +27808,8 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "network_scope_id": "ns_0123456789abcdef0123456789abcdef", - "anchor_host_id": "host_0123456789abcdef0123456789abcdef", - "observed_at_ms": 1784635556072, - "freshness": { - "status": "fresh", - "newest_received_at_ms": 1784635557272, - "oldest_received_at_ms": 1784635557272, - "max_age_ms": 1200 - }, - "coverage": { - "direction": "outbound", - "hosts_loaded": 2, - "degraded_hosts": 0, - "truncated_hosts": 0, - "capture_modes": [ - "ebpf" - ], - "network_inventory_status": "complete", - "kubernetes_enrichment_status": "unavailable", - "listener_address_family_status": "complete", - "ipv6_wildcard_listener_count": 0, - "ipv6_only_known_listener_count": 0, - "ipv6_only_unknown_listener_count": 0 - }, - "truncated": false, - "nodes": [ - { - "host_id": "host_0123456789abcdef0123456789abcdef", - "id": "procw_v1_source", - "kind": "process", - "display_name": "orders.service", - "systemd_unit": "orders.service", - "first_seen": "2026-07-01T02:00:00Z", - "last_seen": "2026-07-21T18:45:56.072+08:00" - }, - { - "host_id": "host_fedcba9876543210fedcba9876543210", - "id": "procw_v1_mysql", - "kind": "process", - "display_name": "mysqld.service", - "systemd_unit": "mysqld.service", - "first_seen": "2026-07-01T02:00:00Z", - "last_seen": "2026-07-21T18:45:56.072+08:00" - } - ], - "edges": [ - { - "host_id": "host_0123456789abcdef0123456789abcdef", - "id": "edge_v1_example", - "source_entity_id": "procw_v1_source", - "source_netns_id": "netns_v1_default", - "destination": { - "ip": "203.0.113.105", - "port": 3306, - "protocol": "tcp" - }, - "evidence": "connect", - "last_seen": "2026-07-21T18:45:56.072+08:00", - "depth": 1, - "endpoint_resolution": { - "status": "resolved", - "endpoint": { - "ip": "203.0.113.105", - "port": 3306, - "protocol": "tcp" - }, - "candidates": [ - { - "host_id": "host_fedcba9876543210fedcba9876543210", - "entity_id": "procw_v1_mysql", - "netns_id": "netns_v1_default", - "listener_id": "listener_v1_mysql", - "listener_ip": "203.0.113.105", - "effective_ip": "203.0.113.105", - "protocol": "tcp", - "port": 3306, - "match_kind": "exact", - "confidence": 1.0, - "node_kind": "process", - "node_display_name": "mysqld.service", - "graph_sequence": 42, - "observed_at_ms": 1784635556072 - } - ] - } - } - ], - "unresolved_endpoints": [], - "resolution_counts": { - "resolved": 1, - "ambiguous": 0, - "unresolved": 0 - }, - "unresolved_projection": { - "mode": "full", - "total": 0, - "returned": 0, - "omitted": 0, - "by_reason": [] - } + "rule_id": "9spXEVoMeZWujjz25yrgTe", + "rule_name": "Production console errors" } } } @@ -27941,9 +27821,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "503": { - "$ref": "#/components/responses/ServiceUnavailable" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -27956,36 +27833,59 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceMapTopologyRequest" + "$ref": "#/components/schemas/RumErrorIngestionCreateRequest" }, "example": { - "anchor": { - "host_id": "host_0123456789abcdef0123456789abcdef" - }, - "depth": 2, - "max_nodes": 100, - "max_edges": 200, - "include_metrics": true, - "unresolved_mode": "full" + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "rule_name": "Production console errors", + "description": "Only ingest TypeError/ReferenceError from production, excluding Safari.", + "filters": [ + [ + { + "key": "error.env", + "oper": "IN", + "vals": [ + "production" + ] + }, + { + "key": "error.error_type", + "oper": "IN", + "vals": [ + "TypeError", + "ReferenceError" + ] + } + ], + [ + { + "key": "error.browser_name", + "oper": "NOTIN", + "vals": [ + "Safari" + ] + } + ] + ] } } } } } }, - "/monit/servicemap/summary": { + "/rum/error-ingestion/rules/update": { "post": { - "operationId": "monit-servicemap-read-summary", - "summary": "Get service map summary", - "description": "Return a bounded, AI-ready summary of a host's outbound service dependencies.", + "operationId": "rum-error-ingestion-rules-update", + "summary": "Update an error ingestion rule", + "description": "Update the name, description, or filters of an error ingestion rule.", "tags": [ - "Monitors/Service map" + "RUM/Error ingestion rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **30 requests/minute**; **2 requests/second** per account |\n| Permissions | **Service Map Read** (`monit`) |\n\n## Usage\n\n- ServiceMap is an optional subsystem: a deployment without `redis.servicemap` configured returns `ServiceUnavailable`.\n- `anchor.host_id` must already be known to ServiceMap; otherwise this returns `ResourceNotFound`.\n- This is a fixed-size digest, not a scaled-down `POST /monit/servicemap/topology`: depth is always 1 and neighbors are capped at 12, and none of the sizing is caller-adjustable.\n- `context_ref_detail` is a pre-rendered natural-language evidence string designed for LLM prompts; the structured fields are the source of truth and this is a convenience rendering of them.\n- `graph_role=last_known_good` means the latest ingestion is unhealthy and the summary reflects the last authoritative graph rather than a live one.", - "href": "/en/api-reference/monitors/service-map/monit-servicemap-read-summary", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Only fields present in the request are changed; omitted fields keep their current value.\n- Calling update with no fields set is a no-op that still returns success.\n- Returns `ResourceNotFound` if `rule_id` doesn't exist under `application_id`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-update", "metadata": { - "sidebarTitle": "Get service map summary" + "sidebarTitle": "Update an error ingestion rule" } }, "responses": { @@ -28002,7 +27902,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ServiceMapSummaryResponse" + "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" } } } @@ -28010,56 +27910,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "network_scope_id": "ns_0123456789abcdef0123456789abcdef", - "anchor_host_id": "host_0123456789abcdef0123456789abcdef", - "status": "active", - "authoritative": true, - "graph_role": "current", - "latest_collection_authoritative": true, - "observed_at_ms": 1784635556072, - "received_at_ms": 1784635557272, - "freshness": { - "status": "fresh", - "newest_received_at_ms": 1784635557272, - "oldest_received_at_ms": 1784635557272, - "max_age_ms": 1200 - }, - "coverage": { - "direction": "outbound", - "hosts_loaded": 2, - "degraded_hosts": 0, - "truncated_hosts": 0, - "capture_modes": [ - "ebpf" - ], - "network_inventory_status": "complete", - "kubernetes_enrichment_status": "unavailable" - }, - "truncated": false, - "resolution_counts": { - "resolved": 1, - "ambiguous": 0, - "unresolved": 0 - }, - "neighbors": [ - { - "edge_id": "edge_v1_example", - "source_entity_id": "procw_v1_source", - "source_display_name": "orders.service", - "resolution_status": "resolved", - "target_host_id": "host_fedcba9876543210fedcba9876543210", - "target_entity_id": "procw_v1_mysql", - "target_display_name": "mysqld.service", - "destination_protocol": "tcp", - "destination_ip": "203.0.113.105", - "destination_port": 3306, - "last_seen": "2026-07-21T18:45:56.072+08:00", - "active_connections": 1 - } - ], - "context_ref_detail": "ServiceMap current bounded evidence: anchor_host_id=host_0123456789abcdef0123456789abcdef; observed_at_ms=1784635556072; received_at_ms=1784635557272; latest_health_at_ms=0; status=active; freshness=fresh; graph_authoritative=true; latest_collection_authoritative=true; coverage_hosts=2; resolution_counts=resolved:1,ambiguous:0,unresolved:0; truncated=false. Observed outbound relations (relations_shown=1/1): [orders.service -> mysqld.service, resolution=resolved, last_seen=2026-07-21T18:45:56.072+08:00] Evidence rules: only resolution=resolved relations are certain; treat ambiguous/unresolved relations as leads to verify, not fact." - } + "data": {} } } } @@ -28070,9 +27921,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "503": { - "$ref": "#/components/responses/ServiceUnavailable" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -28085,31 +27933,31 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceMapSummaryRequest" + "$ref": "#/components/schemas/RumErrorIngestionUpdateRequest" }, "example": { - "anchor": { - "host_id": "host_0123456789abcdef0123456789abcdef" - } + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "rule_id": "9spXEVoMeZWujjz25yrgTe", + "description": "Now also excludes staging traffic." } } } } } }, - "/monit/servicemap/fleet": { + "/rum/error-ingestion/rules/delete": { "post": { - "operationId": "monit-servicemap-read-fleet", - "summary": "Browse service map fleet hosts", - "description": "Browse the account's hosts with ServiceMap capability and current collection status.", + "operationId": "rum-error-ingestion-rules-delete", + "summary": "Delete an error ingestion rule", + "description": "Delete an error ingestion rule from a RUM application.", "tags": [ - "Monitors/Service map" + "RUM/Error ingestion rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **30 requests/minute**; **2 requests/second** per account |\n| Permissions | **Targets Read** (`monit`) |\n\n## Usage\n\n- Unlike the other four ServiceMap read APIs, this endpoint degrades gracefully when the ServiceMap store is unavailable: matching still runs off inventory data, and affected items report `servicemap.error_code=status_unavailable` with `partial=true`, instead of the whole request failing.\n- `cursor` is opaque — pass back the exact value from `next_cursor`; do not construct or parse it.\n- Reaching `scan_limit` before `limit` matches are found sets `truncated=true` with `next_cursor` still populated — this is not the same as reaching the end of the account's hosts.\n- `coverage.scanned`/`matched`/`returned` describe this page's scan only, not the account's total host population.", - "href": "/en/api-reference/monitors/service-map/monit-servicemap-read-fleet", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The rule disappears from `list` immediately, but the enabled-rule set used for filtering is cached for up to 5 seconds, so errors ingested shortly after deletion can still be matched against it.\n- Returns `ResourceNotFound` if `rule_id` doesn't exist under `application_id`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-delete", "metadata": { - "sidebarTitle": "Browse service map fleet hosts" + "sidebarTitle": "Delete an error ingestion rule" } }, "responses": { @@ -28126,7 +27974,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ServiceMapFleetBrowseResponse" + "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" } } } @@ -28134,69 +27982,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "items": [ - { - "host_id": "host_0123456789abcdef0123456789abcdef", - "agent_version": "v1.2.3", - "edge_cluster": "edge-a", - "servicemap": { - "enabled": true, - "status": "degraded", - "capability_status": "degraded", - "capture_mode": "ebpf", - "snapshot_ready": true, - "authoritative": true, - "graph_available": false, - "freshness_status": "fresh", - "observed_at_ms": 1784635557272, - "received_at_ms": 1784635557272, - "node_count": 46, - "edge_count": 200, - "reason_codes": [ - "snapshot_incomplete" - ] - } - }, - { - "host_id": "host_fedcba9876543210fedcba9876543210", - "agent_version": "v1.2.3", - "edge_cluster": "edge-a", - "servicemap": { - "enabled": true, - "status": "stale", - "capability_status": "running", - "capture_mode": "ebpf", - "snapshot_ready": true, - "authoritative": true, - "graph_available": true, - "freshness_status": "stale", - "observed_at_ms": 1784631957272, - "received_at_ms": 1784631957272, - "node_count": 38, - "edge_count": 152 - } - } - ], - "coverage": { - "scanned": 80, - "matched": 2, - "returned": 2, - "failed": 0, - "states": { - "active": 0, - "degraded": 1, - "stale": 1, - "initializing": 0, - "disabled": 0, - "unsupported": 0, - "no_data": 0 - } - }, - "partial": false, - "truncated": false, - "generated_at_ms": 1784635557272 - } + "data": {} } } } @@ -28207,9 +27993,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "503": { - "$ref": "#/components/responses/ServiceUnavailable" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -28222,43 +28005,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceMapFleetBrowseRequest" + "$ref": "#/components/schemas/RumErrorIngestionRuleIDRequest" }, "example": { - "limit": 50, - "scan_limit": 1000, - "statuses": [ - "degraded", - "stale" - ], - "agent_versions": [ - "v1.2.3" - ], - "edge_clusters": [ - "edge-a" - ], - "capture_modes": [ - "ebpf" - ] + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "rule_id": "9spXEVoMeZWujjz25yrgTe" } } } } } }, - "/monit/servicemap/fleet/summary": { + "/rum/error-ingestion/rules/enable": { "post": { - "operationId": "monit-servicemap-read-fleet-summary", - "summary": "Get service map fleet summary", - "description": "Return an aggregate status distribution across the account's ServiceMap-capable hosts.", + "operationId": "rum-error-ingestion-rules-enable", + "summary": "Enable an error ingestion rule", + "description": "Re-enable a previously disabled error ingestion rule.", "tags": [ - "Monitors/Service map" + "RUM/Error ingestion rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 request/second** per account |\n| Permissions | **Targets Read** (`monit`) |\n\n## Usage\n\n- Like `POST /monit/servicemap/fleet`, this endpoint degrades gracefully when the ServiceMap store is unavailable rather than failing the whole request.\n- This is a single-request, unpaginated aggregate over up to `scan_limit` hosts (default 2000, max 5000) — it does not return per-host detail or accept a status filter.\n- Reaching `scan_limit` before scanning the whole account sets `truncated=true`; `coverage.states` reflects only the hosts actually scanned, not the account's full population.", - "href": "/en/api-reference/monitors/service-map/monit-servicemap-read-fleet-summary", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `ResourceNotFound` if `rule_id` doesn't exist under `application_id`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-enable", "metadata": { - "sidebarTitle": "Get service map fleet summary" + "sidebarTitle": "Enable an error ingestion rule" } }, "responses": { @@ -28275,7 +28045,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ServiceMapFleetSummaryResponse" + "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" } } } @@ -28283,27 +28053,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "coverage": { - "scanned": 1200, - "matched": 1150, - "classified": 1149, - "failed": 1, - "states": { - "active": 1000, - "degraded": 20, - "stale": 30, - "initializing": 40, - "disabled": 25, - "unsupported": 4, - "no_data": 30 - } - }, - "scan_limit": 2000, - "partial": true, - "truncated": false, - "generated_at_ms": 1784635557272 - } + "data": {} } } } @@ -28314,9 +28064,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "503": { - "$ref": "#/components/responses/ServiceUnavailable" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -28329,38 +28076,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceMapFleetSummaryRequest" + "$ref": "#/components/schemas/RumErrorIngestionRuleIDRequest" }, "example": { - "scan_limit": 2000, - "agent_versions": [ - "v1.2.3" - ], - "edge_clusters": [ - "edge-a" - ], - "capture_modes": [ - "ebpf" - ] + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "rule_id": "9spXEVoMeZWujjz25yrgTe" } } } } } }, - "/rum/error-ingestion/rules/list": { + "/rum/error-ingestion/rules/disable": { "post": { - "operationId": "rum-error-ingestion-rules-list", - "summary": "List error ingestion rules", - "description": "Return every error ingestion rule configured for a RUM application.", + "operationId": "rum-error-ingestion-rules-disable", + "summary": "Disable an error ingestion rule", + "description": "Disable an error ingestion rule without deleting it.", "tags": [ "RUM/Error ingestion rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Deleted rules are excluded; only rules with status `enabled` or `disabled` are returned.\n- Rules are ordered newest-created first.", - "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- A disabled rule is kept and still returned by `list`, but is skipped when matching incoming errors.\n- Returns `ResourceNotFound` if `rule_id` doesn't exist under `application_id`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-disable", "metadata": { - "sidebarTitle": "List error ingestion rules" + "sidebarTitle": "Disable an error ingestion rule" } }, "responses": { @@ -28377,7 +28116,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/RumErrorIngestionListResponse" + "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" } } } @@ -28385,433 +28124,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "items": [ - { - "rule_id": "9spXEVoMeZWujjz25yrgTe", - "rule_name": "Production console errors", - "description": "Only ingest TypeError/ReferenceError from production, excluding Safari.", - "filters": [ - [ - { - "key": "error.env", - "oper": "IN", - "vals": [ - "production" - ] - }, - { - "key": "error.error_type", - "oper": "IN", - "vals": [ - "TypeError", - "ReferenceError" - ] - } - ], - [ - { - "key": "error.browser_name", - "oper": "NOTIN", - "vals": [ - "Safari" - ] - } - ] - ], - "status": "enabled", - "created_at": 1786000000000, - "updated_at": 1786003600000 - } - ] - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RumErrorIngestionListRequest" - }, - "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o" - } - } - } - } - } - }, - "/rum/error-ingestion/rules/create": { - "post": { - "operationId": "rum-error-ingestion-rules-create", - "summary": "Create an error ingestion rule", - "description": "Create a new error ingestion rule that filters which errors are stored.", - "tags": [ - "RUM/Error ingestion rules" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Create, update, enable, disable, and delete all snapshot the application's full current rule set into history first, so `history/list` reflects every mutation.\n- Every condition key in `filters` must be one of the supported `error.*` fields or a `context.*` path; unsupported keys are rejected with `InvalidParameter`.\n- New rules are created with status `enabled`; call `disable` afterward if the rule should start inactive.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-create", - "metadata": { - "sidebarTitle": "Create an error ingestion rule" - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/RumErrorIngestionCreateResponse" - } - } - } - ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "rule_id": "9spXEVoMeZWujjz25yrgTe", - "rule_name": "Production console errors" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RumErrorIngestionCreateRequest" - }, - "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "rule_name": "Production console errors", - "description": "Only ingest TypeError/ReferenceError from production, excluding Safari.", - "filters": [ - [ - { - "key": "error.env", - "oper": "IN", - "vals": [ - "production" - ] - }, - { - "key": "error.error_type", - "oper": "IN", - "vals": [ - "TypeError", - "ReferenceError" - ] - } - ], - [ - { - "key": "error.browser_name", - "oper": "NOTIN", - "vals": [ - "Safari" - ] - } - ] - ] - } - } - } - } - } - }, - "/rum/error-ingestion/rules/update": { - "post": { - "operationId": "rum-error-ingestion-rules-update", - "summary": "Update an error ingestion rule", - "description": "Update the name, description, or filters of an error ingestion rule.", - "tags": [ - "RUM/Error ingestion rules" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Only fields present in the request are changed; omitted fields keep their current value.\n- Calling update with no fields set is a no-op that still returns success.\n- Returns `ResourceNotFound` if `rule_id` doesn't exist under `application_id`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-update", - "metadata": { - "sidebarTitle": "Update an error ingestion rule" - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" - } - } - } - ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RumErrorIngestionUpdateRequest" - }, - "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "rule_id": "9spXEVoMeZWujjz25yrgTe", - "description": "Now also excludes staging traffic." - } - } - } - } - } - }, - "/rum/error-ingestion/rules/delete": { - "post": { - "operationId": "rum-error-ingestion-rules-delete", - "summary": "Delete an error ingestion rule", - "description": "Delete an error ingestion rule from a RUM application.", - "tags": [ - "RUM/Error ingestion rules" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The rule disappears from `list` immediately, but the enabled-rule set used for filtering is cached for up to 5 seconds, so errors ingested shortly after deletion can still be matched against it.\n- Returns `ResourceNotFound` if `rule_id` doesn't exist under `application_id`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-delete", - "metadata": { - "sidebarTitle": "Delete an error ingestion rule" - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" - } - } - } - ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RumErrorIngestionRuleIDRequest" - }, - "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "rule_id": "9spXEVoMeZWujjz25yrgTe" - } - } - } - } - } - }, - "/rum/error-ingestion/rules/enable": { - "post": { - "operationId": "rum-error-ingestion-rules-enable", - "summary": "Enable an error ingestion rule", - "description": "Re-enable a previously disabled error ingestion rule.", - "tags": [ - "RUM/Error ingestion rules" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `ResourceNotFound` if `rule_id` doesn't exist under `application_id`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-enable", - "metadata": { - "sidebarTitle": "Enable an error ingestion rule" - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" - } - } - } - ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RumErrorIngestionRuleIDRequest" - }, - "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "rule_id": "9spXEVoMeZWujjz25yrgTe" - } - } - } - } - } - }, - "/rum/error-ingestion/rules/disable": { - "post": { - "operationId": "rum-error-ingestion-rules-disable", - "summary": "Disable an error ingestion rule", - "description": "Disable an error ingestion rule without deleting it.", - "tags": [ - "RUM/Error ingestion rules" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- A disabled rule is kept and still returned by `list`, but is skipped when matching incoming errors.\n- Returns `ResourceNotFound` if `rule_id` doesn't exist under `application_id`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-disable", - "metadata": { - "sidebarTitle": "Disable an error ingestion rule" - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" - } - } - } - ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": {} } } } @@ -32092,19 +31405,19 @@ } }, "ServiceUnavailable": { - "description": "The ServiceMap subsystem is not enabled or not reachable on this deployment. Include the request_id when reporting.", + "description": "The service is temporarily unavailable. Include the request_id when reporting.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { - "serviceMapDisabled": { + "serviceUnavailable": { "value": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "error": { "code": "ServiceUnavailable", - "message": "servicemap store is not initialized" + "message": "service temporarily unavailable" } } } @@ -50630,14 +49943,6 @@ "type": "integer", "format": "int64", "description": "Last route-projection upsert time, Unix seconds. Treat as 'most recently observed', not a live-online indicator." - }, - "host_id": { - "type": "string", - "description": "ID of the host agent reporting this target. Omitted when the target is not associated with a host." - }, - "servicemap": { - "$ref": "#/components/schemas/TargetInventoryServiceMapCapability", - "description": "ServiceMap capability and latest status of the target's host. Omitted when the reporting agent has no ServiceMap capability." } } }, @@ -50652,10 +49957,6 @@ "type": "string", "description": "Opaque cursor for the next page. Absent / empty means this is the last page.", "x-flashduty-preserve-absence": true - }, - "servicemap_coverage": { - "$ref": "#/components/schemas/TargetInventoryServiceMapCoverage", - "description": "ServiceMap status-fetch coverage for this page. Omitted when no item on the page carries ServiceMap data." } } }, @@ -58083,1591 +57384,6 @@ }, "title": "i_wi_deleted" }, - "ServiceMapAnchor": { - "type": "object", - "description": "Identifies the host (and optionally the specific process/entity) to anchor the query on.", - "required": [ - "host_id" - ], - "properties": { - "host_id": { - "type": "string", - "description": "Stable ServiceMap host identifier, e.g. `host_0123...`. Must already be known to ServiceMap.", - "pattern": "^host_[a-z0-9_-]+$", - "maxLength": 128 - }, - "entity_id": { - "type": "string", - "description": "Optional process/entity ID within the host to anchor on. Omit to anchor on the whole host." - } - } - }, - "ServiceMapTopologyRequest": { - "type": "object", - "description": "Query parameters for the outbound topology traversal.", - "required": [ - "anchor" - ], - "properties": { - "anchor": { - "$ref": "#/components/schemas/ServiceMapAnchor", - "description": "Host (and optional entity) to start the traversal from." - }, - "network_scope_id": { - "type": "string", - "description": "Optional integrity check: if set, must match the network scope already associated with `anchor.host_id`, or the request is rejected with `InvalidParameter`." - }, - "at": { - "type": "string", - "enum": [ - "now" - ], - "description": "Time selector for the query. Only `now` is currently supported; omitting the field behaves the same." - }, - "direction": { - "type": "string", - "enum": [ - "outbound" - ], - "description": "Traversal direction. Only `outbound` is currently supported; omitting the field behaves the same." - }, - "depth": { - "type": "integer", - "description": "Maximum traversal depth from the anchor. Default 1, maximum 3.", - "default": 1, - "maximum": 3 - }, - "max_nodes": { - "type": "integer", - "description": "Maximum number of nodes to return before truncating. Default 100, maximum 500.", - "default": 100, - "maximum": 500 - }, - "max_edges": { - "type": "integer", - "description": "Maximum number of edges to examine before truncating. Default 200, maximum 1000.", - "default": 200, - "maximum": 1000 - }, - "include_metrics": { - "type": "boolean", - "description": "Whether to include the raw per-edge `metrics` payload in the response. Default `false`.", - "default": false - }, - "unresolved_mode": { - "type": "string", - "enum": [ - "summary", - "full" - ], - "description": "How unresolved edges are projected. `full` (default) includes them in `edges` and `unresolved_endpoints`; `summary` omits them from `edges` and returns only a bounded sample in `unresolved_endpoints`.", - "default": "full" - } - } - }, - "ServiceMapFreshness": { - "type": "object", - "description": "Describes how recent the underlying graph data is.", - "required": [ - "status", - "newest_received_at_ms", - "oldest_received_at_ms", - "max_age_ms" - ], - "properties": { - "status": { - "type": "string", - "enum": [ - "fresh", - "stale", - "unknown" - ], - "description": "Freshness classification. `fresh` = the latest snapshot was received within 2× the report interval; `stale` = no new snapshot within 2× the report interval; `unknown` = no snapshot data, undecidable." - }, - "newest_received_at_ms": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds of the most recently received graph among the hosts covered." - }, - "oldest_received_at_ms": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds of the least recently received graph among the hosts covered." - }, - "max_age_ms": { - "type": "integer", - "format": "int64", - "description": "Age in milliseconds of the staleest graph covered, relative to now." - } - } - }, - "ServiceMapTopologyCoverage": { - "type": "object", - "description": "Aggregate coverage and enrichment status across every host graph loaded to answer the query.", - "required": [ - "direction", - "hosts_loaded", - "degraded_hosts", - "truncated_hosts", - "network_inventory_status", - "kubernetes_enrichment_status", - "listener_address_family_status" - ], - "properties": { - "direction": { - "type": "string", - "enum": [ - "outbound" - ], - "description": "Always `outbound`; ServiceMap currently only models outbound relations." - }, - "hosts_loaded": { - "type": "integer", - "format": "int64", - "description": "Number of distinct host graphs loaded to answer the query." - }, - "degraded_hosts": { - "type": "integer", - "format": "int64", - "description": "Number of loaded host graphs that were degraded at collection time." - }, - "truncated_hosts": { - "type": "integer", - "format": "int64", - "description": "Number of loaded host graphs that were truncated at collection time." - }, - "capture_modes": { - "type": "array", - "description": "Distinct capture modes (e.g. `ebpf`) seen across loaded hosts.", - "items": { - "type": "string" - } - }, - "network_inventory_status": { - "type": "string", - "enum": [ - "unknown", - "complete", - "partial", - "unavailable" - ], - "description": "Aggregate network-inventory enrichment coverage across loaded hosts (worst per-host status wins).\n\n| Value | Meaning |\n|---|---|\n| `complete` | Every requested network namespace on every host was scanned successfully with no errors. |\n| `partial` | At least one host failed to scan some namespaces, or scanning raised errors. |\n| `unavailable` | At least one host failed to scan all of its namespaces. |\n| `unknown` | No host loaded, or a host reported an unrecognized status. |" - }, - "kubernetes_enrichment_status": { - "type": "string", - "enum": [ - "unknown", - "complete", - "partial", - "unavailable" - ], - "description": "Aggregate Kubernetes enrichment coverage across loaded hosts (worst per-host status wins).\n\n| Value | Meaning |\n|---|---|\n| `complete` | Every host has full pod-binding metadata for its entities. |\n| `partial` | At least one host has bindings but some pod metadata is missing or bindings were dropped. |\n| `unavailable` | At least one host has no pod bindings at all. |\n| `unknown` | No host loaded, or a host reported an unrecognized status. |" - }, - "listener_address_family_status": { - "type": "string", - "enum": [ - "unknown", - "complete", - "partial", - "unavailable" - ], - "description": "Aggregate listener address-family (IPv4/IPv6) resolution coverage across loaded hosts (worst per-host status wins).\n\n| Value | Meaning |\n|---|---|\n| `complete` | On every host, the IPv6-only attribute of all IPv6 wildcard listeners is known. |\n| `partial` | At least one host knows the IPv6-only attribute for only some IPv6 wildcard listeners. |\n| `unavailable` | At least one host knows the IPv6-only attribute of none of its IPv6 wildcard listeners. |\n| `unknown` | No host loaded, or a host reported an unrecognized status. |" - }, - "ipv6_wildcard_listener_count": { - "type": "integer", - "format": "int64", - "description": "Number of IPv6 wildcard (unspecified-address) listeners observed." - }, - "ipv6_only_known_listener_count": { - "type": "integer", - "format": "int64", - "description": "Number of IPv6 wildcard listeners with a known IPV6_V6ONLY setting." - }, - "ipv6_only_unknown_listener_count": { - "type": "integer", - "format": "int64", - "description": "Number of IPv6 wildcard listeners whose IPV6_V6ONLY setting could not be determined." - }, - "reasons": { - "type": "array", - "description": "Machine-readable reason codes explaining any degraded or truncated state among loaded hosts.", - "items": { - "type": "string" - } - } - } - }, - "ServiceMapEndpoint": { - "type": "object", - "description": "A network transport endpoint.", - "required": [ - "ip", - "port", - "protocol" - ], - "properties": { - "ip": { - "type": "string", - "description": "Destination IP address." - }, - "port": { - "type": "integer", - "description": "Destination port." - }, - "protocol": { - "type": "string", - "enum": [ - "tcp", - "udp" - ], - "description": "Transport protocol, `tcp` or `udp`." - } - } - }, - "ServiceMapResolutionCandidate": { - "type": "object", - "description": "One candidate node that could be the resolved target of an edge's destination endpoint.", - "required": [ - "host_id", - "entity_id", - "netns_id", - "listener_id", - "listener_ip", - "effective_ip", - "protocol", - "port", - "match_kind", - "confidence", - "graph_sequence", - "observed_at_ms" - ], - "properties": { - "host_id": { - "type": "string", - "description": "Host ID of the candidate listener." - }, - "entity_id": { - "type": "string", - "description": "Entity/process ID of the candidate listener." - }, - "netns_id": { - "type": "string", - "description": "Network namespace ID the candidate listener is in." - }, - "listener_id": { - "type": "string", - "description": "Identifier of the matched listener." - }, - "listener_ip": { - "type": "string", - "description": "IP address the listener is bound to (may be a wildcard address)." - }, - "effective_ip": { - "type": "string", - "description": "Destination IP actually being resolved against this candidate." - }, - "protocol": { - "type": "string", - "enum": [ - "tcp", - "udp" - ], - "description": "Transport protocol, `tcp` or `udp`." - }, - "port": { - "type": "integer", - "description": "Destination port." - }, - "match_kind": { - "type": "string", - "description": "How the listener matched the destination, e.g. `exact`, `wildcard`, `wildcard_dual_stack`, `wildcard_address_family_unknown`." - }, - "confidence": { - "type": "number", - "description": "Match confidence in `[0, 1]`; capped at 0.6 whenever more than one candidate is returned." - }, - "node_kind": { - "type": "string", - "description": "Kind of the candidate's owning node, when known." - }, - "node_display_name": { - "type": "string", - "description": "Display name of the candidate's owning node, when known." - }, - "graph_sequence": { - "type": "integer", - "format": "uint64", - "description": "Sequence number of the graph generation this candidate was observed in." - }, - "observed_at_ms": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds when the candidate's graph generation was observed by the agent." - } - } - }, - "ServiceMapEndpointResolution": { - "type": "object", - "description": "The result of resolving an edge's destination endpoint to one or more candidate nodes.", - "required": [ - "status", - "endpoint", - "candidates" - ], - "properties": { - "status": { - "type": "string", - "enum": [ - "resolved", - "ambiguous", - "unresolved" - ], - "description": "Resolution outcome. `resolved` = exactly one confident candidate; `ambiguous` = multiple or low-confidence candidates; `unresolved` = no candidate found." - }, - "reason": { - "type": "string", - "description": "Machine-readable reason code when `status` is not `resolved`, e.g. `no_current_listener`, `multiple_current_listeners`, `query_budget_exceeded`." - }, - "endpoint": { - "$ref": "#/components/schemas/ServiceMapEndpoint", - "description": "The destination endpoint being resolved." - }, - "candidates": { - "type": "array", - "description": "Candidate nodes found for this endpoint, ranked by confidence.", - "items": { - "$ref": "#/components/schemas/ServiceMapResolutionCandidate" - } - }, - "candidates_truncated": { - "type": "boolean", - "description": "True if the candidate list was cut short by an internal query budget." - } - } - }, - "ServiceMapNode": { - "type": "object", - "description": "A process, container, or workload discovered on a host.", - "required": [ - "host_id", - "id", - "kind", - "display_name" - ], - "properties": { - "host_id": { - "type": "string", - "description": "Host the node was observed on." - }, - "id": { - "type": "string", - "description": "Entity ID of the node, unique within its host." - }, - "kind": { - "type": "string", - "description": "Node kind, e.g. `process`, `container`." - }, - "display_name": { - "type": "string", - "description": "Human-readable display name." - }, - "systemd_unit": { - "type": "string", - "description": "systemd unit name, when the node is a systemd-managed process." - }, - "executable_name": { - "type": "string", - "description": "Executable file name." - }, - "container_name": { - "type": "string", - "description": "Container name, when the node runs in a container." - }, - "image_repository": { - "type": "string", - "description": "Container image repository." - }, - "image_version": { - "type": "string", - "description": "Container image tag/version." - }, - "namespace": { - "type": "string", - "description": "Kubernetes namespace, when known." - }, - "workload_name": { - "type": "string", - "description": "Kubernetes workload name, when known." - }, - "instance_count": { - "type": "integer", - "description": "Number of instances folded into this node, when the node represents a workload replica set." - }, - "identity": { - "description": "Opaque, kind-specific identity payload. Shape depends on `kind`." - }, - "sample_instances": { - "description": "Opaque sample of underlying instances folded into this node, when applicable." - }, - "first_seen": { - "type": "string", - "format": "date-time", - "description": "Timestamp the node was first observed." - }, - "last_seen": { - "type": "string", - "format": "date-time", - "description": "Timestamp the node was last observed." - } - } - }, - "ServiceMapEdge": { - "type": "object", - "description": "An observed outbound network relation from a source node to a destination endpoint.", - "required": [ - "host_id", - "id", - "source_entity_id", - "source_netns_id", - "destination", - "evidence", - "depth", - "endpoint_resolution" - ], - "properties": { - "host_id": { - "type": "string", - "description": "Host the edge's source node lives on." - }, - "id": { - "type": "string", - "description": "Edge ID, unique within its host." - }, - "source_entity_id": { - "type": "string", - "description": "Entity ID of the source node." - }, - "source_netns_id": { - "type": "string", - "description": "Network namespace ID the connection originated from." - }, - "destination": { - "$ref": "#/components/schemas/ServiceMapEndpoint", - "description": "Destination endpoint of the connection." - }, - "evidence": { - "type": "string", - "description": "How the edge was observed, e.g. `connect`." - }, - "first_seen": { - "type": "string", - "format": "date-time", - "description": "Timestamp the edge was first observed." - }, - "last_seen": { - "type": "string", - "format": "date-time", - "description": "Timestamp the edge was last observed." - }, - "metrics": { - "description": "Opaque per-edge metrics payload, only present when `include_metrics=true` was requested." - }, - "depth": { - "type": "integer", - "description": "Traversal depth this edge was discovered at, relative to the anchor." - }, - "endpoint_resolution": { - "$ref": "#/components/schemas/ServiceMapEndpointResolution", - "description": "Resolution of the destination endpoint to candidate target nodes." - } - } - }, - "ServiceMapUnresolvedEndpoint": { - "type": "object", - "description": "An outbound edge whose destination endpoint could not be confidently resolved to a node.", - "required": [ - "host_id", - "edge_id", - "source_entity_id", - "source_netns_id", - "destination", - "reason" - ], - "properties": { - "host_id": { - "type": "string", - "description": "Host the edge's source node lives on." - }, - "edge_id": { - "type": "string", - "description": "Edge ID, unique within its host." - }, - "source_entity_id": { - "type": "string", - "description": "Entity ID of the source node." - }, - "source_netns_id": { - "type": "string", - "description": "Network namespace ID the connection originated from." - }, - "destination": { - "$ref": "#/components/schemas/ServiceMapEndpoint", - "description": "Destination endpoint of the connection." - }, - "reason": { - "type": "string", - "description": "Machine-readable reason the endpoint could not be resolved." - } - } - }, - "ServiceMapResolutionCounts": { - "type": "object", - "description": "Counts of edges by resolution outcome.", - "required": [ - "resolved", - "ambiguous", - "unresolved" - ], - "properties": { - "resolved": { - "type": "integer", - "description": "Number of edges resolved to exactly one confident candidate." - }, - "ambiguous": { - "type": "integer", - "description": "Number of edges resolved to multiple or low-confidence candidates." - }, - "unresolved": { - "type": "integer", - "description": "Number of edges with no resolvable candidate." - } - } - }, - "ServiceMapUnresolvedReasonCount": { - "type": "object", - "description": "Count of unresolved edges sharing one reason.", - "required": [ - "reason", - "count" - ], - "properties": { - "reason": { - "type": "string", - "description": "Machine-readable unresolved reason code." - }, - "count": { - "type": "integer", - "description": "Number of unresolved edges with this reason." - } - } - }, - "ServiceMapUnresolvedProjection": { - "type": "object", - "description": "Summary of how unresolved edges were projected into the response, bounded by `unresolved_mode`.", - "required": [ - "mode", - "total", - "returned", - "omitted", - "by_reason" - ], - "properties": { - "mode": { - "type": "string", - "enum": [ - "summary", - "full" - ], - "description": "The `unresolved_mode` that was applied. `full` = unresolved destinations are listed completely in `unresolved_endpoints` and their edges stay in `edges` (default); `summary` = unresolved edges are excluded from `edges` and `unresolved_endpoints` keeps at most 20 samples, complemented by the `by_reason` counts." - }, - "total": { - "type": "integer", - "description": "Total number of unresolved edges found, regardless of how many were returned." - }, - "returned": { - "type": "integer", - "description": "Number of unresolved edges included in `unresolved_endpoints`." - }, - "omitted": { - "type": "integer", - "description": "Number of unresolved edges found but not returned (`total - returned`)." - }, - "by_reason": { - "type": "array", - "description": "Breakdown of `total` unresolved edges by reason code.", - "items": { - "$ref": "#/components/schemas/ServiceMapUnresolvedReasonCount" - } - } - } - }, - "ServiceMapTopologyResponse": { - "type": "object", - "description": "The outbound dependency graph discovered around the anchor host.", - "required": [ - "network_scope_id", - "anchor_host_id", - "observed_at_ms", - "freshness", - "coverage", - "truncated", - "nodes", - "edges", - "unresolved_endpoints", - "resolution_counts", - "unresolved_projection" - ], - "properties": { - "network_scope_id": { - "type": "string", - "description": "Network scope the graph was resolved within." - }, - "anchor_host_id": { - "type": "string", - "description": "Echo of the requested anchor host ID." - }, - "anchor_entity_id": { - "type": "string", - "description": "Echo of the requested anchor entity ID, when one was given." - }, - "observed_at_ms": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds the underlying data was observed by the agent (the most recent among loaded hosts)." - }, - "freshness": { - "$ref": "#/components/schemas/ServiceMapFreshness", - "description": "How recent the graph data is." - }, - "coverage": { - "$ref": "#/components/schemas/ServiceMapTopologyCoverage", - "description": "Aggregate coverage and enrichment status across loaded hosts." - }, - "truncated": { - "type": "boolean", - "description": "True if any bound (`max_nodes`, `max_edges`, or an internal query budget) cut the traversal short." - }, - "truncation_reasons": { - "type": "array", - "description": "Machine-readable reasons the traversal was truncated, when `truncated=true`.", - "items": { - "type": "string" - } - }, - "nodes": { - "type": "array", - "description": "Nodes discovered during the traversal.", - "items": { - "$ref": "#/components/schemas/ServiceMapNode" - } - }, - "edges": { - "type": "array", - "description": "Edges discovered during the traversal. Excludes unresolved edges when `unresolved_mode=summary`.", - "items": { - "$ref": "#/components/schemas/ServiceMapEdge" - } - }, - "unresolved_endpoints": { - "type": "array", - "description": "Sample or full set of edges whose destination could not be resolved, per `unresolved_projection`.", - "items": { - "$ref": "#/components/schemas/ServiceMapUnresolvedEndpoint" - } - }, - "resolution_counts": { - "$ref": "#/components/schemas/ServiceMapResolutionCounts", - "description": "Counts of edges by resolution outcome." - }, - "unresolved_projection": { - "$ref": "#/components/schemas/ServiceMapUnresolvedProjection", - "description": "How unresolved edges were projected into this response." - } - } - }, - "ServiceMapSummaryRequest": { - "type": "object", - "description": "Query parameters for the bounded, AI-ready dependency summary.", - "required": [ - "anchor" - ], - "properties": { - "anchor": { - "$ref": "#/components/schemas/ServiceMapAnchor", - "description": "Host (and optional entity) to summarize." - }, - "network_scope_id": { - "type": "string", - "description": "Optional integrity check: if set, must match the network scope already associated with `anchor.host_id`, or the request is rejected with `InvalidParameter`." - } - } - }, - "ServiceMapSummaryNeighbor": { - "type": "object", - "description": "One outbound relation folded into the summary, in a compact shape optimized for prompts.", - "required": [ - "edge_id", - "source_entity_id", - "resolution_status" - ], - "properties": { - "edge_id": { - "type": "string", - "description": "Edge ID." - }, - "source_entity_id": { - "type": "string", - "description": "Entity ID of the source node." - }, - "source_display_name": { - "type": "string", - "description": "Display name of the source node, when known." - }, - "resolution_status": { - "type": "string", - "enum": [ - "resolved", - "ambiguous", - "unresolved" - ], - "description": "Resolution outcome for this relation's destination. `resolved` = uniquely resolved to a listening entity on a host — the relation is reliable; `ambiguous` = multiple candidates exist (or the listener address family is unknown) — treat the relation as a lead to verify; `unresolved` = no candidate found, the destination identity is unknown." - }, - "target_host_id": { - "type": "string", - "description": "Host ID of the resolved target, when `resolution_status=resolved` and unambiguous." - }, - "target_entity_id": { - "type": "string", - "description": "Entity ID of the resolved target, when `resolution_status=resolved` and unambiguous." - }, - "target_display_name": { - "type": "string", - "description": "Display name of the resolved target, when known." - }, - "destination_protocol": { - "type": "string", - "enum": [ - "tcp", - "udp" - ], - "description": "Transport protocol of the destination. `tcp` = TCP connection; `udp` = UDP session. Collectors currently only report `tcp`; `udp` is reserved." - }, - "destination_ip": { - "type": "string", - "description": "Destination IP address." - }, - "destination_port": { - "type": "integer", - "description": "Destination port." - }, - "last_seen": { - "type": "string", - "format": "date-time", - "description": "Timestamp this relation was last observed." - }, - "active_connections": { - "type": [ - "integer", - "null" - ], - "format": "int64", - "description": "Active connection count for this relation, when the underlying agent reports it." - } - } - }, - "ServiceMapSummaryResponse": { - "type": "object", - "description": "A bounded, AI-ready summary of a host's outbound service dependencies.", - "required": [ - "network_scope_id", - "anchor_host_id", - "status", - "authoritative", - "graph_role", - "latest_collection_authoritative", - "observed_at_ms", - "received_at_ms", - "freshness", - "coverage", - "truncated", - "resolution_counts", - "neighbors", - "context_ref_detail" - ], - "properties": { - "network_scope_id": { - "type": "string", - "description": "Network scope the summary was resolved within." - }, - "anchor_host_id": { - "type": "string", - "description": "Echo of the requested anchor host ID." - }, - "anchor_entity_id": { - "type": "string", - "description": "Echo of the requested anchor entity ID, when one was given." - }, - "status": { - "type": "string", - "enum": [ - "active", - "degraded", - "stale", - "initializing", - "disabled", - "unsupported", - "no_data" - ], - "description": "ServiceMap collection status of the anchor host.\n\n| Value | Meaning |\n|---|---|\n| `active` | Collection healthy: a fresh snapshot exists with no degradation. |\n| `degraded` | Collecting but quality is impaired: health reports are newer than the snapshot, the snapshot is truncated/degraded, or collection is failing. |\n| `stale` | A snapshot exists but is outdated (not updated within 2× the report interval). |\n| `initializing` | The agent has reported the capability but the first snapshot is not ready yet. |\n| `disabled` | Topology collection is disabled on this host. |\n| `unsupported` | The agent or kernel does not support this collection. |\n| `no_data` | No snapshot or health data received at all. |" - }, - "authoritative": { - "type": "boolean", - "description": "Always `true`; the summary is only ever built from an authoritative graph." - }, - "graph_role": { - "type": "string", - "enum": [ - "current", - "last_known_good" - ], - "description": "`current` if the summary reflects the live graph; `last_known_good` if the latest ingestion is unhealthy and this reflects the last authoritative graph instead." - }, - "latest_collection_authoritative": { - "type": "boolean", - "description": "False when `graph_role=last_known_good`, i.e. the most recent collection attempt was not authoritative." - }, - "latest_health_at_ms": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds of the most recent non-authoritative health signal, when more recent than the current graph." - }, - "observed_at_ms": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds the underlying data was observed by the agent." - }, - "received_at_ms": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds the current graph generation was received by the server." - }, - "freshness": { - "$ref": "#/components/schemas/ServiceMapFreshness", - "description": "How recent the graph data is." - }, - "coverage": { - "$ref": "#/components/schemas/ServiceMapTopologyCoverage", - "description": "Aggregate coverage and enrichment status for the anchor host's graph." - }, - "truncated": { - "type": "boolean", - "description": "True if the fixed-size summary omitted any neighbor or coverage detail to stay within its bounds." - }, - "truncation_reasons": { - "type": "array", - "description": "Machine-readable reasons the summary was truncated, when `truncated=true`.", - "items": { - "type": "string" - } - }, - "resolution_counts": { - "$ref": "#/components/schemas/ServiceMapResolutionCounts", - "description": "Counts of the anchor host's outbound relations by resolution outcome." - }, - "neighbors": { - "type": "array", - "description": "Up to 12 outbound relations, most informative first.", - "items": { - "$ref": "#/components/schemas/ServiceMapSummaryNeighbor" - } - }, - "context_ref_detail": { - "type": "string", - "description": "Pre-rendered natural-language evidence string summarizing this response, designed for LLM prompts. The structured fields above are the source of truth; this is a convenience rendering of them." - } - } - }, - "ServiceMapStatusRequest": { - "type": "object", - "description": "Selects which hosts to fetch collection status for: explicit host IDs, or a bounded fleet sample.", - "properties": { - "host_id": { - "type": "string", - "description": "A single host ID to check. Combine with `host_ids` to check several; mutually exclusive with `fleet=true`.", - "pattern": "^host_[a-z0-9_-]+$", - "maxLength": 128 - }, - "host_ids": { - "type": "array", - "description": "Multiple host IDs to check in one call, up to 200 combined with `host_id`. Mutually exclusive with `fleet=true`.", - "items": { - "type": "string" - } - }, - "fleet": { - "type": "boolean", - "description": "When `true`, ignore `host_id`/`host_ids` and instead sample up to `limit` fleet candidate hosts for the account. Default `false`.", - "default": false - }, - "limit": { - "type": "integer", - "description": "In `fleet` mode, the number of candidate hosts to sample. Ignored otherwise. Default 100, range 1-200.", - "default": 100, - "minimum": 1, - "maximum": 200 - } - } - }, - "ServiceMapCapability": { - "type": "object", - "description": "The host's self-reported ServiceMap capability, from the target inventory.", - "required": [ - "present", - "enabled", - "snapshot_ready" - ], - "properties": { - "present": { - "type": "boolean", - "description": "True if the host has an inventory row with ServiceMap capability metadata at all." - }, - "enabled": { - "type": "boolean", - "description": "True if ServiceMap collection is enabled on this host." - }, - "status": { - "type": "string", - "description": "Agent-reported capability status, e.g. `running`, `disabled`, `starting`, `failed`, `unsupported`." - }, - "host_id": { - "type": "string", - "description": "Host ID this capability describes." - }, - "capture_mode": { - "type": "string", - "description": "Capture mode, e.g. `ebpf` or `polling`." - }, - "report_interval_ms": { - "type": "integer", - "format": "int64", - "description": "Configured reporting interval in milliseconds." - }, - "snapshot_ready": { - "type": "boolean", - "description": "True if the agent has produced at least one full snapshot." - }, - "reason_codes": { - "type": "array", - "description": "Machine-readable codes explaining the current capability status.", - "items": { - "type": "string" - } - } - } - }, - "ServiceMapHostCoverage": { - "type": "object", - "description": "Coverage and enrichment status for a single host's graph.", - "required": [ - "degraded", - "truncated" - ], - "properties": { - "degraded": { - "type": "boolean", - "description": "True if the host's graph was degraded at collection time." - }, - "truncated": { - "type": "boolean", - "description": "True if the host's graph was truncated at collection time." - }, - "network_inventory_status": { - "type": "string", - "description": "Network-inventory enrichment status for this host, e.g. `complete`, `partial`, `unavailable`, as self-reported by the agent." - }, - "kubernetes_enrichment_status": { - "type": "string", - "description": "Kubernetes enrichment status for this host, as self-reported by the agent." - }, - "reason_codes": { - "type": "array", - "description": "Machine-readable codes explaining the current coverage status.", - "items": { - "type": "string" - } - } - } - }, - "ServiceMapStatusItem": { - "type": "object", - "description": "ServiceMap collection status for a single host.", - "required": [ - "host_id", - "status", - "authoritative", - "graph_available", - "capability", - "freshness", - "coverage", - "node_count", - "edge_count" - ], - "properties": { - "host_id": { - "type": "string", - "description": "Host ID this status describes." - }, - "network_scope_id": { - "type": "string", - "description": "Network scope resolved for this host, when known." - }, - "status": { - "type": "string", - "enum": [ - "active", - "degraded", - "stale", - "initializing", - "disabled", - "unsupported", - "no_data" - ], - "description": "Overall ServiceMap collection status.\n\n| Value | Meaning |\n|---|---|\n| `active` | Collection healthy: a fresh snapshot exists with no degradation. |\n| `degraded` | Collecting but quality is impaired: health reports are newer than the snapshot, the snapshot is truncated/degraded, or collection is failing. |\n| `stale` | A snapshot exists but is outdated (not updated within 2× the report interval). |\n| `initializing` | The agent has reported the capability but the first snapshot is not ready yet. |\n| `disabled` | Topology collection is disabled on this host. |\n| `unsupported` | The agent or kernel does not support this collection. |\n| `no_data` | No snapshot or health data received at all. |" - }, - "authoritative": { - "type": "boolean", - "description": "True if the host has an authoritative current graph." - }, - "graph_available": { - "type": "boolean", - "description": "True if a current graph can be fetched for this host right now." - }, - "capability": { - "$ref": "#/components/schemas/ServiceMapCapability", - "description": "The host's self-reported ServiceMap capability." - }, - "freshness": { - "$ref": "#/components/schemas/ServiceMapFreshness", - "description": "How recent the host's graph data is." - }, - "coverage": { - "$ref": "#/components/schemas/ServiceMapHostCoverage", - "description": "Coverage and enrichment status for this host's graph." - }, - "observed_at_ms": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds the host's graph was observed by the agent." - }, - "received_at_ms": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds the host's current graph generation was received by the server." - }, - "latest_health_at_ms": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds of the most recent non-authoritative health signal, when more recent than the current graph." - }, - "report_interval_ms": { - "type": "integer", - "format": "int64", - "description": "Configured reporting interval in milliseconds." - }, - "node_count": { - "type": "integer", - "description": "Number of nodes in the host's current graph." - }, - "edge_count": { - "type": "integer", - "description": "Number of edges in the host's current graph." - }, - "reason_codes": { - "type": "array", - "description": "Machine-readable codes explaining the current status.", - "items": { - "type": "string" - } - }, - "error_code": { - "type": "string", - "description": "Set to `status_unavailable` when this host's status could not be read; other fields fall back to inventory-derived defaults in that case." - } - } - }, - "ServiceMapStatusBatchCoverage": { - "type": "object", - "description": "Summary of how many hosts in the request were successfully covered.", - "required": [ - "requested", - "succeeded", - "failed", - "truncated", - "states" - ], - "properties": { - "requested": { - "type": "integer", - "description": "Number of hosts requested (explicit `host_id`/`host_ids`, or the fleet sample size actually scanned)." - }, - "succeeded": { - "type": "integer", - "description": "Number of hosts whose status was read successfully." - }, - "failed": { - "type": "integer", - "description": "Number of hosts whose status could not be read." - }, - "truncated": { - "type": "boolean", - "description": "True if `fleet` mode found more candidates than `limit` allowed to return." - }, - "states": { - "type": "object", - "description": "Count of items per status value; always includes all seven keys (`active`, `degraded`, `stale`, `initializing`, `disabled`, `unsupported`, `no_data`), zero-filled.", - "additionalProperties": { - "type": "integer" - } - } - } - }, - "ServiceMapStatusResponse": { - "type": "object", - "description": "ServiceMap collection status for the requested hosts.", - "required": [ - "fleet", - "items", - "coverage", - "partial", - "generated_at_ms" - ], - "properties": { - "fleet": { - "type": "boolean", - "description": "Echoes whether this response was produced from a fleet sample rather than explicit host IDs." - }, - "items": { - "type": "array", - "description": "Per-host status, in the same order the hosts were resolved.", - "items": { - "$ref": "#/components/schemas/ServiceMapStatusItem" - } - }, - "coverage": { - "$ref": "#/components/schemas/ServiceMapStatusBatchCoverage", - "description": "Summary of how many hosts were successfully covered." - }, - "partial": { - "type": "boolean", - "description": "True if any host failed or the fleet sample was truncated." - }, - "generated_at_ms": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds this response was generated." - } - } - }, - "ServiceMapFleetBrowseRequest": { - "type": "object", - "description": "Filter and pagination parameters for browsing ServiceMap-capable hosts.", - "properties": { - "cursor": { - "type": "string", - "description": "Opaque pagination cursor. Pass back the exact value from a previous response's `next_cursor`; omit for the first page." - }, - "limit": { - "type": "integer", - "description": "Maximum number of matching hosts to return in this page. Default 50, range 1-100.", - "default": 50, - "minimum": 1, - "maximum": 100 - }, - "scan_limit": { - "type": "integer", - "description": "Maximum number of candidate hosts to examine while filling this page. Default 1000, range `limit`-2000.", - "default": 1000, - "maximum": 2000 - }, - "statuses": { - "type": "array", - "description": "Filter to hosts currently in any of these statuses. Up to 20 values.", - "items": { - "type": "string", - "enum": [ - "active", - "degraded", - "stale", - "initializing", - "disabled", - "unsupported", - "no_data" - ] - }, - "maxItems": 20 - }, - "agent_versions": { - "type": "array", - "description": "Filter to hosts on any of these exact agent versions. Up to 20 values.", - "items": { - "type": "string" - }, - "maxItems": 20 - }, - "edge_clusters": { - "type": "array", - "description": "Filter to hosts in any of these exact edge cluster names. Up to 20 values.", - "items": { - "type": "string" - }, - "maxItems": 20 - }, - "capture_modes": { - "type": "array", - "description": "Filter to hosts using any of these capture modes. `unknown` matches hosts that have not reported a capture mode yet.", - "items": { - "type": "string", - "enum": [ - "ebpf", - "polling", - "unknown" - ] - }, - "maxItems": 3 - } - } - }, - "ServiceMapFleetHostCapability": { - "type": "object", - "description": "A fleet-listed host's ServiceMap capability and current collection status, joined from inventory and live state.", - "required": [ - "enabled", - "status", - "snapshot_ready", - "authoritative", - "graph_available", - "node_count", - "edge_count" - ], - "properties": { - "enabled": { - "type": "boolean", - "description": "True if ServiceMap collection is enabled on this host." - }, - "status": { - "type": "string", - "enum": [ - "active", - "degraded", - "stale", - "initializing", - "disabled", - "unsupported", - "no_data" - ], - "description": "Overall ServiceMap collection status.\n\n| Value | Meaning |\n|---|---|\n| `active` | Collection healthy: a fresh snapshot exists with no degradation. |\n| `degraded` | Collecting but quality is impaired: health reports are newer than the snapshot, the snapshot is truncated/degraded, or collection is failing. |\n| `stale` | A snapshot exists but is outdated (not updated within 2× the report interval). |\n| `initializing` | The agent has reported the capability but the first snapshot is not ready yet. |\n| `disabled` | Topology collection is disabled on this host. |\n| `unsupported` | The agent or kernel does not support this collection. |\n| `no_data` | No snapshot or health data received at all. |" - }, - "capability_status": { - "type": "string", - "description": "Agent-reported capability status, e.g. `running`, `disabled`, `starting`, `failed`, `unsupported`." - }, - "capture_mode": { - "type": "string", - "description": "Capture mode, e.g. `ebpf` or `polling`." - }, - "report_interval_ms": { - "type": "integer", - "format": "int64", - "description": "Configured reporting interval in milliseconds." - }, - "snapshot_ready": { - "type": "boolean", - "description": "True if the agent has produced at least one full snapshot." - }, - "authoritative": { - "type": "boolean", - "description": "True if the host has an authoritative current graph." - }, - "graph_available": { - "type": "boolean", - "description": "True if a current graph can be fetched for this host right now." - }, - "freshness_status": { - "type": "string", - "enum": [ - "fresh", - "stale", - "unknown" - ], - "description": "Freshness classification of the host's graph. `fresh` = the latest snapshot was received within 2× the report interval; `stale` = no new snapshot within 2× the report interval; `unknown` = no topology snapshot ever received, freshness undecidable." - }, - "max_age_ms": { - "type": "integer", - "format": "int64", - "description": "Age in milliseconds of the host's graph data, relative to when this response was generated." - }, - "observed_at_ms": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds the host's graph was observed by the agent." - }, - "received_at_ms": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds the host's current graph generation was received by the server." - }, - "node_count": { - "type": "integer", - "description": "Number of nodes in the host's current graph." - }, - "edge_count": { - "type": "integer", - "description": "Number of edges in the host's current graph." - }, - "reason_codes": { - "type": "array", - "description": "Machine-readable codes explaining the current status.", - "items": { - "type": "string" - } - }, - "error_code": { - "type": "string", - "description": "Set to `status_unavailable` when this host's live status could not be read; other fields fall back to inventory-derived defaults in that case." - } - } - }, - "ServiceMapFleetHost": { - "type": "object", - "description": "One host matched by the fleet browse filters.", - "required": [ - "host_id", - "agent_version", - "edge_cluster", - "servicemap" - ], - "properties": { - "host_id": { - "type": "string", - "description": "Stable ServiceMap host identifier." - }, - "agent_version": { - "type": "string", - "description": "Agent version reported by this host." - }, - "edge_cluster": { - "type": "string", - "description": "Edge cluster name this host belongs to." - }, - "servicemap": { - "$ref": "#/components/schemas/ServiceMapFleetHostCapability", - "description": "ServiceMap capability and current collection status for this host." - } - } - }, - "ServiceMapFleetCoverage": { - "type": "object", - "description": "Coverage of the candidate scan that produced this page.", - "required": [ - "scanned", - "matched", - "returned", - "failed", - "states" - ], - "properties": { - "scanned": { - "type": "integer", - "description": "Number of distinct candidate hosts actually examined in this request." - }, - "matched": { - "type": "integer", - "description": "Number of scanned hosts that passed all filters." - }, - "returned": { - "type": "integer", - "description": "Number of matched hosts included in this page (`<= limit`)." - }, - "failed": { - "type": "integer", - "description": "Number of candidate hosts whose status could not be read." - }, - "states": { - "type": "object", - "description": "Count of returned items per status value; always includes all seven status keys, zero-filled. Reflects only this page, not the account's full population.", - "additionalProperties": { - "type": "integer" - } - } - } - }, - "ServiceMapFleetBrowseResponse": { - "type": "object", - "description": "A page of hosts matching the fleet browse filters.", - "required": [ - "items", - "coverage", - "partial", - "truncated", - "generated_at_ms" - ], - "properties": { - "items": { - "type": "array", - "description": "Matching hosts for this page.", - "items": { - "$ref": "#/components/schemas/ServiceMapFleetHost" - } - }, - "coverage": { - "$ref": "#/components/schemas/ServiceMapFleetCoverage", - "description": "Coverage of the candidate scan that produced this page." - }, - "partial": { - "type": "boolean", - "description": "True if any host in this page failed to read status, or the scan was truncated." - }, - "truncated": { - "type": "boolean", - "description": "True if `scan_limit` was reached before finding `limit` matches; `next_cursor` may still find more." - }, - "truncation_reasons": { - "type": "array", - "description": "Machine-readable reasons the scan was truncated, when `truncated=true`.", - "items": { - "type": "string" - } - }, - "next_cursor": { - "type": "string", - "description": "Opaque cursor to fetch the next page. Absent when there are no more candidates to scan." - }, - "generated_at_ms": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds this response was generated." - } - } - }, - "ServiceMapFleetSummaryRequest": { - "type": "object", - "description": "Filter parameters for the aggregate fleet status distribution.", - "properties": { - "scan_limit": { - "type": "integer", - "description": "Maximum number of candidate hosts to scan. Default 2000, range 1-5000.", - "default": 2000, - "minimum": 1, - "maximum": 5000 - }, - "agent_versions": { - "type": "array", - "description": "Filter to hosts on any of these exact agent versions. Up to 20 values.", - "items": { - "type": "string" - }, - "maxItems": 20 - }, - "edge_clusters": { - "type": "array", - "description": "Filter to hosts in any of these exact edge cluster names. Up to 20 values.", - "items": { - "type": "string" - }, - "maxItems": 20 - }, - "capture_modes": { - "type": "array", - "description": "Filter to hosts using any of these capture modes. `unknown` matches hosts that have not reported a capture mode yet.", - "items": { - "type": "string", - "enum": [ - "ebpf", - "polling", - "unknown" - ] - }, - "maxItems": 3 - } - } - }, - "ServiceMapFleetSummaryCoverage": { - "type": "object", - "description": "Aggregate status distribution across the scanned candidate hosts.", - "required": [ - "scanned", - "matched", - "classified", - "failed", - "states" - ], - "properties": { - "scanned": { - "type": "integer", - "description": "Number of distinct candidate hosts actually examined." - }, - "matched": { - "type": "integer", - "description": "Number of scanned hosts that passed the agent version / edge cluster / capture mode filters and still have a current inventory row." - }, - "classified": { - "type": "integer", - "description": "Number of matched hosts successfully classified into one of the seven statuses; equals the sum of `states`." - }, - "failed": { - "type": "integer", - "description": "Number of hosts whose candidate/detail read raced or whose live status could not be read." - }, - "states": { - "type": "object", - "description": "Count of hosts per status value; always includes all seven keys, zero-filled.", - "additionalProperties": { - "type": "integer" - } - } - } - }, - "ServiceMapFleetSummaryResponse": { - "type": "object", - "description": "Aggregate status distribution across the account's ServiceMap-capable hosts.", - "required": [ - "coverage", - "scan_limit", - "partial", - "truncated", - "generated_at_ms" - ], - "properties": { - "coverage": { - "$ref": "#/components/schemas/ServiceMapFleetSummaryCoverage", - "description": "Aggregate status distribution across the scanned candidate hosts." - }, - "scan_limit": { - "type": "integer", - "description": "The normalized scan budget actually applied, echoing the default when the request omitted it." - }, - "partial": { - "type": "boolean", - "description": "True if the scan was truncated or any host failed to classify." - }, - "truncated": { - "type": "boolean", - "description": "True if `scan_limit` was reached before scanning every candidate host in the account." - }, - "truncation_reasons": { - "type": "array", - "description": "Machine-readable reasons the scan was truncated, when `truncated=true`.", - "items": { - "type": "string" - } - }, - "generated_at_ms": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds this response was generated." - } - } - }, "RumErrorIngestionFilterCondition": { "type": "object", "description": "A single filter condition matched against one error field.", @@ -61652,134 +59368,6 @@ } } }, - "TargetInventoryServiceMapCapability": { - "type": "object", - "description": "ServiceMap capability and live status of a target's host.", - "required": [ - "enabled", - "status", - "snapshot_ready", - "authoritative", - "graph_available", - "node_count", - "edge_count" - ], - "properties": { - "enabled": { - "type": "boolean", - "description": "Whether ServiceMap collection is enabled on the agent." - }, - "status": { - "type": "string", - "enum": [ - "active", - "degraded", - "stale", - "initializing", - "disabled", - "unsupported", - "no_data" - ], - "description": "ServiceMap collection status of the host.\n\n| Value | Meaning |\n|---|---|\n| `active` | Collection healthy: a fresh snapshot exists with no degradation. |\n| `degraded` | Collecting but quality is impaired: health reports are newer than the snapshot, the snapshot is truncated/degraded, or collection is failing. |\n| `stale` | A snapshot exists but is outdated (no update within 2x the report interval). |\n| `initializing` | The agent reported the capability but the first snapshot is not ready yet. |\n| `disabled` | Topology collection is disabled on this host. |\n| `unsupported` | The agent or kernel does not support collection. |\n| `no_data` | No snapshot or health data received yet. |" - }, - "capability_status": { - "type": "string", - "description": "Agent-reported capability status, e.g. `running`, `disabled`, `starting`, `failed`, `unsupported`. Omitted when the agent has not reported one." - }, - "capture_mode": { - "type": "string", - "description": "Capture mode, e.g. `ebpf` or `polling`. Omitted when unknown." - }, - "report_interval_ms": { - "type": "integer", - "format": "int64", - "description": "Configured reporting interval in milliseconds. Omitted when unknown." - }, - "snapshot_ready": { - "type": "boolean", - "description": "True if the agent has produced at least one full snapshot." - }, - "authoritative": { - "type": "boolean", - "description": "True if the current status derives from an authoritative graph snapshot." - }, - "graph_available": { - "type": "boolean", - "description": "True if a current graph can be fetched for this host right now." - }, - "freshness_status": { - "type": "string", - "enum": [ - "fresh", - "stale", - "unknown" - ], - "description": "Freshness classification of the host's graph. `fresh` = the latest snapshot was received within 2x the report interval; `stale` = no new snapshot within that window; `unknown` = not yet classified. Omitted when unknown." - }, - "max_age_ms": { - "type": "integer", - "format": "int64", - "description": "Maximum snapshot age in milliseconds tolerated before it counts as stale. Omitted when not applicable." - }, - "observed_at_ms": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds when the agent last observed graph generation. Omitted when unknown." - }, - "received_at_ms": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds when the server last received a snapshot. Omitted when unknown." - }, - "node_count": { - "type": "integer", - "description": "Number of nodes in the host's current graph." - }, - "edge_count": { - "type": "integer", - "description": "Number of edges in the host's current graph." - }, - "reason_codes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Machine-readable codes explaining the current capability status. Omitted when empty." - }, - "error_code": { - "type": "string", - "description": "Set to `status_unavailable` when the live status could not be read; other fields then fall back to inventory-derived values. Omitted otherwise." - } - } - }, - "TargetInventoryServiceMapCoverage": { - "type": "object", - "description": "ServiceMap status-fetch coverage for a targets page.", - "required": [ - "requested", - "succeeded", - "failed", - "partial" - ], - "properties": { - "requested": { - "type": "integer", - "description": "Items on this page that carry ServiceMap data." - }, - "succeeded": { - "type": "integer", - "description": "Items whose live ServiceMap status was read successfully." - }, - "failed": { - "type": "integer", - "description": "Items whose live ServiceMap status read failed (`servicemap.error_code` set)." - }, - "partial": { - "type": "boolean", - "description": "True when at least one item's status read failed." - } - } - }, "RoleDeleteRequest": { "type": "object", "required": [ diff --git a/openapi/openapi.zh.json b/openapi/openapi.zh.json index b811b92..edc6fff 100644 --- a/openapi/openapi.zh.json +++ b/openapi/openapi.zh.json @@ -152,10 +152,6 @@ "name": "RUM/RUM 会话回放", "description": "查询 RUM 会话的回放元数据与录制分段。" }, - { - "name": "Monitors/服务拓扑", - "description": "查询基于网络观测生成的服务拓扑、依赖摘要,以及主机的服务拓扑采集状态。" - }, { "name": "RUM/错误采集规则", "description": "配置和查看决定 RUM 应用采集哪些错误的规则,并可查看其编辑历史。" @@ -27665,19 +27661,19 @@ } } }, - "/monit/servicemap/status": { + "/rum/error-ingestion/rules/list": { "post": { - "operationId": "monit-servicemap-read-status", - "summary": "获取采集状态", - "description": "返回一台或多台主机的服务拓扑采集状态,或一份有界的主机群抽样状态。", + "operationId": "rum-error-ingestion-rules-list", + "summary": "查询错误采集规则列表", + "description": "返回某 RUM 应用下配置的全部错误采集规则。", "tags": [ - "Monitors/服务拓扑" + "RUM/错误采集规则" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **100 次/分钟**;**5 次/秒** |\n| 权限要求 | **监控对象查看**(`monit`) |\n\n## 使用说明\n\n- 服务拓扑是可选子系统:未配置 `redis.servicemap` 的部署会返回 `ServiceUnavailable`。\n- 每次调用只能使用一种选择方式:显式的 `host_id`/`host_ids`,或 `fleet=true`;两者同时传入会被拒绝。\n- 与 `POST /monit/servicemap/topology`、`POST /monit/servicemap/summary` 不同,单个主机解析失败不会导致整个请求失败,而是通过 `items[].error_code` 逐项披露。\n- `limit`(默认 100,最大 200)限定了显式主机的接受数量,在 `fleet` 模式下则限定了抽样的候选主机数量。", - "href": "/zh/api-reference/monitors/service-map/monit-servicemap-read-status", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 已删除的规则不会出现在结果中,仅返回状态为 `enabled` 或 `disabled` 的规则。\n- 结果按创建时间倒序排列。", + "href": "/zh/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-list", "metadata": { - "sidebarTitle": "获取采集状态" + "sidebarTitle": "查询错误采集规则列表" } }, "responses": { @@ -27694,7 +27690,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ServiceMapStatusResponse" + "$ref": "#/components/schemas/RumErrorIngestionListResponse" } } } @@ -27703,59 +27699,44 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "fleet": false, "items": [ { - "host_id": "host_0123456789abcdef0123456789abcdef", - "network_scope_id": "ns_0123456789abcdef0123456789abcdef", - "status": "active", - "authoritative": true, - "graph_available": true, - "capability": { - "present": true, - "enabled": true, - "status": "running", - "host_id": "host_0123456789abcdef0123456789abcdef", - "capture_mode": "ebpf", - "report_interval_ms": 60000, - "snapshot_ready": true - }, - "freshness": { - "status": "fresh", - "newest_received_at_ms": 1784635557272, - "oldest_received_at_ms": 1784635557272, - "max_age_ms": 1200 - }, - "coverage": { - "degraded": false, - "truncated": false, - "network_inventory_status": "complete", - "kubernetes_enrichment_status": "unavailable" - }, - "observed_at_ms": 1784635556072, - "received_at_ms": 1784635557272, - "report_interval_ms": 60000, - "node_count": 12, - "edge_count": 8 - } - ], - "coverage": { - "requested": 1, - "succeeded": 1, - "failed": 0, - "truncated": false, - "states": { - "active": 1, - "degraded": 0, - "stale": 0, - "initializing": 0, - "disabled": 0, - "unsupported": 0, - "no_data": 0 + "rule_id": "9spXEVoMeZWujjz25yrgTe", + "rule_name": "Production console errors", + "description": "Only ingest TypeError/ReferenceError from production, excluding Safari.", + "filters": [ + [ + { + "key": "error.env", + "oper": "IN", + "vals": [ + "production" + ] + }, + { + "key": "error.error_type", + "oper": "IN", + "vals": [ + "TypeError", + "ReferenceError" + ] + } + ], + [ + { + "key": "error.browser_name", + "oper": "NOTIN", + "vals": [ + "Safari" + ] + } + ] + ], + "status": "enabled", + "created_at": 1786000000000, + "updated_at": 1786003600000 } - }, - "partial": false, - "generated_at_ms": 1784635558472 + ] } } } @@ -27767,9 +27748,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "503": { - "$ref": "#/components/responses/ServiceUnavailable" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -27782,29 +27760,29 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceMapStatusRequest" + "$ref": "#/components/schemas/RumErrorIngestionListRequest" }, "example": { - "host_id": "host_0123456789abcdef0123456789abcdef" + "application_id": "WoyQQ3BohkdtPivubEvE8o" } } } } } }, - "/monit/servicemap/topology": { + "/rum/error-ingestion/rules/create": { "post": { - "operationId": "monit-servicemap-read-topology", - "summary": "获取服务拓扑图", - "description": "返回以某台主机为锚点、通过实时网络观测发现的出向依赖拓扑图。", + "operationId": "rum-error-ingestion-rules-create", + "summary": "创建错误采集规则", + "description": "创建一条新的错误采集规则,用于过滤要存储的错误。", "tags": [ - "Monitors/服务拓扑" + "RUM/错误采集规则" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **20 次/分钟**;**1 次/秒** |\n| 权限要求 | **服务拓扑查看**(`monit`) |\n\n## 使用说明\n\n- 服务拓扑是可选子系统:未配置 `redis.servicemap` 的部署会返回 `ServiceUnavailable`。\n- `at` 当前仅支持 `now`(留空效果相同)。\n- `direction` 当前仅支持 `outbound`(留空效果相同)。\n- `anchor.host_id` 必须已被服务拓扑感知(存在当前或近期的拓扑数据),否则返回 `ResourceNotFound`。\n- `depth`(最大 3)、`max_nodes`(最大 500)、`max_edges`(最大 1000)共同限定遍历范围;触发任一上限时 `truncated=true`,并在 `truncation_reasons` 中说明原因。\n- `unresolved_mode=summary`(相对默认值 `full`)会从 `edges` 中省略未解析边,仅在 `unresolved_endpoints` 中返回有界样本。", - "href": "/zh/api-reference/monitors/service-map/monit-servicemap-read-topology", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 创建、更新、启用、禁用、删除都会先把应用当前的全部规则快照进历史记录,因此 `history/list` 会反映每一次变更。\n- `filters` 中的每个条件 key 必须是受支持的 `error.*` 字段或 `context.*` 路径,不支持的 key 会返回 `InvalidParameter`。\n- 新建规则的初始状态为 `enabled`;如需创建后即处于停用状态,需再调用一次 `disable`。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-create", "metadata": { - "sidebarTitle": "获取服务拓扑图" + "sidebarTitle": "创建错误采集规则" } }, "responses": { @@ -27821,7 +27799,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ServiceMapTopologyResponse" + "$ref": "#/components/schemas/RumErrorIngestionCreateResponse" } } } @@ -27830,106 +27808,8 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "network_scope_id": "ns_0123456789abcdef0123456789abcdef", - "anchor_host_id": "host_0123456789abcdef0123456789abcdef", - "observed_at_ms": 1784635556072, - "freshness": { - "status": "fresh", - "newest_received_at_ms": 1784635557272, - "oldest_received_at_ms": 1784635557272, - "max_age_ms": 1200 - }, - "coverage": { - "direction": "outbound", - "hosts_loaded": 2, - "degraded_hosts": 0, - "truncated_hosts": 0, - "capture_modes": [ - "ebpf" - ], - "network_inventory_status": "complete", - "kubernetes_enrichment_status": "unavailable", - "listener_address_family_status": "complete", - "ipv6_wildcard_listener_count": 0, - "ipv6_only_known_listener_count": 0, - "ipv6_only_unknown_listener_count": 0 - }, - "truncated": false, - "nodes": [ - { - "host_id": "host_0123456789abcdef0123456789abcdef", - "id": "procw_v1_source", - "kind": "process", - "display_name": "orders.service", - "systemd_unit": "orders.service", - "first_seen": "2026-07-01T02:00:00Z", - "last_seen": "2026-07-21T18:45:56.072+08:00" - }, - { - "host_id": "host_fedcba9876543210fedcba9876543210", - "id": "procw_v1_mysql", - "kind": "process", - "display_name": "mysqld.service", - "systemd_unit": "mysqld.service", - "first_seen": "2026-07-01T02:00:00Z", - "last_seen": "2026-07-21T18:45:56.072+08:00" - } - ], - "edges": [ - { - "host_id": "host_0123456789abcdef0123456789abcdef", - "id": "edge_v1_example", - "source_entity_id": "procw_v1_source", - "source_netns_id": "netns_v1_default", - "destination": { - "ip": "203.0.113.105", - "port": 3306, - "protocol": "tcp" - }, - "evidence": "connect", - "last_seen": "2026-07-21T18:45:56.072+08:00", - "depth": 1, - "endpoint_resolution": { - "status": "resolved", - "endpoint": { - "ip": "203.0.113.105", - "port": 3306, - "protocol": "tcp" - }, - "candidates": [ - { - "host_id": "host_fedcba9876543210fedcba9876543210", - "entity_id": "procw_v1_mysql", - "netns_id": "netns_v1_default", - "listener_id": "listener_v1_mysql", - "listener_ip": "203.0.113.105", - "effective_ip": "203.0.113.105", - "protocol": "tcp", - "port": 3306, - "match_kind": "exact", - "confidence": 1.0, - "node_kind": "process", - "node_display_name": "mysqld.service", - "graph_sequence": 42, - "observed_at_ms": 1784635556072 - } - ] - } - } - ], - "unresolved_endpoints": [], - "resolution_counts": { - "resolved": 1, - "ambiguous": 0, - "unresolved": 0 - }, - "unresolved_projection": { - "mode": "full", - "total": 0, - "returned": 0, - "omitted": 0, - "by_reason": [] - } + "rule_id": "9spXEVoMeZWujjz25yrgTe", + "rule_name": "Production console errors" } } } @@ -27941,9 +27821,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "503": { - "$ref": "#/components/responses/ServiceUnavailable" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -27956,36 +27833,59 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceMapTopologyRequest" + "$ref": "#/components/schemas/RumErrorIngestionCreateRequest" }, "example": { - "anchor": { - "host_id": "host_0123456789abcdef0123456789abcdef" - }, - "depth": 2, - "max_nodes": 100, - "max_edges": 200, - "include_metrics": true, - "unresolved_mode": "full" + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "rule_name": "Production console errors", + "description": "Only ingest TypeError/ReferenceError from production, excluding Safari.", + "filters": [ + [ + { + "key": "error.env", + "oper": "IN", + "vals": [ + "production" + ] + }, + { + "key": "error.error_type", + "oper": "IN", + "vals": [ + "TypeError", + "ReferenceError" + ] + } + ], + [ + { + "key": "error.browser_name", + "oper": "NOTIN", + "vals": [ + "Safari" + ] + } + ] + ] } } } } } }, - "/monit/servicemap/summary": { + "/rum/error-ingestion/rules/update": { "post": { - "operationId": "monit-servicemap-read-summary", - "summary": "获取拓扑摘要", - "description": "返回某台主机出向服务依赖的有界摘要,专为 AI 场景准备。", + "operationId": "rum-error-ingestion-rules-update", + "summary": "更新错误采集规则", + "description": "更新错误采集规则的名称、描述或过滤条件。", "tags": [ - "Monitors/服务拓扑" + "RUM/错误采集规则" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **30 次/分钟**;**2 次/秒** |\n| 权限要求 | **服务拓扑查看**(`monit`) |\n\n## 使用说明\n\n- 服务拓扑是可选子系统:未配置 `redis.servicemap` 的部署会返回 `ServiceUnavailable`。\n- `anchor.host_id` 必须已被服务拓扑感知,否则返回 `ResourceNotFound`。\n- 本接口是固定大小的摘要,而非 `POST /monit/servicemap/topology` 的缩小版:深度固定为 1,相邻关系上限固定为 12 条,调用方均不可调整。\n- `context_ref_detail` 是为大模型提示词预先渲染好的自然语言证据摘要文本;结构化字段才是权威来源,该字段只是对其的便捷呈现。\n- `graph_role=last_known_good` 表示最新一次采集不健康,摘要改为基于上一份权威拓扑而非实时数据。", - "href": "/zh/api-reference/monitors/service-map/monit-servicemap-read-summary", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 仅更新请求中出现的字段,未传入的字段保持原值不变。\n- 不传任何可更新字段时视为空操作,仍会返回成功。\n- 若 `rule_id` 在该 `application_id` 下不存在,返回 `ResourceNotFound`。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-update", "metadata": { - "sidebarTitle": "获取拓扑摘要" + "sidebarTitle": "更新错误采集规则" } }, "responses": { @@ -28002,7 +27902,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ServiceMapSummaryResponse" + "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" } } } @@ -28010,56 +27910,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "network_scope_id": "ns_0123456789abcdef0123456789abcdef", - "anchor_host_id": "host_0123456789abcdef0123456789abcdef", - "status": "active", - "authoritative": true, - "graph_role": "current", - "latest_collection_authoritative": true, - "observed_at_ms": 1784635556072, - "received_at_ms": 1784635557272, - "freshness": { - "status": "fresh", - "newest_received_at_ms": 1784635557272, - "oldest_received_at_ms": 1784635557272, - "max_age_ms": 1200 - }, - "coverage": { - "direction": "outbound", - "hosts_loaded": 2, - "degraded_hosts": 0, - "truncated_hosts": 0, - "capture_modes": [ - "ebpf" - ], - "network_inventory_status": "complete", - "kubernetes_enrichment_status": "unavailable" - }, - "truncated": false, - "resolution_counts": { - "resolved": 1, - "ambiguous": 0, - "unresolved": 0 - }, - "neighbors": [ - { - "edge_id": "edge_v1_example", - "source_entity_id": "procw_v1_source", - "source_display_name": "orders.service", - "resolution_status": "resolved", - "target_host_id": "host_fedcba9876543210fedcba9876543210", - "target_entity_id": "procw_v1_mysql", - "target_display_name": "mysqld.service", - "destination_protocol": "tcp", - "destination_ip": "203.0.113.105", - "destination_port": 3306, - "last_seen": "2026-07-21T18:45:56.072+08:00", - "active_connections": 1 - } - ], - "context_ref_detail": "ServiceMap current bounded evidence: anchor_host_id=host_0123456789abcdef0123456789abcdef; observed_at_ms=1784635556072; received_at_ms=1784635557272; latest_health_at_ms=0; status=active; freshness=fresh; graph_authoritative=true; latest_collection_authoritative=true; coverage_hosts=2; resolution_counts=resolved:1,ambiguous:0,unresolved:0; truncated=false. Observed outbound relations (relations_shown=1/1): [orders.service -> mysqld.service, resolution=resolved, last_seen=2026-07-21T18:45:56.072+08:00] Evidence rules: only resolution=resolved relations are certain; treat ambiguous/unresolved relations as leads to verify, not fact." - } + "data": {} } } } @@ -28070,9 +27921,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "503": { - "$ref": "#/components/responses/ServiceUnavailable" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -28085,31 +27933,31 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceMapSummaryRequest" + "$ref": "#/components/schemas/RumErrorIngestionUpdateRequest" }, "example": { - "anchor": { - "host_id": "host_0123456789abcdef0123456789abcdef" - } + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "rule_id": "9spXEVoMeZWujjz25yrgTe", + "description": "Now also excludes staging traffic." } } } } } }, - "/monit/servicemap/fleet": { + "/rum/error-ingestion/rules/delete": { "post": { - "operationId": "monit-servicemap-read-fleet", - "summary": "浏览拓扑主机", - "description": "浏览账户内启用了服务拓扑能力的主机及其当前采集状态。", + "operationId": "rum-error-ingestion-rules-delete", + "summary": "删除错误采集规则", + "description": "从 RUM 应用中删除一条错误采集规则。", "tags": [ - "Monitors/服务拓扑" + "RUM/错误采集规则" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **30 次/分钟**;**2 次/秒** |\n| 权限要求 | **监控对象查看**(`monit`) |\n\n## 使用说明\n\n- 与其余四个服务拓扑只读接口不同,本接口在服务拓扑存储不可用时会优雅降级:匹配逻辑仍基于清单数据运行,受影响的项通过 `servicemap.error_code=status_unavailable` 及 `partial=true` 披露,而不会导致整个请求失败。\n- `cursor` 是不透明值,请原样传入 `next_cursor` 返回的值,不要自行构造或解析。\n- 在找到 `limit` 个匹配前先达到 `scan_limit` 时,会设置 `truncated=true` 且仍会返回 `next_cursor`——这与扫描到账户主机末尾不是一回事。\n- `coverage.scanned`/`matched`/`returned` 仅描述本页的扫描情况,不代表账户内主机总量。", - "href": "/zh/api-reference/monitors/service-map/monit-servicemap-read-fleet", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 删除后规则会立即从 `list` 结果中消失;但用于过滤判定的启用规则集有最多 5 秒缓存,因此删除后数秒内上报的错误仍可能被该规则匹配。\n- 若 `rule_id` 在该 `application_id` 下不存在,返回 `ResourceNotFound`。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-delete", "metadata": { - "sidebarTitle": "浏览拓扑主机" + "sidebarTitle": "删除错误采集规则" } }, "responses": { @@ -28126,7 +27974,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ServiceMapFleetBrowseResponse" + "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" } } } @@ -28134,69 +27982,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "items": [ - { - "host_id": "host_0123456789abcdef0123456789abcdef", - "agent_version": "v1.2.3", - "edge_cluster": "edge-a", - "servicemap": { - "enabled": true, - "status": "degraded", - "capability_status": "degraded", - "capture_mode": "ebpf", - "snapshot_ready": true, - "authoritative": true, - "graph_available": false, - "freshness_status": "fresh", - "observed_at_ms": 1784635557272, - "received_at_ms": 1784635557272, - "node_count": 46, - "edge_count": 200, - "reason_codes": [ - "snapshot_incomplete" - ] - } - }, - { - "host_id": "host_fedcba9876543210fedcba9876543210", - "agent_version": "v1.2.3", - "edge_cluster": "edge-a", - "servicemap": { - "enabled": true, - "status": "stale", - "capability_status": "running", - "capture_mode": "ebpf", - "snapshot_ready": true, - "authoritative": true, - "graph_available": true, - "freshness_status": "stale", - "observed_at_ms": 1784631957272, - "received_at_ms": 1784631957272, - "node_count": 38, - "edge_count": 152 - } - } - ], - "coverage": { - "scanned": 80, - "matched": 2, - "returned": 2, - "failed": 0, - "states": { - "active": 0, - "degraded": 1, - "stale": 1, - "initializing": 0, - "disabled": 0, - "unsupported": 0, - "no_data": 0 - } - }, - "partial": false, - "truncated": false, - "generated_at_ms": 1784635557272 - } + "data": {} } } } @@ -28207,9 +27993,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "503": { - "$ref": "#/components/responses/ServiceUnavailable" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -28222,43 +28005,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceMapFleetBrowseRequest" + "$ref": "#/components/schemas/RumErrorIngestionRuleIDRequest" }, "example": { - "limit": 50, - "scan_limit": 1000, - "statuses": [ - "degraded", - "stale" - ], - "agent_versions": [ - "v1.2.3" - ], - "edge_clusters": [ - "edge-a" - ], - "capture_modes": [ - "ebpf" - ] + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "rule_id": "9spXEVoMeZWujjz25yrgTe" } } } } } }, - "/monit/servicemap/fleet/summary": { + "/rum/error-ingestion/rules/enable": { "post": { - "operationId": "monit-servicemap-read-fleet-summary", - "summary": "获取主机概览", - "description": "返回账户内启用服务拓扑能力的主机的状态分布聚合统计。", + "operationId": "rum-error-ingestion-rules-enable", + "summary": "启用错误采集规则", + "description": "重新启用一条已被禁用的错误采集规则。", "tags": [ - "Monitors/服务拓扑" + "RUM/错误采集规则" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**;**1 次/秒** |\n| 权限要求 | **监控对象查看**(`monit`) |\n\n## 使用说明\n\n- 与 `POST /monit/servicemap/fleet` 相同,本接口在服务拓扑存储不可用时会优雅降级,而不会导致整个请求失败。\n- 本接口是单次请求、不分页的聚合统计,扫描范围最多 `scan_limit` 台主机(默认 2000,最大 5000)——不返回逐台主机明细,也不接受状态过滤。\n- 在扫描完账户全部主机前先达到 `scan_limit` 时会设置 `truncated=true`;此时 `coverage.states` 仅反映实际扫描到的主机,不代表账户全量分布。", - "href": "/zh/api-reference/monitors/service-map/monit-servicemap-read-fleet-summary", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 若 `rule_id` 在该 `application_id` 下不存在,返回 `ResourceNotFound`。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-enable", "metadata": { - "sidebarTitle": "获取主机概览" + "sidebarTitle": "启用错误采集规则" } }, "responses": { @@ -28275,7 +28045,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ServiceMapFleetSummaryResponse" + "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" } } } @@ -28283,27 +28053,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "coverage": { - "scanned": 1200, - "matched": 1150, - "classified": 1149, - "failed": 1, - "states": { - "active": 1000, - "degraded": 20, - "stale": 30, - "initializing": 40, - "disabled": 25, - "unsupported": 4, - "no_data": 30 - } - }, - "scan_limit": 2000, - "partial": true, - "truncated": false, - "generated_at_ms": 1784635557272 - } + "data": {} } } } @@ -28314,9 +28064,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "503": { - "$ref": "#/components/responses/ServiceUnavailable" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -28329,38 +28076,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceMapFleetSummaryRequest" + "$ref": "#/components/schemas/RumErrorIngestionRuleIDRequest" }, "example": { - "scan_limit": 2000, - "agent_versions": [ - "v1.2.3" - ], - "edge_clusters": [ - "edge-a" - ], - "capture_modes": [ - "ebpf" - ] + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "rule_id": "9spXEVoMeZWujjz25yrgTe" } } } } } }, - "/rum/error-ingestion/rules/list": { + "/rum/error-ingestion/rules/disable": { "post": { - "operationId": "rum-error-ingestion-rules-list", - "summary": "查询错误采集规则列表", - "description": "返回某 RUM 应用下配置的全部错误采集规则。", + "operationId": "rum-error-ingestion-rules-disable", + "summary": "禁用错误采集规则", + "description": "禁用一条错误采集规则但不删除它。", "tags": [ "RUM/错误采集规则" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 已删除的规则不会出现在结果中,仅返回状态为 `enabled` 或 `disabled` 的规则。\n- 结果按创建时间倒序排列。", - "href": "/zh/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-list", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 禁用的规则会保留并仍出现在 `list` 结果中,但不再参与错误匹配。\n- 若 `rule_id` 在该 `application_id` 下不存在,返回 `ResourceNotFound`。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-disable", "metadata": { - "sidebarTitle": "查询错误采集规则列表" + "sidebarTitle": "禁用错误采集规则" } }, "responses": { @@ -28377,7 +28116,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/RumErrorIngestionListResponse" + "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" } } } @@ -28385,433 +28124,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "items": [ - { - "rule_id": "9spXEVoMeZWujjz25yrgTe", - "rule_name": "Production console errors", - "description": "Only ingest TypeError/ReferenceError from production, excluding Safari.", - "filters": [ - [ - { - "key": "error.env", - "oper": "IN", - "vals": [ - "production" - ] - }, - { - "key": "error.error_type", - "oper": "IN", - "vals": [ - "TypeError", - "ReferenceError" - ] - } - ], - [ - { - "key": "error.browser_name", - "oper": "NOTIN", - "vals": [ - "Safari" - ] - } - ] - ], - "status": "enabled", - "created_at": 1786000000000, - "updated_at": 1786003600000 - } - ] - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RumErrorIngestionListRequest" - }, - "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o" - } - } - } - } - } - }, - "/rum/error-ingestion/rules/create": { - "post": { - "operationId": "rum-error-ingestion-rules-create", - "summary": "创建错误采集规则", - "description": "创建一条新的错误采集规则,用于过滤要存储的错误。", - "tags": [ - "RUM/错误采集规则" - ], - "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 创建、更新、启用、禁用、删除都会先把应用当前的全部规则快照进历史记录,因此 `history/list` 会反映每一次变更。\n- `filters` 中的每个条件 key 必须是受支持的 `error.*` 字段或 `context.*` 路径,不支持的 key 会返回 `InvalidParameter`。\n- 新建规则的初始状态为 `enabled`;如需创建后即处于停用状态,需再调用一次 `disable`。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", - "href": "/zh/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-create", - "metadata": { - "sidebarTitle": "创建错误采集规则" - } - }, - "responses": { - "200": { - "description": "成功", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/RumErrorIngestionCreateResponse" - } - } - } - ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "rule_id": "9spXEVoMeZWujjz25yrgTe", - "rule_name": "Production console errors" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RumErrorIngestionCreateRequest" - }, - "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "rule_name": "Production console errors", - "description": "Only ingest TypeError/ReferenceError from production, excluding Safari.", - "filters": [ - [ - { - "key": "error.env", - "oper": "IN", - "vals": [ - "production" - ] - }, - { - "key": "error.error_type", - "oper": "IN", - "vals": [ - "TypeError", - "ReferenceError" - ] - } - ], - [ - { - "key": "error.browser_name", - "oper": "NOTIN", - "vals": [ - "Safari" - ] - } - ] - ] - } - } - } - } - } - }, - "/rum/error-ingestion/rules/update": { - "post": { - "operationId": "rum-error-ingestion-rules-update", - "summary": "更新错误采集规则", - "description": "更新错误采集规则的名称、描述或过滤条件。", - "tags": [ - "RUM/错误采集规则" - ], - "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 仅更新请求中出现的字段,未传入的字段保持原值不变。\n- 不传任何可更新字段时视为空操作,仍会返回成功。\n- 若 `rule_id` 在该 `application_id` 下不存在,返回 `ResourceNotFound`。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", - "href": "/zh/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-update", - "metadata": { - "sidebarTitle": "更新错误采集规则" - } - }, - "responses": { - "200": { - "description": "成功", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" - } - } - } - ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RumErrorIngestionUpdateRequest" - }, - "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "rule_id": "9spXEVoMeZWujjz25yrgTe", - "description": "Now also excludes staging traffic." - } - } - } - } - } - }, - "/rum/error-ingestion/rules/delete": { - "post": { - "operationId": "rum-error-ingestion-rules-delete", - "summary": "删除错误采集规则", - "description": "从 RUM 应用中删除一条错误采集规则。", - "tags": [ - "RUM/错误采集规则" - ], - "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 删除后规则会立即从 `list` 结果中消失;但用于过滤判定的启用规则集有最多 5 秒缓存,因此删除后数秒内上报的错误仍可能被该规则匹配。\n- 若 `rule_id` 在该 `application_id` 下不存在,返回 `ResourceNotFound`。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", - "href": "/zh/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-delete", - "metadata": { - "sidebarTitle": "删除错误采集规则" - } - }, - "responses": { - "200": { - "description": "成功", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" - } - } - } - ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RumErrorIngestionRuleIDRequest" - }, - "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "rule_id": "9spXEVoMeZWujjz25yrgTe" - } - } - } - } - } - }, - "/rum/error-ingestion/rules/enable": { - "post": { - "operationId": "rum-error-ingestion-rules-enable", - "summary": "启用错误采集规则", - "description": "重新启用一条已被禁用的错误采集规则。", - "tags": [ - "RUM/错误采集规则" - ], - "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 若 `rule_id` 在该 `application_id` 下不存在,返回 `ResourceNotFound`。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", - "href": "/zh/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-enable", - "metadata": { - "sidebarTitle": "启用错误采集规则" - } - }, - "responses": { - "200": { - "description": "成功", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" - } - } - } - ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RumErrorIngestionRuleIDRequest" - }, - "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "rule_id": "9spXEVoMeZWujjz25yrgTe" - } - } - } - } - } - }, - "/rum/error-ingestion/rules/disable": { - "post": { - "operationId": "rum-error-ingestion-rules-disable", - "summary": "禁用错误采集规则", - "description": "禁用一条错误采集规则但不删除它。", - "tags": [ - "RUM/错误采集规则" - ], - "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 禁用的规则会保留并仍出现在 `list` 结果中,但不再参与错误匹配。\n- 若 `rule_id` 在该 `application_id` 下不存在,返回 `ResourceNotFound`。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", - "href": "/zh/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-disable", - "metadata": { - "sidebarTitle": "禁用错误采集规则" - } - }, - "responses": { - "200": { - "description": "成功", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" - } - } - } - ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": {} } } } @@ -32092,19 +31405,19 @@ } }, "ServiceUnavailable": { - "description": "当前部署未开启或无法访问 ServiceMap 子系统。反馈问题时请附带 request_id。", + "description": "服务暂时不可用。反馈问题时请附带 request_id。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { - "serviceMapDisabled": { + "serviceUnavailable": { "value": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "error": { "code": "ServiceUnavailable", - "message": "servicemap store is not initialized" + "message": "service temporarily unavailable" } } } @@ -50630,14 +49943,6 @@ "type": "integer", "format": "int64", "description": "最近一次路由投影写入时间,Unix 秒。视为\"最近一次被观测到\",而非实时在线指标。" - }, - "host_id": { - "type": "string", - "description": "上报该目标的 host agent ID。目标未关联主机时不返回。" - }, - "servicemap": { - "$ref": "#/components/schemas/TargetInventoryServiceMapCapability", - "description": "目标所在主机的服务拓扑(ServiceMap)采集能力与最新状态。上报 agent 不具备 ServiceMap 能力时不返回。" } } }, @@ -50652,10 +49957,6 @@ "type": "string", "description": "下一页的不透明游标。缺失 / 为空表示已到末页。", "x-flashduty-preserve-absence": true - }, - "servicemap_coverage": { - "$ref": "#/components/schemas/TargetInventoryServiceMapCoverage", - "description": "本页 ServiceMap 状态拉取覆盖情况。本页没有任何条目携带 ServiceMap 数据时不返回。" } } }, @@ -58083,1591 +57384,6 @@ }, "title": "i_wi_deleted" }, - "ServiceMapAnchor": { - "type": "object", - "description": "标识本次查询锚定的主机(以及可选的具体进程/实体)。", - "required": [ - "host_id" - ], - "properties": { - "host_id": { - "type": "string", - "description": "稳定的服务拓扑主机标识符,例如 `host_0123...`。该主机必须已被服务拓扑感知。", - "pattern": "^host_[a-z0-9_-]+$", - "maxLength": 128 - }, - "entity_id": { - "type": "string", - "description": "可选,主机内具体进程/实体的 ID,用于锚定到该实体。省略则锚定到整台主机。" - } - } - }, - "ServiceMapTopologyRequest": { - "type": "object", - "description": "出向拓扑遍历的查询参数。", - "required": [ - "anchor" - ], - "properties": { - "anchor": { - "$ref": "#/components/schemas/ServiceMapAnchor", - "description": "遍历的起始主机(及可选的实体)。" - }, - "network_scope_id": { - "type": "string", - "description": "可选的一致性校验:如果设置,必须与 `anchor.host_id` 已关联的网络域一致,否则返回 `InvalidParameter`。" - }, - "at": { - "type": "string", - "enum": [ - "now" - ], - "description": "查询的时间选择器。当前仅支持 `now`;省略该字段效果相同。" - }, - "direction": { - "type": "string", - "enum": [ - "outbound" - ], - "description": "遍历方向。当前仅支持 `outbound`;省略该字段效果相同。" - }, - "depth": { - "type": "integer", - "description": "从锚点开始的最大遍历深度。默认 1,最大 3。", - "default": 1, - "maximum": 3 - }, - "max_nodes": { - "type": "integer", - "description": "返回节点数量的上限,超出则截断。默认 100,最大 500。", - "default": 100, - "maximum": 500 - }, - "max_edges": { - "type": "integer", - "description": "遍历边数量的上限,超出则截断。默认 200,最大 1000。", - "default": 200, - "maximum": 1000 - }, - "include_metrics": { - "type": "boolean", - "description": "是否在响应中包含每条边的原始 `metrics` 数据。默认 `false`。", - "default": false - }, - "unresolved_mode": { - "type": "string", - "enum": [ - "summary", - "full" - ], - "description": "未解析边的投影方式。`full`(默认)会将其同时纳入 `edges` 和 `unresolved_endpoints`;`summary` 会从 `edges` 中省略,仅在 `unresolved_endpoints` 中返回有界样本。", - "default": "full" - } - } - }, - "ServiceMapFreshness": { - "type": "object", - "description": "描述底层拓扑数据的新鲜程度。", - "required": [ - "status", - "newest_received_at_ms", - "oldest_received_at_ms", - "max_age_ms" - ], - "properties": { - "status": { - "type": "string", - "enum": [ - "fresh", - "stale", - "unknown" - ], - "description": "新鲜度分类。`fresh` = 最近一次快照在 2× 上报间隔内收到;`stale` = 超过 2× 上报间隔未收到新快照;`unknown` = 无快照数据,无法判定。" - }, - "newest_received_at_ms": { - "type": "integer", - "format": "int64", - "description": "覆盖主机中最近一次收到拓扑数据的 Unix 时间戳(毫秒)。" - }, - "oldest_received_at_ms": { - "type": "integer", - "format": "int64", - "description": "覆盖主机中最早一次收到拓扑数据的 Unix 时间戳(毫秒)。" - }, - "max_age_ms": { - "type": "integer", - "format": "int64", - "description": "覆盖范围内最旧拓扑数据相对当前时间的年龄(毫秒)。" - } - } - }, - "ServiceMapTopologyCoverage": { - "type": "object", - "description": "本次查询所加载的全部主机拓扑数据的整体覆盖与增强状态。", - "required": [ - "direction", - "hosts_loaded", - "degraded_hosts", - "truncated_hosts", - "network_inventory_status", - "kubernetes_enrichment_status", - "listener_address_family_status" - ], - "properties": { - "direction": { - "type": "string", - "enum": [ - "outbound" - ], - "description": "始终为 `outbound`;服务拓扑当前仅建模出向关系。" - }, - "hosts_loaded": { - "type": "integer", - "format": "int64", - "description": "为回答本次查询所加载的不同主机拓扑数量。" - }, - "degraded_hosts": { - "type": "integer", - "format": "int64", - "description": "已加载的主机拓扑中,在采集时处于降级状态的数量。" - }, - "truncated_hosts": { - "type": "integer", - "format": "int64", - "description": "已加载的主机拓扑中,在采集时被截断的数量。" - }, - "capture_modes": { - "type": "array", - "description": "已加载主机中出现的不同采集模式(如 `ebpf`)。", - "items": { - "type": "string" - } - }, - "network_inventory_status": { - "type": "string", - "enum": [ - "unknown", - "complete", - "partial", - "unavailable" - ], - "description": "已加载主机的网络清单增强覆盖聚合状态(取所有主机中最差的一档)。\n\n| 值 | 含义 |\n|---|---|\n| `complete` | 所有主机请求的网络命名空间全部扫描成功且无错误。 |\n| `partial` | 至少一台主机部分命名空间未扫描成功,或扫描存在错误。 |\n| `unavailable` | 至少一台主机的命名空间全部未扫描成功。 |\n| `unknown` | 未加载任何主机,或某主机上报了无法识别的状态。 |" - }, - "kubernetes_enrichment_status": { - "type": "string", - "enum": [ - "unknown", - "complete", - "partial", - "unavailable" - ], - "description": "已加载主机的 Kubernetes 增强覆盖聚合状态(取所有主机中最差的一档)。\n\n| 值 | 含义 |\n|---|---|\n| `complete` | 所有主机的实体均有完整的 Pod 绑定元数据。 |\n| `partial` | 至少一台主机存在绑定但部分 Pod 元数据缺失,或有绑定被丢弃。 |\n| `unavailable` | 至少一台主机没有任何 Pod 绑定。 |\n| `unknown` | 未加载任何主机,或某主机上报了无法识别的状态。 |" - }, - "listener_address_family_status": { - "type": "string", - "enum": [ - "unknown", - "complete", - "partial", - "unavailable" - ], - "description": "已加载主机的监听地址族(IPv4/IPv6)解析覆盖聚合状态(取所有主机中最差的一档)。\n\n| 值 | 含义 |\n|---|---|\n| `complete` | 所有主机的 IPv6 通配监听器,其 IPv6-only 属性均已确认。 |\n| `partial` | 至少一台主机只有部分 IPv6 通配监听器的 IPv6-only 属性已确认。 |\n| `unavailable` | 至少一台主机的 IPv6 通配监听器 IPv6-only 属性全部未知。 |\n| `unknown` | 未加载任何主机,或某主机上报了无法识别的状态。 |" - }, - "ipv6_wildcard_listener_count": { - "type": "integer", - "format": "int64", - "description": "观测到的 IPv6 通配(未指定地址)监听数量。" - }, - "ipv6_only_known_listener_count": { - "type": "integer", - "format": "int64", - "description": "IPV6_V6ONLY 设置已知的 IPv6 通配监听数量。" - }, - "ipv6_only_unknown_listener_count": { - "type": "integer", - "format": "int64", - "description": "IPV6_V6ONLY 设置无法确定的 IPv6 通配监听数量。" - }, - "reasons": { - "type": "array", - "description": "解释已加载主机中降级或截断状态的机器可读原因码。", - "items": { - "type": "string" - } - } - } - }, - "ServiceMapEndpoint": { - "type": "object", - "description": "一个网络传输端点。", - "required": [ - "ip", - "port", - "protocol" - ], - "properties": { - "ip": { - "type": "string", - "description": "目标 IP 地址。" - }, - "port": { - "type": "integer", - "description": "目标端口。" - }, - "protocol": { - "type": "string", - "enum": [ - "tcp", - "udp" - ], - "description": "传输协议,`tcp` 或 `udp`。" - } - } - }, - "ServiceMapResolutionCandidate": { - "type": "object", - "description": "某条边目的端点可能解析到的一个候选节点。", - "required": [ - "host_id", - "entity_id", - "netns_id", - "listener_id", - "listener_ip", - "effective_ip", - "protocol", - "port", - "match_kind", - "confidence", - "graph_sequence", - "observed_at_ms" - ], - "properties": { - "host_id": { - "type": "string", - "description": "候选监听所在主机 ID。" - }, - "entity_id": { - "type": "string", - "description": "候选监听对应的实体/进程 ID。" - }, - "netns_id": { - "type": "string", - "description": "候选监听所在的网络命名空间 ID。" - }, - "listener_id": { - "type": "string", - "description": "匹配到的监听标识符。" - }, - "listener_ip": { - "type": "string", - "description": "监听绑定的 IP 地址(可能为通配地址)。" - }, - "effective_ip": { - "type": "string", - "description": "本次实际用于匹配该候选的目标 IP。" - }, - "protocol": { - "type": "string", - "enum": [ - "tcp", - "udp" - ], - "description": "传输协议,`tcp` 或 `udp`。" - }, - "port": { - "type": "integer", - "description": "目标端口。" - }, - "match_kind": { - "type": "string", - "description": "监听与目的端点的匹配方式,例如 `exact`、`wildcard`、`wildcard_dual_stack`、`wildcard_address_family_unknown`。" - }, - "confidence": { - "type": "number", - "description": "匹配置信度,范围 `[0, 1]`;当返回多个候选时上限为 0.6。" - }, - "node_kind": { - "type": "string", - "description": "候选所属节点的类型(如已知)。" - }, - "node_display_name": { - "type": "string", - "description": "候选所属节点的展示名称(如已知)。" - }, - "graph_sequence": { - "type": "integer", - "format": "uint64", - "description": "观测到该候选时所在拓扑生成的序列号。" - }, - "observed_at_ms": { - "type": "integer", - "format": "int64", - "description": "该候选所在拓扑生成被 Agent 观测到的 Unix 时间戳(毫秒)。" - } - } - }, - "ServiceMapEndpointResolution": { - "type": "object", - "description": "将某条边的目的端点解析为一个或多个候选节点的结果。", - "required": [ - "status", - "endpoint", - "candidates" - ], - "properties": { - "status": { - "type": "string", - "enum": [ - "resolved", - "ambiguous", - "unresolved" - ], - "description": "解析结果。`resolved` 表示唯一且置信的候选;`ambiguous` 表示存在多个或低置信候选;`unresolved` 表示未找到候选。" - }, - "reason": { - "type": "string", - "description": "当 `status` 非 `resolved` 时的机器可读原因码,例如 `no_current_listener`、`multiple_current_listeners`、`query_budget_exceeded`。" - }, - "endpoint": { - "$ref": "#/components/schemas/ServiceMapEndpoint", - "description": "被解析的目的端点。" - }, - "candidates": { - "type": "array", - "description": "为该端点找到的候选节点,按置信度排序。", - "items": { - "$ref": "#/components/schemas/ServiceMapResolutionCandidate" - } - }, - "candidates_truncated": { - "type": "boolean", - "description": "若候选列表因内部查询预算被截断则为 true。" - } - } - }, - "ServiceMapNode": { - "type": "object", - "description": "在某台主机上发现的进程、容器或工作负载。", - "required": [ - "host_id", - "id", - "kind", - "display_name" - ], - "properties": { - "host_id": { - "type": "string", - "description": "观测到该节点的主机。" - }, - "id": { - "type": "string", - "description": "节点的实体 ID,在其主机范围内唯一。" - }, - "kind": { - "type": "string", - "description": "节点类型,例如 `process`、`container`。" - }, - "display_name": { - "type": "string", - "description": "人类可读的展示名称。" - }, - "systemd_unit": { - "type": "string", - "description": "当节点为 systemd 管理的进程时的 unit 名称。" - }, - "executable_name": { - "type": "string", - "description": "可执行文件名称。" - }, - "container_name": { - "type": "string", - "description": "当节点运行在容器中时的容器名称。" - }, - "image_repository": { - "type": "string", - "description": "容器镜像仓库。" - }, - "image_version": { - "type": "string", - "description": "容器镜像标签/版本。" - }, - "namespace": { - "type": "string", - "description": "Kubernetes 命名空间(如已知)。" - }, - "workload_name": { - "type": "string", - "description": "Kubernetes 工作负载名称(如已知)。" - }, - "instance_count": { - "type": "integer", - "description": "当节点代表一个工作负载副本集时,折叠进该节点的实例数量。" - }, - "identity": { - "description": "与节点类型相关的不透明身份数据,结构取决于 `kind`。" - }, - "sample_instances": { - "description": "折叠进该节点的底层实例样本(如适用),结构不透明。" - }, - "first_seen": { - "type": "string", - "format": "date-time", - "description": "首次观测到该节点的时间。" - }, - "last_seen": { - "type": "string", - "format": "date-time", - "description": "最近一次观测到该节点的时间。" - } - } - }, - "ServiceMapEdge": { - "type": "object", - "description": "从源节点到目的端点的一条已观测出向网络关系。", - "required": [ - "host_id", - "id", - "source_entity_id", - "source_netns_id", - "destination", - "evidence", - "depth", - "endpoint_resolution" - ], - "properties": { - "host_id": { - "type": "string", - "description": "该边源节点所在的主机。" - }, - "id": { - "type": "string", - "description": "边 ID,在其主机范围内唯一。" - }, - "source_entity_id": { - "type": "string", - "description": "源节点的实体 ID。" - }, - "source_netns_id": { - "type": "string", - "description": "发起该连接的网络命名空间 ID。" - }, - "destination": { - "$ref": "#/components/schemas/ServiceMapEndpoint", - "description": "该连接的目的端点。" - }, - "evidence": { - "type": "string", - "description": "该边的观测方式,例如 `connect`。" - }, - "first_seen": { - "type": "string", - "format": "date-time", - "description": "首次观测到该边的时间。" - }, - "last_seen": { - "type": "string", - "format": "date-time", - "description": "最近一次观测到该边的时间。" - }, - "metrics": { - "description": "仅当请求 `include_metrics=true` 时才会出现的、每条边的不透明指标数据。" - }, - "depth": { - "type": "integer", - "description": "发现该边时相对锚点的遍历深度。" - }, - "endpoint_resolution": { - "$ref": "#/components/schemas/ServiceMapEndpointResolution", - "description": "目的端点到候选目标节点的解析结果。" - } - } - }, - "ServiceMapUnresolvedEndpoint": { - "type": "object", - "description": "目的端点未能被置信解析到某个节点的出向边。", - "required": [ - "host_id", - "edge_id", - "source_entity_id", - "source_netns_id", - "destination", - "reason" - ], - "properties": { - "host_id": { - "type": "string", - "description": "该边源节点所在的主机。" - }, - "edge_id": { - "type": "string", - "description": "边 ID,在其主机范围内唯一。" - }, - "source_entity_id": { - "type": "string", - "description": "源节点的实体 ID。" - }, - "source_netns_id": { - "type": "string", - "description": "发起该连接的网络命名空间 ID。" - }, - "destination": { - "$ref": "#/components/schemas/ServiceMapEndpoint", - "description": "该连接的目的端点。" - }, - "reason": { - "type": "string", - "description": "该端点未能解析的机器可读原因。" - } - } - }, - "ServiceMapResolutionCounts": { - "type": "object", - "description": "按解析结果分类的边数量统计。", - "required": [ - "resolved", - "ambiguous", - "unresolved" - ], - "properties": { - "resolved": { - "type": "integer", - "description": "解析到唯一置信候选的边数量。" - }, - "ambiguous": { - "type": "integer", - "description": "解析到多个或低置信候选的边数量。" - }, - "unresolved": { - "type": "integer", - "description": "未能解析出候选的边数量。" - } - } - }, - "ServiceMapUnresolvedReasonCount": { - "type": "object", - "description": "共享同一原因的未解析边数量统计。", - "required": [ - "reason", - "count" - ], - "properties": { - "reason": { - "type": "string", - "description": "机器可读的未解析原因码。" - }, - "count": { - "type": "integer", - "description": "该原因对应的未解析边数量。" - } - } - }, - "ServiceMapUnresolvedProjection": { - "type": "object", - "description": "描述未解析边如何按 `unresolved_mode` 投影进响应中的汇总信息。", - "required": [ - "mode", - "total", - "returned", - "omitted", - "by_reason" - ], - "properties": { - "mode": { - "type": "string", - "enum": [ - "summary", - "full" - ], - "description": "本次应用的 `unresolved_mode`。`full` = 未解析的目的端完整列入 `unresolved_endpoints`,且对应的边保留在 `edges` 中(默认);`summary` = 未解析的边不进入 `edges`,`unresolved_endpoints` 仅保留最多 20 条样例,配合 `by_reason` 计数概览。" - }, - "total": { - "type": "integer", - "description": "找到的未解析边总数,不论实际返回了多少。" - }, - "returned": { - "type": "integer", - "description": "已包含在 `unresolved_endpoints` 中的未解析边数量。" - }, - "omitted": { - "type": "integer", - "description": "已找到但未返回的未解析边数量(`total - returned`)。" - }, - "by_reason": { - "type": "array", - "description": "按原因码对 `total` 未解析边数量的细分。", - "items": { - "$ref": "#/components/schemas/ServiceMapUnresolvedReasonCount" - } - } - } - }, - "ServiceMapTopologyResponse": { - "type": "object", - "description": "以锚点主机为中心发现的出向依赖拓扑图。", - "required": [ - "network_scope_id", - "anchor_host_id", - "observed_at_ms", - "freshness", - "coverage", - "truncated", - "nodes", - "edges", - "unresolved_endpoints", - "resolution_counts", - "unresolved_projection" - ], - "properties": { - "network_scope_id": { - "type": "string", - "description": "本次拓扑解析所属的网络域。" - }, - "anchor_host_id": { - "type": "string", - "description": "回显请求中的锚点主机 ID。" - }, - "anchor_entity_id": { - "type": "string", - "description": "回显请求中的锚点实体 ID(如提供)。" - }, - "observed_at_ms": { - "type": "integer", - "format": "int64", - "description": "底层数据被 Agent 观测到的 Unix 时间戳(毫秒),取已加载主机中的最新值。" - }, - "freshness": { - "$ref": "#/components/schemas/ServiceMapFreshness", - "description": "拓扑数据的新鲜程度。" - }, - "coverage": { - "$ref": "#/components/schemas/ServiceMapTopologyCoverage", - "description": "已加载主机的整体覆盖与增强状态。" - }, - "truncated": { - "type": "boolean", - "description": "若因任一上限(`max_nodes`、`max_edges` 或内部查询预算)导致遍历被截断则为 true。" - }, - "truncation_reasons": { - "type": "array", - "description": "当 `truncated=true` 时,遍历被截断的机器可读原因。", - "items": { - "type": "string" - } - }, - "nodes": { - "type": "array", - "description": "遍历中发现的节点。", - "items": { - "$ref": "#/components/schemas/ServiceMapNode" - } - }, - "edges": { - "type": "array", - "description": "遍历中发现的边。当 `unresolved_mode=summary` 时不包含未解析边。", - "items": { - "$ref": "#/components/schemas/ServiceMapEdge" - } - }, - "unresolved_endpoints": { - "type": "array", - "description": "目的端点未能解析的边的样本或全集,取决于 `unresolved_projection`。", - "items": { - "$ref": "#/components/schemas/ServiceMapUnresolvedEndpoint" - } - }, - "resolution_counts": { - "$ref": "#/components/schemas/ServiceMapResolutionCounts", - "description": "按解析结果分类的边数量统计。" - }, - "unresolved_projection": { - "$ref": "#/components/schemas/ServiceMapUnresolvedProjection", - "description": "未解析边如何被投影进本次响应。" - } - } - }, - "ServiceMapSummaryRequest": { - "type": "object", - "description": "有界的、面向 AI 场景的依赖摘要查询参数。", - "required": [ - "anchor" - ], - "properties": { - "anchor": { - "$ref": "#/components/schemas/ServiceMapAnchor", - "description": "要生成摘要的主机(及可选的实体)。" - }, - "network_scope_id": { - "type": "string", - "description": "可选的一致性校验:如果设置,必须与 `anchor.host_id` 已关联的网络域一致,否则返回 `InvalidParameter`。" - } - } - }, - "ServiceMapSummaryNeighbor": { - "type": "object", - "description": "折叠进摘要中的一条出向关系,结构为便于用于提示词的紧凑形式。", - "required": [ - "edge_id", - "source_entity_id", - "resolution_status" - ], - "properties": { - "edge_id": { - "type": "string", - "description": "边 ID。" - }, - "source_entity_id": { - "type": "string", - "description": "源节点的实体 ID。" - }, - "source_display_name": { - "type": "string", - "description": "源节点的展示名称(如已知)。" - }, - "resolution_status": { - "type": "string", - "enum": [ - "resolved", - "ambiguous", - "unresolved" - ], - "description": "该关系目的端的解析结果。`resolved` = 唯一解析到某台主机的某个监听实体,关系可信;`ambiguous` = 存在多个候选(或监听地址族未知),关系仅是待核实的线索;`unresolved` = 未找到任何候选,目的端身份未知。" - }, - "target_host_id": { - "type": "string", - "description": "当 `resolution_status=resolved` 且唯一时,目标所在主机 ID。" - }, - "target_entity_id": { - "type": "string", - "description": "当 `resolution_status=resolved` 且唯一时,目标的实体 ID。" - }, - "target_display_name": { - "type": "string", - "description": "已解析目标的展示名称(如已知)。" - }, - "destination_protocol": { - "type": "string", - "enum": [ - "tcp", - "udp" - ], - "description": "目的端的传输协议。`tcp` = TCP 连接;`udp` = UDP 会话。当前采集端仅上报 `tcp`,`udp` 为预留值。" - }, - "destination_ip": { - "type": "string", - "description": "目的 IP 地址。" - }, - "destination_port": { - "type": "integer", - "description": "目的端口。" - }, - "last_seen": { - "type": "string", - "format": "date-time", - "description": "最近一次观测到该关系的时间。" - }, - "active_connections": { - "type": [ - "integer", - "null" - ], - "format": "int64", - "description": "该关系的活跃连接数(若底层 Agent 上报了该数据)。" - } - } - }, - "ServiceMapSummaryResponse": { - "type": "object", - "description": "某台主机出向服务依赖的有界、面向 AI 场景的摘要。", - "required": [ - "network_scope_id", - "anchor_host_id", - "status", - "authoritative", - "graph_role", - "latest_collection_authoritative", - "observed_at_ms", - "received_at_ms", - "freshness", - "coverage", - "truncated", - "resolution_counts", - "neighbors", - "context_ref_detail" - ], - "properties": { - "network_scope_id": { - "type": "string", - "description": "本次摘要解析所属的网络域。" - }, - "anchor_host_id": { - "type": "string", - "description": "回显请求中的锚点主机 ID。" - }, - "anchor_entity_id": { - "type": "string", - "description": "回显请求中的锚点实体 ID(如提供)。" - }, - "status": { - "type": "string", - "enum": [ - "active", - "degraded", - "stale", - "initializing", - "disabled", - "unsupported", - "no_data" - ], - "description": "锚点主机的服务拓扑采集状态。\n\n| 值 | 含义 |\n|---|---|\n| `active` | 采集正常:有新鲜快照且无降级。 |\n| `degraded` | 采集在进行但质量受损:健康上报晚于快照、快照被截断/降级,或采集报错。 |\n| `stale` | 有快照但已过期(超过 2× 上报间隔未更新)。 |\n| `initializing` | Agent 已上报采集能力,但首个快照尚未就绪。 |\n| `disabled` | 该主机的拓扑采集被禁用。 |\n| `unsupported` | Agent 或内核不支持该采集。 |\n| `no_data` | 未收到任何快照或健康数据。 |" - }, - "authoritative": { - "type": "boolean", - "description": "始终为 `true`;摘要仅基于权威拓扑数据构建。" - }, - "graph_role": { - "type": "string", - "enum": [ - "current", - "last_known_good" - ], - "description": "`current` 表示摘要基于实时拓扑;`last_known_good` 表示最新采集不健康,摘要改为基于上一份权威拓扑。" - }, - "latest_collection_authoritative": { - "type": "boolean", - "description": "当 `graph_role=last_known_good` 时为 false,即最近一次采集并非权威数据。" - }, - "latest_health_at_ms": { - "type": "integer", - "format": "int64", - "description": "最近一次非权威健康信号的 Unix 时间戳(毫秒),仅当其晚于当前拓扑时出现。" - }, - "observed_at_ms": { - "type": "integer", - "format": "int64", - "description": "底层数据被 Agent 观测到的 Unix 时间戳(毫秒)。" - }, - "received_at_ms": { - "type": "integer", - "format": "int64", - "description": "服务端收到当前拓扑生成数据的 Unix 时间戳(毫秒)。" - }, - "freshness": { - "$ref": "#/components/schemas/ServiceMapFreshness", - "description": "拓扑数据的新鲜程度。" - }, - "coverage": { - "$ref": "#/components/schemas/ServiceMapTopologyCoverage", - "description": "锚点主机拓扑数据的整体覆盖与增强状态。" - }, - "truncated": { - "type": "boolean", - "description": "若为保持固定大小的摘要而省略了任何相邻关系或覆盖细节,则为 true。" - }, - "truncation_reasons": { - "type": "array", - "description": "当 `truncated=true` 时,摘要被截断的机器可读原因。", - "items": { - "type": "string" - } - }, - "resolution_counts": { - "$ref": "#/components/schemas/ServiceMapResolutionCounts", - "description": "锚点主机出向关系按解析结果分类的数量统计。" - }, - "neighbors": { - "type": "array", - "description": "最多 12 条出向关系,信息量最高的排在前面。", - "items": { - "$ref": "#/components/schemas/ServiceMapSummaryNeighbor" - } - }, - "context_ref_detail": { - "type": "string", - "description": "为大模型提示词预先渲染好的自然语言证据摘要文本,是对上述结构化字段的便捷呈现,结构化字段本身才是权威来源。" - } - } - }, - "ServiceMapStatusRequest": { - "type": "object", - "description": "选择要查询采集状态的主机:可指定明确的主机 ID,或使用有界的主机群抽样。", - "properties": { - "host_id": { - "type": "string", - "description": "要查询的单个主机 ID。可与 `host_ids` 组合以查询多台;与 `fleet=true` 互斥。", - "pattern": "^host_[a-z0-9_-]+$", - "maxLength": 128 - }, - "host_ids": { - "type": "array", - "description": "本次调用要查询的多个主机 ID,与 `host_id` 合计最多 200 个。与 `fleet=true` 互斥。", - "items": { - "type": "string" - } - }, - "fleet": { - "type": "boolean", - "description": "为 `true` 时忽略 `host_id`/`host_ids`,改为对账户内主机抽样,最多返回 `limit` 台候选主机。默认 `false`。", - "default": false - }, - "limit": { - "type": "integer", - "description": "`fleet` 模式下抽样的候选主机数量,其他模式下忽略该字段。默认 100,范围 1~200。", - "default": 100, - "minimum": 1, - "maximum": 200 - } - } - }, - "ServiceMapCapability": { - "type": "object", - "description": "该主机在监控对象清单中自报的服务拓扑能力信息。", - "required": [ - "present", - "enabled", - "snapshot_ready" - ], - "properties": { - "present": { - "type": "boolean", - "description": "该主机是否存在带有服务拓扑能力元数据的清单记录。" - }, - "enabled": { - "type": "boolean", - "description": "该主机是否已启用服务拓扑采集。" - }, - "status": { - "type": "string", - "description": "Agent 自报的能力状态,例如 `running`、`disabled`、`starting`、`failed`、`unsupported`。" - }, - "host_id": { - "type": "string", - "description": "该能力信息所属的主机 ID。" - }, - "capture_mode": { - "type": "string", - "description": "采集模式,例如 `ebpf` 或 `polling`。" - }, - "report_interval_ms": { - "type": "integer", - "format": "int64", - "description": "配置的上报间隔(毫秒)。" - }, - "snapshot_ready": { - "type": "boolean", - "description": "Agent 是否已产出过至少一次完整快照。" - }, - "reason_codes": { - "type": "array", - "description": "解释当前能力状态的机器可读原因码。", - "items": { - "type": "string" - } - } - } - }, - "ServiceMapHostCoverage": { - "type": "object", - "description": "单台主机拓扑数据的覆盖与增强状态。", - "required": [ - "degraded", - "truncated" - ], - "properties": { - "degraded": { - "type": "boolean", - "description": "该主机拓扑在采集时是否处于降级状态。" - }, - "truncated": { - "type": "boolean", - "description": "该主机拓扑在采集时是否被截断。" - }, - "network_inventory_status": { - "type": "string", - "description": "该主机的网络清单增强状态,如 `complete`、`partial`、`unavailable`,由 Agent 自报。" - }, - "kubernetes_enrichment_status": { - "type": "string", - "description": "该主机的 Kubernetes 增强状态,由 Agent 自报。" - }, - "reason_codes": { - "type": "array", - "description": "解释当前覆盖状态的机器可读原因码。", - "items": { - "type": "string" - } - } - } - }, - "ServiceMapStatusItem": { - "type": "object", - "description": "单台主机的服务拓扑采集状态。", - "required": [ - "host_id", - "status", - "authoritative", - "graph_available", - "capability", - "freshness", - "coverage", - "node_count", - "edge_count" - ], - "properties": { - "host_id": { - "type": "string", - "description": "该状态所属的主机 ID。" - }, - "network_scope_id": { - "type": "string", - "description": "该主机解析到的网络域(如已知)。" - }, - "status": { - "type": "string", - "enum": [ - "active", - "degraded", - "stale", - "initializing", - "disabled", - "unsupported", - "no_data" - ], - "description": "总体的服务拓扑采集状态。\n\n| 值 | 含义 |\n|---|---|\n| `active` | 采集正常:有新鲜快照且无降级。 |\n| `degraded` | 采集在进行但质量受损:健康上报晚于快照、快照被截断/降级,或采集报错。 |\n| `stale` | 有快照但已过期(超过 2× 上报间隔未更新)。 |\n| `initializing` | Agent 已上报采集能力,但首个快照尚未就绪。 |\n| `disabled` | 该主机的拓扑采集被禁用。 |\n| `unsupported` | Agent 或内核不支持该采集。 |\n| `no_data` | 未收到任何快照或健康数据。 |" - }, - "authoritative": { - "type": "boolean", - "description": "该主机是否存在权威的当前拓扑。" - }, - "graph_available": { - "type": "boolean", - "description": "当前是否可以获取该主机的拓扑数据。" - }, - "capability": { - "$ref": "#/components/schemas/ServiceMapCapability", - "description": "该主机自报的服务拓扑能力信息。" - }, - "freshness": { - "$ref": "#/components/schemas/ServiceMapFreshness", - "description": "该主机拓扑数据的新鲜程度。" - }, - "coverage": { - "$ref": "#/components/schemas/ServiceMapHostCoverage", - "description": "该主机拓扑数据的覆盖与增强状态。" - }, - "observed_at_ms": { - "type": "integer", - "format": "int64", - "description": "该主机拓扑被 Agent 观测到的 Unix 时间戳(毫秒)。" - }, - "received_at_ms": { - "type": "integer", - "format": "int64", - "description": "服务端收到该主机当前拓扑生成数据的 Unix 时间戳(毫秒)。" - }, - "latest_health_at_ms": { - "type": "integer", - "format": "int64", - "description": "最近一次非权威健康信号的 Unix 时间戳(毫秒),仅当其晚于当前拓扑时出现。" - }, - "report_interval_ms": { - "type": "integer", - "format": "int64", - "description": "配置的上报间隔(毫秒)。" - }, - "node_count": { - "type": "integer", - "description": "该主机当前拓扑中的节点数量。" - }, - "edge_count": { - "type": "integer", - "description": "该主机当前拓扑中的边数量。" - }, - "reason_codes": { - "type": "array", - "description": "解释当前状态的机器可读原因码。", - "items": { - "type": "string" - } - }, - "error_code": { - "type": "string", - "description": "当无法读取该主机状态时设为 `status_unavailable`;此时其余字段回退为基于清单数据推导的默认值。" - } - } - }, - "ServiceMapStatusBatchCoverage": { - "type": "object", - "description": "本次请求中主机覆盖情况的汇总统计。", - "required": [ - "requested", - "succeeded", - "failed", - "truncated", - "states" - ], - "properties": { - "requested": { - "type": "integer", - "description": "请求涉及的主机数量(显式的 `host_id`/`host_ids`,或 fleet 模式下实际扫描的抽样数量)。" - }, - "succeeded": { - "type": "integer", - "description": "状态读取成功的主机数量。" - }, - "failed": { - "type": "integer", - "description": "状态读取失败的主机数量。" - }, - "truncated": { - "type": "boolean", - "description": "`fleet` 模式下若候选主机数超过 `limit` 上限则为 true。" - }, - "states": { - "type": "object", - "description": "按状态值统计的数量;固定包含全部七个 key(`active`、`degraded`、`stale`、`initializing`、`disabled`、`unsupported`、`no_data`),未出现的值填 0。", - "additionalProperties": { - "type": "integer" - } - } - } - }, - "ServiceMapStatusResponse": { - "type": "object", - "description": "所请求主机的服务拓扑采集状态。", - "required": [ - "fleet", - "items", - "coverage", - "partial", - "generated_at_ms" - ], - "properties": { - "fleet": { - "type": "boolean", - "description": "回显本次响应是否来自主机群抽样而非显式主机 ID。" - }, - "items": { - "type": "array", - "description": "各主机的状态,顺序与主机解析顺序一致。", - "items": { - "$ref": "#/components/schemas/ServiceMapStatusItem" - } - }, - "coverage": { - "$ref": "#/components/schemas/ServiceMapStatusBatchCoverage", - "description": "主机覆盖情况的汇总统计。" - }, - "partial": { - "type": "boolean", - "description": "若存在主机读取失败,或主机群抽样被截断,则为 true。" - }, - "generated_at_ms": { - "type": "integer", - "format": "int64", - "description": "生成本次响应的 Unix 时间戳(毫秒)。" - } - } - }, - "ServiceMapFleetBrowseRequest": { - "type": "object", - "description": "浏览已启用服务拓扑能力主机的过滤与分页参数。", - "properties": { - "cursor": { - "type": "string", - "description": "不透明的分页游标。请原样传入上一次响应中的 `next_cursor`;首页请省略此字段。" - }, - "limit": { - "type": "integer", - "description": "本页最多返回的匹配主机数。默认 50,范围 1~100。", - "default": 50, - "minimum": 1, - "maximum": 100 - }, - "scan_limit": { - "type": "integer", - "description": "填充本页时最多检查的候选主机数。默认 1000,范围 `limit`~2000。", - "default": 1000, - "maximum": 2000 - }, - "statuses": { - "type": "array", - "description": "筛选处于以下任一状态的主机,最多 20 个值。", - "items": { - "type": "string", - "enum": [ - "active", - "degraded", - "stale", - "initializing", - "disabled", - "unsupported", - "no_data" - ] - }, - "maxItems": 20 - }, - "agent_versions": { - "type": "array", - "description": "筛选运行以下任一确切 Agent 版本的主机,最多 20 个值。", - "items": { - "type": "string" - }, - "maxItems": 20 - }, - "edge_clusters": { - "type": "array", - "description": "筛选属于以下任一确切边缘集群名称的主机,最多 20 个值。", - "items": { - "type": "string" - }, - "maxItems": 20 - }, - "capture_modes": { - "type": "array", - "description": "筛选使用以下任一采集模式的主机。`unknown` 匹配尚未上报采集模式的主机。", - "items": { - "type": "string", - "enum": [ - "ebpf", - "polling", - "unknown" - ] - }, - "maxItems": 3 - } - } - }, - "ServiceMapFleetHostCapability": { - "type": "object", - "description": "主机群列表中某台主机的服务拓扑能力及当前采集状态,由清单数据与实时状态联合而成。", - "required": [ - "enabled", - "status", - "snapshot_ready", - "authoritative", - "graph_available", - "node_count", - "edge_count" - ], - "properties": { - "enabled": { - "type": "boolean", - "description": "该主机是否已启用服务拓扑采集。" - }, - "status": { - "type": "string", - "enum": [ - "active", - "degraded", - "stale", - "initializing", - "disabled", - "unsupported", - "no_data" - ], - "description": "总体的服务拓扑采集状态。\n\n| 值 | 含义 |\n|---|---|\n| `active` | 采集正常:有新鲜快照且无降级。 |\n| `degraded` | 采集在进行但质量受损:健康上报晚于快照、快照被截断/降级,或采集报错。 |\n| `stale` | 有快照但已过期(超过 2× 上报间隔未更新)。 |\n| `initializing` | Agent 已上报采集能力,但首个快照尚未就绪。 |\n| `disabled` | 该主机的拓扑采集被禁用。 |\n| `unsupported` | Agent 或内核不支持该采集。 |\n| `no_data` | 未收到任何快照或健康数据。 |" - }, - "capability_status": { - "type": "string", - "description": "Agent 自报的能力状态,例如 `running`、`disabled`、`starting`、`failed`、`unsupported`。" - }, - "capture_mode": { - "type": "string", - "description": "采集模式,例如 `ebpf` 或 `polling`。" - }, - "report_interval_ms": { - "type": "integer", - "format": "int64", - "description": "配置的上报间隔(毫秒)。" - }, - "snapshot_ready": { - "type": "boolean", - "description": "Agent 是否已产出过至少一次完整快照。" - }, - "authoritative": { - "type": "boolean", - "description": "该主机是否存在权威的当前拓扑。" - }, - "graph_available": { - "type": "boolean", - "description": "当前是否可以获取该主机的拓扑数据。" - }, - "freshness_status": { - "type": "string", - "enum": [ - "fresh", - "stale", - "unknown" - ], - "description": "该主机拓扑数据的新鲜度分类。`fresh` = 最近一次快照在 2× 上报间隔内收到;`stale` = 超过 2× 上报间隔未收到新快照;`unknown` = 从未收到拓扑快照,无法判定新鲜度。" - }, - "max_age_ms": { - "type": "integer", - "format": "int64", - "description": "该主机拓扑数据相对本次响应生成时间的年龄(毫秒)。" - }, - "observed_at_ms": { - "type": "integer", - "format": "int64", - "description": "该主机拓扑被 Agent 观测到的 Unix 时间戳(毫秒)。" - }, - "received_at_ms": { - "type": "integer", - "format": "int64", - "description": "服务端收到该主机当前拓扑生成数据的 Unix 时间戳(毫秒)。" - }, - "node_count": { - "type": "integer", - "description": "该主机当前拓扑中的节点数量。" - }, - "edge_count": { - "type": "integer", - "description": "该主机当前拓扑中的边数量。" - }, - "reason_codes": { - "type": "array", - "description": "解释当前状态的机器可读原因码。", - "items": { - "type": "string" - } - }, - "error_code": { - "type": "string", - "description": "当无法读取该主机实时状态时设为 `status_unavailable`;此时其余字段回退为基于清单数据推导的默认值。" - } - } - }, - "ServiceMapFleetHost": { - "type": "object", - "description": "主机群浏览过滤条件匹配到的一台主机。", - "required": [ - "host_id", - "agent_version", - "edge_cluster", - "servicemap" - ], - "properties": { - "host_id": { - "type": "string", - "description": "稳定的服务拓扑主机标识符。" - }, - "agent_version": { - "type": "string", - "description": "该主机上报的 Agent 版本。" - }, - "edge_cluster": { - "type": "string", - "description": "该主机所属的边缘集群名称。" - }, - "servicemap": { - "$ref": "#/components/schemas/ServiceMapFleetHostCapability", - "description": "该主机的服务拓扑能力及当前采集状态。" - } - } - }, - "ServiceMapFleetCoverage": { - "type": "object", - "description": "产生本页结果的候选扫描覆盖情况。", - "required": [ - "scanned", - "matched", - "returned", - "failed", - "states" - ], - "properties": { - "scanned": { - "type": "integer", - "description": "本次请求实际检查的去重候选主机数。" - }, - "matched": { - "type": "integer", - "description": "扫描主机中通过全部筛选条件的数量。" - }, - "returned": { - "type": "integer", - "description": "本页实际返回的匹配主机数(`<= limit`)。" - }, - "failed": { - "type": "integer", - "description": "状态读取失败的候选主机数量。" - }, - "states": { - "type": "object", - "description": "按状态值统计的返回项数量;固定包含全部七个状态 key,未出现的值填 0。仅反映本页结果,不代表账户全量分布。", - "additionalProperties": { - "type": "integer" - } - } - } - }, - "ServiceMapFleetBrowseResponse": { - "type": "object", - "description": "匹配主机群浏览过滤条件的一页主机结果。", - "required": [ - "items", - "coverage", - "partial", - "truncated", - "generated_at_ms" - ], - "properties": { - "items": { - "type": "array", - "description": "本页匹配到的主机。", - "items": { - "$ref": "#/components/schemas/ServiceMapFleetHost" - } - }, - "coverage": { - "$ref": "#/components/schemas/ServiceMapFleetCoverage", - "description": "产生本页结果的候选扫描覆盖情况。" - }, - "partial": { - "type": "boolean", - "description": "若本页存在读取失败的主机,或扫描被截断,则为 true。" - }, - "truncated": { - "type": "boolean", - "description": "若在找到 `limit` 个匹配前达到了 `scan_limit`,则为 true;此时 `next_cursor` 仍可能找到更多结果。" - }, - "truncation_reasons": { - "type": "array", - "description": "当 `truncated=true` 时,扫描被截断的机器可读原因。", - "items": { - "type": "string" - } - }, - "next_cursor": { - "type": "string", - "description": "用于获取下一页的不透明游标。若已无更多候选可扫描则不返回该字段。" - }, - "generated_at_ms": { - "type": "integer", - "format": "int64", - "description": "生成本次响应的 Unix 时间戳(毫秒)。" - } - } - }, - "ServiceMapFleetSummaryRequest": { - "type": "object", - "description": "主机群状态分布聚合统计的过滤参数。", - "properties": { - "scan_limit": { - "type": "integer", - "description": "最多扫描的候选主机数。默认 2000,范围 1~5000。", - "default": 2000, - "minimum": 1, - "maximum": 5000 - }, - "agent_versions": { - "type": "array", - "description": "筛选运行以下任一确切 Agent 版本的主机,最多 20 个值。", - "items": { - "type": "string" - }, - "maxItems": 20 - }, - "edge_clusters": { - "type": "array", - "description": "筛选属于以下任一确切边缘集群名称的主机,最多 20 个值。", - "items": { - "type": "string" - }, - "maxItems": 20 - }, - "capture_modes": { - "type": "array", - "description": "筛选使用以下任一采集模式的主机。`unknown` 匹配尚未上报采集模式的主机。", - "items": { - "type": "string", - "enum": [ - "ebpf", - "polling", - "unknown" - ] - }, - "maxItems": 3 - } - } - }, - "ServiceMapFleetSummaryCoverage": { - "type": "object", - "description": "被扫描候选主机的状态分布聚合统计。", - "required": [ - "scanned", - "matched", - "classified", - "failed", - "states" - ], - "properties": { - "scanned": { - "type": "integer", - "description": "实际检查的去重候选主机数。" - }, - "matched": { - "type": "integer", - "description": "扫描主机中通过 Agent 版本/边缘集群/采集模式过滤,且仍存在最新清单记录的数量。" - }, - "classified": { - "type": "integer", - "description": "成功归类到七种状态之一的匹配主机数,等于 `states` 各项之和。" - }, - "failed": { - "type": "integer", - "description": "候选/详情读取发生竞态,或实时状态读取失败的主机数量。" - }, - "states": { - "type": "object", - "description": "按状态值统计的主机数量;固定包含全部七个 key,未出现的值填 0。", - "additionalProperties": { - "type": "integer" - } - } - } - }, - "ServiceMapFleetSummaryResponse": { - "type": "object", - "description": "账户内已启用服务拓扑能力主机的状态分布聚合统计。", - "required": [ - "coverage", - "scan_limit", - "partial", - "truncated", - "generated_at_ms" - ], - "properties": { - "coverage": { - "$ref": "#/components/schemas/ServiceMapFleetSummaryCoverage", - "description": "被扫描候选主机的状态分布聚合统计。" - }, - "scan_limit": { - "type": "integer", - "description": "本次实际应用的归一化扫描预算;请求未指定时回显默认值。" - }, - "partial": { - "type": "boolean", - "description": "若扫描被截断,或存在归类失败的主机,则为 true。" - }, - "truncated": { - "type": "boolean", - "description": "若在扫描完账户内全部候选主机前达到了 `scan_limit`,则为 true。" - }, - "truncation_reasons": { - "type": "array", - "description": "当 `truncated=true` 时,扫描被截断的机器可读原因。", - "items": { - "type": "string" - } - }, - "generated_at_ms": { - "type": "integer", - "format": "int64", - "description": "生成本次响应的 Unix 时间戳(毫秒)。" - } - } - }, "RumErrorIngestionFilterCondition": { "type": "object", "description": "单条过滤条件,匹配错误的某一个字段。", @@ -61652,134 +59368,6 @@ } } }, - "TargetInventoryServiceMapCapability": { - "type": "object", - "description": "目标主机的 ServiceMap 采集能力与实时状态。", - "required": [ - "enabled", - "status", - "snapshot_ready", - "authoritative", - "graph_available", - "node_count", - "edge_count" - ], - "properties": { - "enabled": { - "type": "boolean", - "description": "agent 是否启用了 ServiceMap 采集。" - }, - "status": { - "type": "string", - "enum": [ - "active", - "degraded", - "stale", - "initializing", - "disabled", - "unsupported", - "no_data" - ], - "description": "主机的 ServiceMap 采集状态。\n\n| 值 | 含义 |\n|---|---|\n| `active` | 采集正常:有新鲜快照且无降级。 |\n| `degraded` | 采集在进行但质量受损:健康上报晚于快照、快照被截断/降级,或采集报错。 |\n| `stale` | 有快照但已过期(超过 2× 上报间隔未更新)。 |\n| `initializing` | Agent 已上报采集能力,但首个快照尚未就绪。 |\n| `disabled` | 该主机的拓扑采集被禁用。 |\n| `unsupported` | Agent 或内核不支持该采集。 |\n| `no_data` | 未收到任何快照或健康数据。 |" - }, - "capability_status": { - "type": "string", - "description": "agent 上报的能力状态,例如 `running`、`disabled`、`starting`、`failed`、`unsupported`。agent 未上报时不返回。" - }, - "capture_mode": { - "type": "string", - "description": "采集模式,例如 `ebpf` 或 `polling`。未知时不返回。" - }, - "report_interval_ms": { - "type": "integer", - "format": "int64", - "description": "配置的上报间隔(毫秒)。未知时不返回。" - }, - "snapshot_ready": { - "type": "boolean", - "description": "agent 是否已产出至少一份完整快照。" - }, - "authoritative": { - "type": "boolean", - "description": "当前状态是否来自权威(authoritative)图快照。" - }, - "graph_available": { - "type": "boolean", - "description": "当前是否可以拉取到该主机的实时拓扑图。" - }, - "freshness_status": { - "type": "string", - "enum": [ - "fresh", - "stale", - "unknown" - ], - "description": "主机拓扑图的新鲜度分类。`fresh` = 最新快照在 2× 上报间隔内收到;`stale` = 超过该窗口未收到新快照;`unknown` = 尚未分类。未知时不返回。" - }, - "max_age_ms": { - "type": "integer", - "format": "int64", - "description": "快照被视为过期前可容忍的最大年龄(毫秒)。不适用时不返回。" - }, - "observed_at_ms": { - "type": "integer", - "format": "int64", - "description": "agent 最近一次观测到图生成的时间,Unix 毫秒时间戳。未知时不返回。" - }, - "received_at_ms": { - "type": "integer", - "format": "int64", - "description": "服务端最近一次收到快照的时间,Unix 毫秒时间戳。未知时不返回。" - }, - "node_count": { - "type": "integer", - "description": "该主机当前拓扑图中的节点数。" - }, - "edge_count": { - "type": "integer", - "description": "该主机当前拓扑图中的边数。" - }, - "reason_codes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "解释当前能力状态的机器可读原因码。为空时不返回。" - }, - "error_code": { - "type": "string", - "description": "实时状态读取失败时置为 `status_unavailable`,此时其余字段回退为清单侧的值。否则不返回。" - } - } - }, - "TargetInventoryServiceMapCoverage": { - "type": "object", - "description": "某一页目标的 ServiceMap 状态拉取覆盖情况。", - "required": [ - "requested", - "succeeded", - "failed", - "partial" - ], - "properties": { - "requested": { - "type": "integer", - "description": "本页携带 ServiceMap 数据的条目数。" - }, - "succeeded": { - "type": "integer", - "description": "实时 ServiceMap 状态读取成功的条目数。" - }, - "failed": { - "type": "integer", - "description": "实时 ServiceMap 状态读取失败的条目数(`servicemap.error_code` 已设置)。" - }, - "partial": { - "type": "boolean", - "description": "至少一个条目状态读取失败时为 true。" - } - } - }, "RoleDeleteRequest": { "type": "object", "required": [ diff --git a/roundtrip_gen_test.go b/roundtrip_gen_test.go index 64428ac..979b710 100644 --- a/roundtrip_gen_test.go +++ b/roundtrip_gen_test.go @@ -126,11 +126,6 @@ var exampleDataDecoders = map[string]func(json.RawMessage) error{ "POST /monit/rule/move": func(d json.RawMessage) error { var v RuleNameMessageListResponse; return json.Unmarshal(d, &v) }, "POST /monit/rule/update": func(d json.RawMessage) error { var v AlertRule; return json.Unmarshal(d, &v) }, "POST /monit/rule/update/fields": func(d json.RawMessage) error { var v RuleNameMessageListResponse; return json.Unmarshal(d, &v) }, - "POST /monit/servicemap/fleet": func(d json.RawMessage) error { var v ServiceMapFleetBrowseResponse; return json.Unmarshal(d, &v) }, - "POST /monit/servicemap/fleet/summary": func(d json.RawMessage) error { var v ServiceMapFleetSummaryResponse; return json.Unmarshal(d, &v) }, - "POST /monit/servicemap/status": func(d json.RawMessage) error { var v ServiceMapStatusResponse; return json.Unmarshal(d, &v) }, - "POST /monit/servicemap/summary": func(d json.RawMessage) error { var v ServiceMapSummaryResponse; return json.Unmarshal(d, &v) }, - "POST /monit/servicemap/topology": func(d json.RawMessage) error { var v ServiceMapTopologyResponse; return json.Unmarshal(d, &v) }, "POST /monit/store/ruleset/create": func(d json.RawMessage) error { var v StoreRulesetItem; return json.Unmarshal(d, &v) }, "POST /monit/store/ruleset/info": func(d json.RawMessage) error { var v StoreRulesetItem; return json.Unmarshal(d, &v) }, "POST /monit/store/ruleset/list": func(d json.RawMessage) error { var v StoreRulesetListResponse; return json.Unmarshal(d, &v) }, diff --git a/service_map.go b/service_map.go deleted file mode 100644 index 6f71d08..0000000 --- a/service_map.go +++ /dev/null @@ -1,78 +0,0 @@ -// Code generated by internal/cmd/gen; DO NOT EDIT. - -package flashduty - -import "context" - -// ServiceMapService handles the "Monitors/Service map" API resource. -type ServiceMapService service - -// Browse service map fleet hosts. -// -// Browse the account's hosts with ServiceMap capability and current collection status. -// -// API: POST /monit/servicemap/fleet (monit-servicemap-read-fleet). -func (s *ServiceMapService) Fleet(ctx context.Context, req *ServiceMapFleetBrowseRequest) (*ServiceMapFleetBrowseResponse, *Response, error) { - out := new(ServiceMapFleetBrowseResponse) - resp, err := s.client.do(ctx, "/monit/servicemap/fleet", req, out) - if err != nil { - return nil, resp, err - } - return out, resp, nil -} - -// Get service map fleet summary. -// -// Return an aggregate status distribution across the account's ServiceMap-capable hosts. -// -// API: POST /monit/servicemap/fleet/summary (monit-servicemap-read-fleet-summary). -func (s *ServiceMapService) FleetSummary(ctx context.Context, req *ServiceMapFleetSummaryRequest) (*ServiceMapFleetSummaryResponse, *Response, error) { - out := new(ServiceMapFleetSummaryResponse) - resp, err := s.client.do(ctx, "/monit/servicemap/fleet/summary", req, out) - if err != nil { - return nil, resp, err - } - return out, resp, nil -} - -// Get service map status. -// -// Return ServiceMap collection status for one or more hosts, or a bounded fleet sample. -// -// API: POST /monit/servicemap/status (monit-servicemap-read-status). -func (s *ServiceMapService) Status(ctx context.Context, req *ServiceMapStatusRequest) (*ServiceMapStatusResponse, *Response, error) { - out := new(ServiceMapStatusResponse) - resp, err := s.client.do(ctx, "/monit/servicemap/status", req, out) - if err != nil { - return nil, resp, err - } - return out, resp, nil -} - -// Get service map summary. -// -// Return a bounded, AI-ready summary of a host's outbound service dependencies. -// -// API: POST /monit/servicemap/summary (monit-servicemap-read-summary). -func (s *ServiceMapService) Summary(ctx context.Context, req *ServiceMapSummaryRequest) (*ServiceMapSummaryResponse, *Response, error) { - out := new(ServiceMapSummaryResponse) - resp, err := s.client.do(ctx, "/monit/servicemap/summary", req, out) - if err != nil { - return nil, resp, err - } - return out, resp, nil -} - -// Get service map topology. -// -// Return the outbound dependency graph around a host, discovered by live network observation. -// -// API: POST /monit/servicemap/topology (monit-servicemap-read-topology). -func (s *ServiceMapService) Topology(ctx context.Context, req *ServiceMapTopologyRequest) (*ServiceMapTopologyResponse, *Response, error) { - out := new(ServiceMapTopologyResponse) - resp, err := s.client.do(ctx, "/monit/servicemap/topology", req, out) - if err != nil { - return nil, resp, err - } - return out, resp, nil -} diff --git a/services_gen.go b/services_gen.go index 7535617..79d5116 100644 --- a/services_gen.go +++ b/services_gen.go @@ -19,7 +19,6 @@ type genServices struct { DataSources *DataSourcesService Diagnostics *DiagnosticsService RuleSets *RuleSetsService - ServiceMap *ServiceMapService AlertEnrichment *AlertEnrichmentService Alerts *AlertsService Analytics *AnalyticsService @@ -63,7 +62,6 @@ func (c *Client) initServices() { c.DataSources = (*DataSourcesService)(&c.common) c.Diagnostics = (*DiagnosticsService)(&c.common) c.RuleSets = (*RuleSetsService)(&c.common) - c.ServiceMap = (*ServiceMapService)(&c.common) c.AlertEnrichment = (*AlertEnrichmentService)(&c.common) c.Alerts = (*AlertsService)(&c.common) c.Analytics = (*AnalyticsService)(&c.common)