openapi: 3.1.0 info: title: SAP HANA Cloud REST Alerts Metering 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: Metering description: Operations for accessing consumption metering data used for billing and capacity planning for SAP HANA Cloud instances. paths: /metering/v1/serviceInstances/{serviceInstanceId}/values: get: operationId: getMeteringValues summary: Retrieve Metering Data for a Service Instance description: Retrieves consumption metering data for a specific SAP HANA Cloud service instance. Metering data includes compute unit hours, storage consumption, data lake capacity utilization, and other billable metrics used for cost tracking and capacity planning. tags: - Metering parameters: - $ref: '#/components/parameters/ServiceInstanceId' - name: fromTimestamp in: query description: Start timestamp for the metering data 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 metering data query window in ISO 8601 format. schema: type: string format: date-time example: '2026-01-15T10:30:00Z' responses: '200': description: Successfully retrieved metering data. content: application/json: schema: $ref: '#/components/schemas/MeteringValueList' examples: Getmeteringvalues200Example: summary: Default getMeteringValues 200 response x-microcks-default: true value: values: - timestamp: '2026-01-15T10:30:00Z' computeUnitHours: 42.5 storageGB: 42.5 dataLakeCapacityGB: 42.5 backupStorageGB: 42.5 '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: schemas: MeteringValueList: type: object description: A collection of metering data points for billing and capacity tracking. properties: values: type: array description: The list of metering records. items: $ref: '#/components/schemas/MeteringValue' 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 MeteringValue: type: object description: A metering data record representing resource consumption for billing purposes. properties: timestamp: type: string format: date-time description: ISO 8601 timestamp for the metering period. example: '2026-01-15T10:30:00Z' computeUnitHours: type: number format: double description: The number of compute unit hours consumed during the metering period. Compute units are based on memory and vCPU allocation. example: 42.5 storageGB: type: number format: double description: The storage consumption in gigabytes during the metering period. example: 42.5 dataLakeCapacityGB: type: number format: double description: The data lake storage consumption in gigabytes during the metering period, if a data lake instance is attached. example: 42.5 backupStorageGB: type: number format: double description: The backup storage consumption in gigabytes during the metering period. example: 42.5 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' 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' 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' 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' 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: {}