openapi: 3.2.0 info: title: SC//Fleet Manager Metrics API description: 'The [OpenAPI Specification JSON Schema](https://api.scalecomputing.com/api/v2/openapi.json) can be imported into the API tool of your choice, such as Postman or Insomnia. This REST API allows programmatic role-based access to your SC//Fleet Manager data. Use the "Authorize" button to input API Keys [created in Fleet Manager](https://fleet.scalecomputing.com/organization/settings) and try out the API directly from your browser. Note: Each endpoint is role restricted in alignment with the UI access levels, which are detailed in the Fleet Manager [User Guide](https://scalecomputing.my.salesforce.com/sfc/p/#700000008AKW/a/4u0000019yBV/BT9qsos01XIXnbP85uBMLHE5AbtdRBhhxxjxGl3OCIU).' version: '2.0' contact: {} servers: - url: https://api.scalecomputing.com description: Fleet Manager API tags: - name: metrics description: Historical tracking of CPU, RAM and Storage metrics across your fleet paths: /api/v2/metrics: get: operationId: MetricsController_findAll parameters: - name: metricType required: true in: query description: type of metric to query schema: example: cluster_cpu_utilization type: string enum: - cluster_cpu_utilization - cluster_ram_capacity - cluster_ram_allocated - cluster_storage_capacity - cluster_storage_utilization - vm_cpu_percent - vm_memory_allocated - vm_storage_provisioned - vm_storage_utilization - name: query required: false in: query description: filter for the metrics query examples: Cluster ID: value: id:= description: query by cluster id VM ID: value: id:= description: query by vm id Wild Card Search: value: description: search string schema: type: string default: '' - name: from required: false in: query description: 'from date/time for the metrics query. (if not using an specific date/time, please add an "-" before the value, for example for 1 week: "-1w")' examples: default: value: -1h description: from 1 hour ago (default) 1 Minute: value: -1m description: from 1 minute ago 1 Day: value: -1d description: from 1 day ago 1 Week: value: -1w description: from 1 week ago 1 Year: value: -1y description: from 1 year ago Specific Date: value: 12-01-2023 description: from a specific date schema: type: string - name: to required: false in: query description: to date/time for the metrics query examples: default: value: '0' description: default value is 0 (now) 1 Minute: value: 1m description: to 1 minute ago 1 Day: value: 1d description: to 1 day ago 1 Week: value: 1w description: to 1 week ago 1 Year: value: 1y description: to 1 year ago Specific Date: value: 12-01-2023 description: to a specific date schema: type: string - name: offset required: false in: query schema: default: 0 type: number minimum: 0 - name: limit required: false in: query description: limit is defaulted to 20 if not passed. The value can range between 1-200. schema: default: 20 type: number minimum: 1 maximum: 200 responses: '200': description: '' content: application/json: schema: allOf: - $ref: '#/components/schemas/PageDto' - properties: items: type: array items: $ref: '#/components/schemas/QueryResponseDto' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/BadRequestException' security: - API Key: [] summary: Get time-series data for a metricType by resource Id over a specified time range. tags: - metrics components: schemas: PageMetaDto: type: object properties: offset: type: number limit: type: number total: type: number required: - offset - limit - total QueryResponseDto: type: object properties: pointData: type: PointData example: - timestamp: 1742244360000 percent: 46 - timestamp: 1742244420000 percent: 47 entity: type: object properties: name: type: string value: type: string example: name: My virtual machine name value: bd198079-bcca-42c6-a39c-dd783e25ac36 fields: type: FieldDataType additionalProperties: true example: percent: type: percent label: type: string colors: type: Array required: - pointData - fields - label PageDto: type: object properties: meta: $ref: '#/components/schemas/PageMetaDto' items: type: array items: type: string required: - meta - items BadRequestException: type: object properties: statusCode: type: number default: 400 message: type: string error: type: string required: - statusCode - message - error securitySchemes: API_Key: type: apiKey in: header name: api-key