Loading…
Loading…
API endpoints for detailed analysis of aggregated service data from the master discovery table, including traffic, consumers, failures, and alerting.
The Master Discovery Drill-Down API provides a set of endpoints for retrieving detailed, aggregated information about a specific service discovered across the platform. Unlike endpoints that are scoped to a single gateway instance, this API aggregates data for a given service URI from all reporting sources, corresponding to a single row in the s2r_master_discovery table.
This API is used to power detailed views of a service's health and usage. It allows operators to investigate a service's traffic patterns, identify its consumers, analyze recent failures, and manage its associated alert rules from a centralized point.
The controller's main inputs are a master discovery row ID (rowId) and optional parameters to control the scope of data returned. It queries a repository for various data facets—such as traffic timelines, consumer lists, and failure logs—and aggregates them into a comprehensive JSON response.
The API provides three endpoints, each of which begins by fetching a master discovery row by its unique rowId. If the row is not found, the API returns a 404 Not Found error. The serviceUri from this row is then used as the primary identifier for all subsequent data fetching.
A key aspect of the data aggregation logic is its ability to handle services observed by different types of gateways (e.g., F5 and other generic vendors). When fetching data like traffic timelines or failures, the system determines the appropriate gateway type to query against:
f5InstanceId, it is considered an F5-observed service. Queries for generic gateway data will match the serviceUri across all vendors to include any dual-observed traffic.f5InstanceId, it is considered a generic service. Queries are scoped to the specific vendor listed in the row to avoid mixing data from different generic gateway types.The following diagram illustrates the data aggregation flow for the main drill-down endpoint:
sequenceDiagram
participant C as API Consumer
participant A as Admin API
participant R as Data Repository
C->>A: GET /.../rows/{rowId}/drill-down
A->>R: loadRowById(rowId)
R-->>A: Master Discovery Row
A->>R: loadTimelineForServiceUri(serviceUri, from, to, gatewayType)
R-->>A: Timeline Data
A->>R: loadConsumersForRow(rowId)
R-->>A: Consumer List
A->>R: loadAlertRuleForServiceUri(serviceUri)
R-->>A: Alert Rule
A->>R: loadGoodExamplesForServiceUri(serviceUri, 50, source)
R-->>A: Example Payloads
A-->>C: 200 OK (Aggregated Drill-Down Data)Retrieves a comprehensive set of details for a single master discovery row, including service information, traffic KPIs, a historical timeline, a list of consumers, and the associated alert rule.
GET /admin/v1/master-discovery/rows/{rowId}/drill-down
| Name | Type | Required | Description |
|---|---|---|---|
rowId | long | Yes | The unique ID of the master discovery row. |
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
timelineDays | int | 7 | No | The number of past days to include in the traffic timeline. The value is clamped to a minimum of 1 and a maximum of 30. |
source | string | f5 | No | The source for loading good request/response examples. Valid values are f5, generic, or all. If an invalid value is provided, it defaults to f5. |
On success, returns a 200 OK with a JSON object containing the aggregated data.
row: The original master discovery row data.timeline: An array of objects representing hourly traffic metrics.timelineFrom: The start timestamp (UTC) for the timeline data.timelineTo: The end timestamp (UTC) for the timeline data.consumers: An array of objects, each representing a known consumer of the service.consumerCount: The total number of consumers.alertRule: An object containing the configuration of the alert rule for the service, or null if none exists.goodExamples: An array of up to 50 objects, each representing a successful request/response pair.Retrieves a list of recent failures for the service URI associated with a master discovery row, aggregated across all relevant gateway instances.
GET /admin/v1/master-discovery/rows/{rowId}/failures
| Name | Type | Required | Description |
|---|---|---|---|
rowId | long | Yes | The unique ID of the master discovery row. |
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
limit | int | 20 | No | The maximum number of failure records to return. |
On success, returns a 200 OK with a JSON object containing the list of failures.
serviceUri: The service URI for which failures were retrieved.failures: An array of objects, each representing a single failure event.count: The number of failure records returned.partial: A boolean flag. If true, the scan for failures was terminated before completion (e.g., due to a time limit), and the returned list represents only the most recent slice of failures, not the complete set within the search window.NOTE
The partial flag is important for user interfaces. When true, it indicates that the absence of other failures in the response does not mean they did not occur; it only means the scan was incomplete.
Creates or updates an alert rule for the service URI associated with a master discovery row. Alert rules are used to trigger notifications based on failure rates or traffic volume thresholds.
PUT /admin/v1/master-discovery/rows/{rowId}/alert
IMPORTANT
Saving an alert rule requires the master discovery row to be associated with an F5 instance (f5InstanceId must be present). If the row represents a service observed only by a generic gateway, this endpoint will return a 400 Bad Request error.
| Name | Type | Required | Description |
|---|---|---|---|
rowId | long | Yes | The unique ID of the master discovery row. |
A JSON object specifying the alert rule configuration.
| Field | Type | Default | Required | Description |
|---|---|---|---|---|
enabled | boolean | false | No | Set to true to enable the alert rule. |
minCalls1h | integer | 20 | No | The minimum number of calls in one hour required to trigger an alert. |
failurePctThreshold | double | 10.0 | No | The failure percentage over one hour that will trigger an alert (e.g., 10.0 for 10%). |
failureCountThreshold | integer | 5 | No | The absolute number of failures in one hour that will trigger an alert. |
{
"enabled": true,
"minCalls1h": 100,
"failurePctThreshold": 5.0,
"failureCountThreshold": 10
}
On success, returns a 200 OK with a JSON object confirming the operation.
status: A string with the value saved.serviceUri: The service URI for which the alert rule was saved.| Status Code | Error Code | Trigger |
|---|---|---|
404 Not Found | S2R-DISC-0404 | The specified rowId does not exist, or the row does not belong to the caller's tenant. This error can occur on any of the three endpoints. For the PUT endpoint, it can also occur if the f5InstanceId on the row belongs to another tenant. |
400 Bad Request | S2R-DISC-0400 | Occurs on a PUT request to /alert when the master discovery row identified by rowId does not have an associated f5InstanceId. Alert rules can only be saved for services observed by an F5 instance. |