{
  "openapi": "3.0.1",
  "info": {
    "title": "Resource Metrics",
    "version": "9.1.20.0",
    "description": "Retrieve Resource Value Unit (RVU) metrics count.",
    "x-introduced": "9.1.12.0"
  },
  "servers": [
    {
      "url": "https://{hostname}:{port}/rest/admin/v2",
      "variables": {
        "port": {
          "default": "443",
          "enum": [
            "443",
            "8000"
          ]
        },
        "hostname": {
          "default": "localhost",
          "enum": [
            "localhost",
            "test.hcl.com"
          ]
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Resource Metrics",
      "description": "Provide RESTful services to retrieve Resource Value Unit metrics count."
    }
  ],
  "paths": {
    "/resource-metrics": {
      "get": {
        "tags": [
          "Resource Metrics"
        ],
        "description": "Get the resource metrics count numbers.",
        "operationId": "getResourceMetricCount",
        "parameters": [
          {
            "name": "fromDate",
            "in": "query",
            "description": "Limits the metrics calculations to metric updated after the specified time. The date and time is in ISO 8601 format, e.g 2022-06-01T10:00:00.000Z",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "description": "Limits the metrics calculations to metric updated before the specified date. The date and time is in ISO 8601 format, e.g 2022-06-01T10:00:00.000Z",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation is successful.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricCount"
                }
              }
            }
          },
          "400": {
            "description": "Bad request. The request could not be understood by the server due to malformed syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated. The user session is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "403": {
            "description": "The user is not authorized to perform the specified request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. For details, see the server log files.",
            "content": {}
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "MetricCount": {
        "type": "object",
        "properties": {
          "preEnablementOrderLineCount": {
            "type": "integer",
            "description": "The number order lines using the pre-enablement of HCL Commerce RVU Order Line Metrics calculation.",
            "format": "int64"
          },
          "postEnablementOrderLineCount": {
            "type": "integer",
            "description": "The number of order lines using the post-enablement of HCL Commerce RVU Order Line Metrics calculation.",
            "format": "int64"
          },
          "orderModifyCount": {
            "type": "integer",
            "description": "The metric count.",
            "format": "int64"
          },
          "appeasementCount": {
            "type": "integer",
            "description": "The metric count.",
            "format": "int64"
          },
          "returnCount": {
            "type": "integer",
            "description": "The metric count.",
            "format": "int64"
          }
        }
      },
      "ErrorResponseContainer": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          },
          "requestId": {
            "type": "string",
            "description": "The request identifier."
          }
        },
        "description": "The error message model."
      },
      "Error": {
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "string",
            "description": "The error message code."
          },
          "errorMessage": {
            "type": "string",
            "description": "The error message."
          },
          "errorKey": {
            "type": "string",
            "description": "The error message key."
          },
          "errorParameters": {
            "type": "array",
            "description": "The arguments used to construct the error message.",
            "items": {
              "type": "object",
              "properties": {}
            }
          },
          "errorLevel": {
            "type": "string",
            "description": "The error level."
          },
          "errorHref": {
            "type": "string",
            "description": "The error hypertext reference."
          }
        },
        "description": "The error message item model."
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    }
  ]
}
