{
  "title": "Database Insights API",
  "ownerDomain": "google.com",
  "kind": "discovery#restDescription",
  "protocol": "rest",
  "ownerName": "Google",
  "fullyEncodeReservedExpansion": true,
  "baseUrl": "https://databaseinsights.googleapis.com/",
  "parameters": {
    "fields": {
      "description": "Selector specifying which fields to include in a partial response.",
      "type": "string",
      "location": "query"
    },
    "access_token": {
      "location": "query",
      "description": "OAuth access token.",
      "type": "string"
    },
    "uploadType": {
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "type": "string",
      "location": "query"
    },
    "upload_protocol": {
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "type": "string",
      "location": "query"
    },
    "prettyPrint": {
      "type": "boolean",
      "description": "Returns response with indentations and line breaks.",
      "location": "query",
      "default": "true"
    },
    "quotaUser": {
      "type": "string",
      "location": "query",
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters."
    },
    "callback": {
      "location": "query",
      "description": "JSONP",
      "type": "string"
    },
    "key": {
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
      "location": "query",
      "type": "string"
    },
    "$.xgafv": {
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "type": "string",
      "location": "query",
      "enum": [
        "1",
        "2"
      ],
      "description": "V1 error format."
    },
    "oauth_token": {
      "type": "string",
      "description": "OAuth 2.0 token for the current user.",
      "location": "query"
    },
    "alt": {
      "type": "string",
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "description": "Data format for response.",
      "location": "query",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "default": "json"
    }
  },
  "mtlsRootUrl": "https://databaseinsights.mtls.googleapis.com/",
  "discoveryVersion": "v1",
  "version_module": true,
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/cloud-platform": {
          "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account."
        }
      }
    }
  },
  "id": "databaseinsights:v1beta",
  "rootUrl": "https://databaseinsights.googleapis.com/",
  "schemas": {
    "FetchSystemMetricsResponse": {
      "id": "FetchSystemMetricsResponse",
      "properties": {
        "promqlResult": {
          "description": "The result of the fetch system metrics.",
          "type": "string"
        }
      },
      "description": "The response of the FetchSystemMetrics RPC.",
      "type": "object"
    },
    "FetchQueryMetricsResponse": {
      "properties": {
        "promqlResult": {
          "description": "The result of the fetch query metrics.",
          "type": "string"
        }
      },
      "id": "FetchQueryMetricsResponse",
      "description": "The response of the FetchQueryMetrics RPC.",
      "type": "object"
    },
    "FetchQueryMetricsRequest": {
      "type": "object",
      "id": "FetchQueryMetricsRequest",
      "description": "The request of the FetchQueryMetrics RPC.",
      "properties": {
        "startTime": {
          "type": "string",
          "description": "Optional. The start_time of the metrics in RFC3339 format."
        },
        "endTime": {
          "description": "Optional. The end_time of the metrics in RFC3339 format.",
          "type": "string"
        },
        "resource": {
          "type": "string",
          "description": "Required. The resource name used for query metrics. It is the project ID in this case."
        },
        "promqlQuery": {
          "type": "string",
          "description": "Required. The promql_query to fetch the query metrics."
        }
      }
    },
    "FetchSystemMetricsRequest": {
      "type": "object",
      "properties": {
        "promqlQuery": {
          "description": "Required. The promql_query to fetch the system metrics.",
          "type": "string"
        },
        "startTime": {
          "type": "string",
          "description": "Optional. The start_time of the metrics in RFC3339 format."
        },
        "endTime": {
          "description": "Optional. The end_time of the metrics in RFC3339 format.",
          "type": "string"
        },
        "resource": {
          "type": "string",
          "description": "Required. The resource name used for system metrics. It is the project ID in this case."
        }
      },
      "id": "FetchSystemMetricsRequest",
      "description": "The request of the FetchSystemMetrics RPC."
    }
  },
  "name": "databaseinsights",
  "description": "Database Insights API is a regional service that provides deep performance diagnostics and monitoring for Google Cloud databases. It exposes tools like Query insights, which helps you detect, diagnose, and prevent query performance problems, and System insights, which provides comprehensive telemetry and monitoring for system-level instance metrics.",
  "canonicalName": "Database Insights",
  "batchPath": "batch",
  "servicePath": "",
  "resources": {
    "projects": {
      "resources": {
        "locations": {
          "resources": {
            "systemMetrics": {
              "methods": {
                "fetch": {
                  "request": {
                    "$ref": "FetchSystemMetricsRequest"
                  },
                  "id": "databaseinsights.projects.locations.systemMetrics.fetch",
                  "description": "FetchSystemMetrics fetches the given system level metrics.",
                  "response": {
                    "$ref": "FetchSystemMetricsResponse"
                  },
                  "parameters": {
                    "parent": {
                      "required": true,
                      "pattern": "^projects/[^/]+/locations/[^/]+$",
                      "location": "path",
                      "description": "Required. The name of the location where we request metrics. Format: `projects/{project}/locations/{location}`",
                      "type": "string"
                    }
                  },
                  "scopes": [
                    "https://www.googleapis.com/auth/cloud-platform"
                  ],
                  "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/systemMetrics:fetch",
                  "path": "v1beta/{+parent}/systemMetrics:fetch",
                  "httpMethod": "POST",
                  "parameterOrder": [
                    "parent"
                  ]
                }
              }
            },
            "queryMetrics": {
              "methods": {
                "fetch": {
                  "parameters": {
                    "parent": {
                      "pattern": "^projects/[^/]+/locations/[^/]+$",
                      "type": "string",
                      "description": "Required. The name of the location where we request metrics. Format: `projects/{project}/locations/{location}`",
                      "location": "path",
                      "required": true
                    }
                  },
                  "parameterOrder": [
                    "parent"
                  ],
                  "request": {
                    "$ref": "FetchQueryMetricsRequest"
                  },
                  "response": {
                    "$ref": "FetchQueryMetricsResponse"
                  },
                  "httpMethod": "POST",
                  "scopes": [
                    "https://www.googleapis.com/auth/cloud-platform"
                  ],
                  "id": "databaseinsights.projects.locations.queryMetrics.fetch",
                  "description": "FetchQueryMetrics fetches the given database query level metrics.",
                  "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/queryMetrics:fetch",
                  "path": "v1beta/{+parent}/queryMetrics:fetch"
                }
              }
            }
          }
        }
      }
    }
  },
  "documentationLink": "https://cloud.google.com/alloydb/docs/query-insights-overview",
  "version": "v1beta",
  "basePath": "",
  "revision": "20261006"
}
