---
title: /usage/resources-group-statuses
slug: amberflo-api/usageresources-group-statuses
docTags: 
createdAt: 2024-11-07T15:10:16.969Z
---

{
  "id": "N1AA9tKDuiOmdRrh-inQa",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/usage/resources-group-statuses",
    "servers": [
      {
        "url": "https://app.amberflo.io/usage/resources-group-statuses"
      }
    ],
    "name": "",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "resource_status.input.ResourceGroupStatusRequest.in",
          "schema": [
            {
              "name": "meterApiName",
              "kind": "optional",
              "type": "string",
              "example": ""
            },
            {
              "name": "timeRange",
              "kind": "optional",
              "type": "object",
              "description": "",
              "modelRef": "#/components/schemas/common.TimeRange.in",
              "customType": "common.TimeRange.in",
              "schema": [
                {
                  "name": "startTimeInSeconds",
                  "kind": "required",
                  "type": "integer<int64>",
                  "description": "Start time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds).",
                  "example": 0
                },
                {
                  "name": "endTimeInSeconds",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "description": "End time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds). Defaults to \"now\".",
                  "example": 0
                }
              ]
            },
            {
              "name": "usageFilters",
              "kind": "optional",
              "type": "map",
              "example": "",
              "customType": "map<string, string[]>",
              "schema": []
            },
            {
              "name": "historyTimeInterval",
              "kind": "optional",
              "type": "string",
              "description": "",
              "modelRef": "#/components/schemas/com.amberflo.service.common.aggregation.AggregationInterval.in",
              "customType": "com.amberflo.service.common.aggregation.AggregationInterval.in",
              "schema": []
            },
            {
              "name": "historyDimensions",
              "kind": "optional",
              "type": "array",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "currentStatusFilters",
              "kind": "optional",
              "type": "array",
              "description": "",
              "modelRef": "#/components/schemas/resource_status.input.ResourceStatusRequestFilter.in",
              "customType": "resource_status.input.ResourceStatusRequestFilter.in[]",
              "schema": [
                {
                  "name": "dimension",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "values",
                  "kind": "optional",
                  "type": "array",
                  "example": "",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "optOut",
                  "kind": "optional",
                  "type": "boolean",
                  "example": ""
                }
              ]
            },
            {
              "name": "currentStatusGroupBy",
              "kind": "optional",
              "type": "array",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "take",
              "kind": "optional",
              "type": "object",
              "description": "",
              "modelRef": "#/components/schemas/resource_status.input.ResourceGroupStatusRequestTake.in",
              "customType": "resource_status.input.ResourceGroupStatusRequestTake.in",
              "schema": [
                {
                  "name": "limit",
                  "kind": "optional",
                  "type": "integer<int32>",
                  "example": 0
                },
                {
                  "name": "increasing",
                  "kind": "optional",
                  "type": "boolean",
                  "example": ""
                },
                {
                  "name": "sortMethod",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "minValue",
                  "kind": "optional",
                  "type": "number",
                  "example": ""
                },
                {
                  "name": "maxValue",
                  "kind": "optional",
                  "type": "number",
                  "example": ""
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/resource_status.input.ResourceGroupStatusRequest.in",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "resource_status.output.ResourceGroupsStatusesHistory.out",
            "schema": [
              {
                "name": "resourceGroupStatusRequest",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/resource_status.input.ResourceGroupStatusRequest.out",
                "customType": "resource_status.input.ResourceGroupStatusRequest.out",
                "schema": [
                  {
                    "name": "meterApiName",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "timeRange",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/common.TimeRange.out",
                    "customType": "common.TimeRange.out",
                    "schema": [
                      {
                        "name": "startTimeInSeconds",
                        "kind": "required",
                        "type": "integer<int64>",
                        "description": "Start time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds).",
                        "example": 0
                      },
                      {
                        "name": "endTimeInSeconds",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "description": "End time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds). Defaults to \"now\".",
                        "example": 0
                      }
                    ]
                  },
                  {
                    "name": "usageFilters",
                    "kind": "optional",
                    "type": "map",
                    "example": "",
                    "customType": "map<string, string[]>",
                    "schema": []
                  },
                  {
                    "name": "historyTimeInterval",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "modelRef": "#/components/schemas/com.amberflo.service.common.aggregation.AggregationInterval.out",
                    "customType": "com.amberflo.service.common.aggregation.AggregationInterval.out",
                    "schema": []
                  },
                  {
                    "name": "historyDimensions",
                    "kind": "optional",
                    "type": "array",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "currentStatusFilters",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/resource_status.input.ResourceStatusRequestFilter.out",
                    "customType": "resource_status.input.ResourceStatusRequestFilter.out[]",
                    "schema": [
                      {
                        "name": "dimension",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "values",
                        "kind": "optional",
                        "type": "array",
                        "example": "",
                        "itemType": "string",
                        "customType": "string[]",
                        "itemExample": "",
                        "itemDefault": ""
                      },
                      {
                        "name": "optOut",
                        "kind": "optional",
                        "type": "boolean",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "currentStatusGroupBy",
                    "kind": "optional",
                    "type": "array",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "take",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/resource_status.input.ResourceGroupStatusRequestTake.out",
                    "customType": "resource_status.input.ResourceGroupStatusRequestTake.out",
                    "schema": [
                      {
                        "name": "limit",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "example": 0
                      },
                      {
                        "name": "increasing",
                        "kind": "optional",
                        "type": "boolean",
                        "example": ""
                      },
                      {
                        "name": "sortMethod",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "minValue",
                        "kind": "optional",
                        "type": "number",
                        "example": ""
                      },
                      {
                        "name": "maxValue",
                        "kind": "optional",
                        "type": "number",
                        "example": ""
                      }
                    ]
                  }
                ]
              },
              {
                "name": "groupHistoryList",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/resource_status.output.ResourceGroupStatusesHistory.out",
                "customType": "resource_status.output.ResourceGroupStatusesHistory.out[]",
                "schema": [
                  {
                    "name": "group",
                    "kind": "optional",
                    "type": "map",
                    "example": "",
                    "customType": "map<string, string>",
                    "schema": []
                  },
                  {
                    "name": "groupValue",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "currentStatusStartTimeInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "example": 0
                  },
                  {
                    "name": "avgHourlyChangeInValue",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "estimatedDepletionTimeInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "example": 0
                  },
                  {
                    "name": "currentGroupStatuses",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/resource_status.output.ResourceStatus.out",
                    "customType": "resource_status.output.ResourceStatus.out[]",
                    "schema": [
                      {
                        "name": "dimensions",
                        "kind": "optional",
                        "type": "map",
                        "example": "",
                        "customType": "map<string, string>",
                        "schema": []
                      },
                      {
                        "name": "timeInSeconds",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "example": 0
                      },
                      {
                        "name": "value",
                        "kind": "optional",
                        "type": "number",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "statusesHistory",
                    "kind": "optional",
                    "type": "map",
                    "example": "",
                    "customType": "map<string, resource_status.output.ResourceStatus.out[]>",
                    "schema": []
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/resource_status.output.ResourceGroupsStatusesHistory.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "-bYExBDzoO05fDU34F1PF",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/usage/resources-group-statuses \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"timeRange\": {\n     \"startTimeInSeconds\": 0\n     }\n     }'"
        },
        {
          "id": "uO3lUz3NKoTTc7knjJy0D",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"timeRange\": {\n      \"startTimeInSeconds\": 0\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/usage/resources-group-statuses\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "9_f2kzBu6MEmDpUTZ4WF4",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/usage/resources-group-statuses\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"timeRange\": {\n      \"startTimeInSeconds\": 0\n   }\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "NnJaR3_EXh5cKhXLP05Cc",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/usage/resources-group-statuses\"\n\npayload = json.dumps({\n   \"timeRange\": {\n      \"startTimeInSeconds\": 0\n   }\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "-bYExBDzoO05fDU34F1PF"
    },
    "results": {
      "languages": [
        {
          "id": "er1WaKifaQ7c5Br6eCitu",
          "language": "200",
          "code": "// Successful request\n{\n  \"resourceGroupStatusRequest\": {\n    \"meterApiName\": \"\",\n    \"timeRange\": {\n      \"startTimeInSeconds\": \"\",\n      \"endTimeInSeconds\": \"\"\n    },\n    \"usageFilters\": \"\",\n    \"historyTimeInterval\": \"\",\n    \"historyDimensions\": [\n      \"\"\n    ],\n    \"currentStatusFilters\": [\n      {\n        \"dimension\": \"\",\n        \"values\": [\n          \"\"\n        ],\n        \"optOut\": false\n      }\n    ],\n    \"currentStatusGroupBy\": [\n      \"\"\n    ],\n    \"take\": {\n      \"limit\": \"\",\n      \"increasing\": false,\n      \"sortMethod\": \"\",\n      \"minValue\": 0,\n      \"maxValue\": 0\n    }\n  },\n  \"groupHistoryList\": [\n    {\n      \"group\": \"\",\n      \"groupValue\": 0,\n      \"currentStatusStartTimeInSeconds\": \"\",\n      \"avgHourlyChangeInValue\": 0,\n      \"estimatedDepletionTimeInSeconds\": \"\",\n      \"currentGroupStatuses\": [\n        {\n          \"dimensions\": \"\",\n          \"timeInSeconds\": \"\",\n          \"value\": 0\n        }\n      ],\n      \"statusesHistory\": \"\"\n    }\n  ]\n}"
        }
      ],
      "selectedLanguageId": "er1WaKifaQ7c5Br6eCitu"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}