openapi: 3.1.0 info: title: SAP HANA Cloud REST Alerts Metrics API description: REST API for managing SAP HANA Cloud instances, monitoring alerts, accessing metrics, and retrieving metering data. The API uses the SAP Service Manager framework to provision, configure, start, stop, and delete SAP HANA Cloud database instances within SAP Business Technology Platform subaccounts. Additionally, the alerts and metrics endpoints provide access to triggered alerts, database performance metrics, and consumption metering data for SAP HANA Cloud, SAP HANA database and SAP HANA Cloud, data lake instances. version: 1.0.0 contact: name: SAP SE url: https://www.sap.com email: help@sap.com license: name: SAP Developer License url: https://www.sap.com/about/trust-center/agreements.html termsOfService: https://www.sap.com/about/trust-center/agreements.html x-logo: url: https://www.sap.com/content/dam/application/shared/logos/sap-logo-svg.svg servers: - url: https://api.cf.{region}.hana.ondemand.com description: SAP HANA Cloud API (Cloud Foundry environment) variables: region: default: eu10 description: SAP BTP region identifier. Common values include eu10 (Europe - Frankfurt), us10 (US East - VA), ap10 (Australia - Sydney), jp10 (Japan - Tokyo), and others based on your SAP BTP subaccount provisioning. enum: - eu10 - eu11 - eu20 - eu30 - us10 - us20 - us21 - us30 - ap10 - ap11 - ap12 - ap20 - ap21 - jp10 - jp20 - br10 - ca10 - in30 security: - oauth2: [] tags: - name: Metrics description: Operations for retrieving database performance metrics and resource utilization data for SAP HANA Cloud instances. paths: /metrics/v1/serviceInstances/{serviceInstanceId}/values: get: operationId: getMetricValues summary: Retrieve Metric Values for a Service Instance description: Retrieves database performance and resource utilization metrics for a specific SAP HANA Cloud service instance. Metrics include CPU usage, memory consumption, disk utilization, connection counts, statement execution statistics, and other operational indicators. Data can be queried for specific time ranges and metric types. tags: - Metrics parameters: - $ref: '#/components/parameters/ServiceInstanceId' - name: metricType in: query description: Filter metrics by type. Specify one or more metric types to retrieve specific categories of performance data. schema: type: string enum: - cpu - memory - disk - connections - statements - network - rowstore - columnstore example: cpu - name: fromTimestamp in: query description: Start timestamp for the metrics query window in ISO 8601 format. schema: type: string format: date-time example: '2026-01-15T10:30:00Z' - name: toTimestamp in: query description: End timestamp for the metrics query window in ISO 8601 format. schema: type: string format: date-time example: '2026-01-15T10:30:00Z' - name: granularity in: query description: The aggregation granularity for metric data points. Determines the time interval between data points in the response. schema: type: string enum: - MINUTE - FIVE_MINUTES - HOUR - DAY example: MINUTE responses: '200': description: Successfully retrieved metric values. content: application/json: schema: $ref: '#/components/schemas/MetricValueList' examples: Getmetricvalues200Example: summary: Default getMetricValues 200 response x-microcks-default: true value: metrics: - metricType: example_value unit: example_value dataPoints: {} '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' x-microcks-operation: delay: 0 dispatcher: FALLBACK components: responses: Forbidden: description: The authenticated user does not have sufficient permissions to perform this operation on the requested resource. content: application/json: schema: $ref: '#/components/schemas/Error' TooManyRequests: description: The API rate limit has been exceeded. Retry the request after the duration indicated in the Retry-After response header. content: application/json: schema: $ref: '#/components/schemas/Error' NotFound: description: The requested resource was not found. Verify the instance identifier and ensure it exists in the current subaccount. content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Authentication failed. The OAuth 2.0 access token is missing, expired, or invalid. Obtain a new token using the client credentials flow. content: application/json: schema: $ref: '#/components/schemas/Error' InternalServerError: description: An unexpected error occurred on the server. If the issue persists, contact SAP support with the request correlation ID. content: application/json: schema: $ref: '#/components/schemas/Error' schemas: MetricDataPoint: type: object description: A single metric data point at a specific timestamp. properties: timestamp: type: string format: date-time description: ISO 8601 timestamp for the data point. example: '2026-01-15T10:30:00Z' value: type: number format: double description: The metric value at the given timestamp. example: 42.5 min: type: number format: double description: The minimum value observed during the aggregation interval. example: 42.5 max: type: number format: double description: The maximum value observed during the aggregation interval. example: 42.5 avg: type: number format: double description: The average value observed during the aggregation interval. example: 42.5 MetricSeries: type: object description: A time series of metric data points for a specific metric type on an SAP HANA Cloud service instance. properties: metricType: type: string description: The type of metric (e.g., cpu_usage, memory_used, disk_used, active_connections). example: example_value unit: type: string description: The unit of measurement (e.g., percent, bytes, count). example: example_value dataPoints: type: array description: The time-ordered list of metric data points. items: $ref: '#/components/schemas/MetricDataPoint' example: [] Error: type: object description: Standard error response returned by the SAP HANA Cloud REST API when a request fails. properties: error: type: string description: The error code identifying the type of error. example: example_value description: type: string description: A human-readable description of the error. example: A sample description. statusCode: type: integer description: The HTTP status code associated with the error. example: 10 MetricValueList: type: object description: A collection of metric data points for an SAP HANA Cloud service instance. properties: metrics: type: array description: The list of metric series. items: $ref: '#/components/schemas/MetricSeries' example: [] parameters: ServiceInstanceId: name: serviceInstanceId in: path required: true description: The unique identifier of the SAP HANA Cloud service instance for which to retrieve alerts, metrics, or metering data. schema: type: string format: uuid securitySchemes: oauth2: type: oauth2 description: OAuth 2.0 authentication using SAP Business Technology Platform credentials. Obtain an access token using client credentials flow with the UAA service URL, client ID, and client secret from your SAP HANA Cloud service key. Access tokens expire after approximately 1799 seconds (30 minutes) and must be refreshed. flows: clientCredentials: tokenUrl: https://{subdomain}.authentication.{region}.hana.ondemand.com/oauth/token scopes: {}