---
title: /usage-aggregation/custom-aggregation-spec/list
slug: amberflo-api/usage-aggregationcustom-aggregation-speclist
docTags: 
createdAt: 2024-11-07T15:10:16.979Z
---

{
  "id": "YNlh2pzUCrQMChZlRDpzW",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://app.amberflo.io/usage-aggregation/custom-aggregation-spec/list",
    "servers": [
      {
        "url": "https://app.amberflo.io/usage-aggregation/custom-aggregation-spec/list"
      }
    ],
    "name": "",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [],
      "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": "array",
            "description": "",
            "customType": "usage.aggregations.predefined.CustomAggregationSpec.out[]",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "meterApiName",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "groupBy",
                "kind": "optional",
                "type": "array",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "aggregationInterval",
                "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": "outputInterval",
                "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": "aggregationType",
                "kind": "optional",
                "type": "string",
                "description": "",
                "modelRef": "#/components/schemas/com.amberflo.service.common.aggregation.AggregationType.out",
                "customType": "com.amberflo.service.common.aggregation.AggregationType.out",
                "schema": []
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": "",
                "modelRef": "#/components/schemas/usage.aggregations.aggregation.CustomAggregationReason.out",
                "customType": "usage.aggregations.aggregation.CustomAggregationReason.out",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/usage.aggregations.predefined.CustomAggregationSpec.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "FnpLbtVdvwyxt5me4_mYz",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://app.amberflo.io/usage-aggregation/custom-aggregation-spec/list \\\n     --header 'accept: application/json'"
        },
        {
          "id": "9IqR0Qt9uFgOYCc8Gjn87",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/usage-aggregation/custom-aggregation-spec/list\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Fc1JoWQGZnCG7X3xQHrhK",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/usage-aggregation/custom-aggregation-spec/list\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "CiTJT2UZ8kWYS1c5qQeMg",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/usage-aggregation/custom-aggregation-spec/list\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "FnpLbtVdvwyxt5me4_mYz"
    },
    "results": {
      "languages": [
        {
          "id": "XEJyixH7bF2pnhyYhhVcf",
          "language": "200",
          "code": "// Successful request\n[\n  {\n    \"id\": \"\",\n    \"meterApiName\": \"\",\n    \"groupBy\": [\n      \"\"\n    ],\n    \"aggregationInterval\": \"\",\n    \"outputInterval\": \"\",\n    \"aggregationType\": \"\",\n    \"reason\": \"\"\n  }\n]"
        }
      ],
      "selectedLanguageId": "XEJyixH7bF2pnhyYhhVcf"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}