- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- Granularity
- MetricHealth
- HistoryPoint
Fetches operational service health telemetry for a specific region.
HTTP request
GET https://foodorderingaiagent.googleapis.com/v1beta/{parent=locations/*}:fetchServiceHealth
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
parent |
Required. Format: locations/{location} |
Query parameters
| Parameters | |
|---|---|
historyGranularity |
Optional. Granularity of historical points. Defaults to ONE_DAY if unset. |
lookbackDuration |
Optional. Lookback window (e.g. 7 days, 30 days). Defaults to 7 days (168h) if unset. A duration in seconds with up to nine fractional digits, ending with ' |
metricNames[] |
Optional. Filter by specific metric names (e.g. "foodai-service-uprate"). If empty, returns all configured health metrics for the location. |
Request body
The request body must be empty.
Response body
Response message for MenuService.FetchServiceHealth.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"location": string,
"isStale": boolean,
"latestIntervalStart": string,
"metrics": [
{
object ( |
| Fields | |
|---|---|
location |
The location requested, e.g. "locations/us". |
isStale |
True if any metric's latest completed sample is older than 3 hours. |
latestIntervalStart |
Timestamp of the latest completed interval included in the calculation. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
metrics[] |
Health metrics evaluated for this location. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
Granularity
Granularity of history points to return.
| Enums | |
|---|---|
GRANULARITY_UNSPECIFIED |
Unspecified granularity. Defaults to ONE_DAY. |
ONE_HOUR |
1-hour interval points. |
ONE_DAY |
1-day interval points. |
MetricHealth
Health summary for a specific metric and indicator.
| JSON representation |
|---|
{
"metricName": string,
"indicatorName": string,
"compliancePercentage": number,
"totalGoodCount": number,
"totalCount": number,
"historyPoints": [
{
object ( |
| Fields | |
|---|---|
metricName |
The metric identifier, e.g. "foodai-service-uprate". |
indicatorName |
The indicator name, e.g. "Availability". |
compliancePercentage |
Aggregate compliance percentage over the lookback window: (totalGoodCount / totalCount) * 100.0. Range: [0.0, 100.0]. |
totalGoodCount |
Total good events across complete intervals in the lookback window. |
totalCount |
Total events across complete intervals in the lookback window. |
historyPoints[] |
Chronological history points over the requested lookback duration. |
HistoryPoint
Unified history point (either daily or hourly based on requested granularity).
| JSON representation |
|---|
{ "intervalStart": string, "compliancePercentage": number, "goodCount": number, "totalCount": number } |
| Fields | |
|---|---|
intervalStart |
Start time of the interval. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
compliancePercentage |
Compliance percentage for this interval: (goodCount / totalCount) * 100.0. Range: [0.0, 100.0]. |
goodCount |
Number of good events in this interval. |
totalCount |
Total number of events in this interval. |