openapi: 3.2.0 info: title: CoreStack External On premises API version: 1.0.0 termsOfService: http://corestack.io/ license: name: CoreStack Inc License url: http://corestack.io/licenses/LICENSE-2.0.html description: Manage On premises Metrics servers: - url: / tags: - name: On premises description: Manage On premises Metrics paths: /v1/on_premises/utilization/metric: post: responses: '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ModelError' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ModelError' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ModelError' '200': description: Fetched content: application/json: schema: $ref: '#/components/schemas/UtilizationResourceAggregationResponse' description: Retrieve the Utilization metric Data for the given period of time in the granularity provided. operationId: OnPremisesUtilizationMetricAggregateTrend security: - auth_token: [] tags: - On premises requestBody: content: application/json: schema: $ref: '#/components/schemas/OnPremisesMonitoringRequest' required: true components: schemas: ResourceUtilizationMetric: properties: unit: type: string description: Unit of the metric metric_name: type: string description: Name of the metric timeseries: type: array items: $ref: '#/components/schemas/TimeSeriesPoint' type: object OnPremisesMonitoringRequest: required: - aggregation - metric_name - resource_id properties: service_account_id: type: string description: ID of the service account resource_id: type: string description: Resource identifier aggregation: type: string description: Aggregation type (e.g., average, sum, maximum) metric_name: type: array description: List of metric names items: type: string from_date: type: string format: date-time description: Start timestamp (ISO string or epoch). If not provided, defaults to 7 days ago. to_date: type: string format: date-time description: End timestamp (ISO string or epoch). If not provided, defaults to now. type: object ModelError: required: - message properties: message: type: string description: Error response message. type: object TimeSeriesPoint: properties: timestamp: type: string format: date-time description: Timestamp in ISO format average: type: number description: Average value total: type: number description: Total value minimum: type: number description: Minimum value maximum: type: number description: Maximum value count: type: integer description: Count type: object UtilizationResourceAggregationResponse: properties: hourly_aggregations: type: array description: List of supported hourly aggregation types (e.g., avg, min, max) for utilization metrics items: type: string daily_aggregations: type: array description: List of supported daily aggregation types (e.g., avg, min, max) for utilization metrics items: type: string time_aggregation: type: array description: Time-based aggregation levels available for utilization data (hourly, daily) items: type: string metrics: type: array description: List of utilization metrics and their supported aggregation configurations items: $ref: '#/components/schemas/ResourceUtilizationMetric' type: object securitySchemes: auth_token: type: apiKey in: header name: X-Auth-Token