---
title: List automatic allocation rules with filtering
slug: reference/list-automatic-allocation-rules-with-filtering
docTags: 
createdAt: 2025-07-03T16:20:35.016Z
---

{
  "id": "b4_R80AWLObtAZDu_aFuZ",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://app.amberflo.io/business-unit/focus-allocation/automatic/rule",
    "servers": [
      {
        "url": "https://app.amberflo.io/business-unit/focus-allocation/automatic/rule"
      }
    ],
    "name": "List automatic allocation rules with filtering",
    "description": "List the automatic FOCUS allocation rules",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "limit",
          "type": "integer<int32>",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "page",
          "type": "integer<int32>",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "tagName",
          "type": "string",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "tagValues",
          "type": "array",
          "description": "",
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        },
        {
          "kind": "optional",
          "name": "businessUnitIds",
          "type": "array",
          "description": "Filter for these business units.",
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        },
        {
          "kind": "optional",
          "name": "providers",
          "type": "array",
          "description": "Filter for these providers.",
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        },
        {
          "kind": "optional",
          "name": "enabled",
          "type": "boolean",
          "description": "<p>If true only enabled rules are returned, if false only disabled rules are returned, if null all rules are returned.</p>"
        }
      ],
      "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": "object",
            "description": "",
            "customType": "business_unit.focus_allocation.automatic.query.AutomaticMatchingRulePage.out",
            "schema": [
              {
                "name": "metadata",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/business_unit.focus_allocation.automatic.query.AutomaticMatchingRulePageMetadata.out",
                "customType": "business_unit.focus_allocation.automatic.query.AutomaticMatchingRulePageMetadata.out",
                "schema": [
                  {
                    "name": "limit",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "",
                    "example": 0
                  },
                  {
                    "name": "page",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "",
                    "example": 0
                  },
                  {
                    "name": "tagName",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": ""
                  },
                  {
                    "name": "tagValues",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "businessUnitIds",
                    "kind": "optional",
                    "type": "array",
                    "description": "Filter for these business units.",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "providers",
                    "kind": "optional",
                    "type": "array",
                    "description": "Filter for these providers.",
                    "modelRef": "#/components/schemas/focus.common.FocusProvider.out",
                    "customType": "focus.common.FocusProvider.out[]",
                    "schema": []
                  },
                  {
                    "name": "enabled",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "If true only enabled rules are returned, if false only disabled rules are returned, if null all rules are returned.",
                    "example": ""
                  },
                  {
                    "name": "totalRowCount",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "",
                    "example": 0
                  },
                  {
                    "name": "filteredRowCount",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "",
                    "example": 0
                  },
                  {
                    "name": "totalFilteredPages",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "",
                    "example": 0
                  }
                ]
              },
              {
                "name": "items",
                "kind": "optional",
                "type": "array",
                "description": "Complete automatic FOCUS allocation rule configuration with system-generated metadata for cost assignment to business units based on resource tag matching.",
                "modelRef": "#/components/schemas/business_unit.focus_allocation.automatic.AutomaticMatchingRule.out",
                "customType": "business_unit.focus_allocation.automatic.AutomaticMatchingRule.out[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string<uuid>",
                    "description": "System-generated unique identifier for rule tracking. Required for rule updates, deletions, and position management in execution sequence.",
                    "example": "0e63b938-6785-429b-a89d-c4164144fc88"
                  },
                  {
                    "name": "provider",
                    "kind": "required",
                    "type": "string",
                    "description": "Cloud provider for cost allocation filtering. Supported values include AWS, AZURE, GOOGLE_CLOUD for targeted rule application.",
                    "modelRef": "#/components/schemas/focus.common.FocusProvider.out",
                    "customType": "focus.common.FocusProvider.out",
                    "schema": []
                  },
                  {
                    "name": "predicate",
                    "kind": "required",
                    "type": "object",
                    "description": "Matching conditions that determine when rule applies to cost records. Defines value matrix logic for resource identification.",
                    "modelRef": "#/components/schemas/business_unit.focus_allocation.automatic.predicate.GroupKeyPredicate.out",
                    "customType": "business_unit.focus_allocation.automatic.predicate.GroupKeyPredicate.out",
                    "schema": [],
                    "complexType": "oneOf",
                    "complexItems": [
                      {
                        "name": "business_unit.focus_allocation.automatic.predicate.ValueMatrixPredicate.out",
                        "description": "",
                        "modelRef": "#/components/schemas/business_unit.focus_allocation.automatic.predicate.ValueMatrixPredicate.out",
                        "schema": [
                          {
                            "name": "type",
                            "kind": "required",
                            "type": "string",
                            "description": "Predicate type identifier for value matrix matching logic. Always set to 'value_matrix' for matrix-based resource filtering conditions.",
                            "example": "",
                            "default": "value_matrix"
                          },
                          {
                            "name": "columns",
                            "kind": "required",
                            "type": "array",
                            "description": "FOCUS column names for matrix dimension headers. Defines resource attributes used for matching conditions in allocation rules.",
                            "example": "",
                            "itemType": "string",
                            "customType": "string[]",
                            "itemExample": "",
                            "itemDefault": ""
                          },
                          {
                            "name": "rows",
                            "kind": "required",
                            "type": "array",
                            "description": "Matrix row definitions containing value combinations for resource matching. Each row represents specific resource attribute criteria for rule application.",
                            "modelRef": "#/components/schemas/business_unit.focus_allocation.automatic.predicate.ValueMatrixPredicate.ValueMatrixRow.out",
                            "customType": "business_unit.focus_allocation.automatic.predicate.ValueMatrixPredicate.ValueMatrixRow.out[]",
                            "schema": [
                              {
                                "name": "values",
                                "kind": "required",
                                "type": "array",
                                "description": "Array of string values corresponding to matrix columns for resource matching. Each element matches position in predicate column array.",
                                "example": "",
                                "itemType": "string",
                                "customType": "string[]",
                                "itemExample": "",
                                "itemDefault": ""
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "tagName",
                    "kind": "optional",
                    "type": "string",
                    "description": "FOCUS tag key for cost allocation target. Specifies resource tag name used for business unit assignment mapping.",
                    "example": ""
                  },
                  {
                    "name": "tagValue",
                    "kind": "optional",
                    "type": "string",
                    "description": "Specific FOCUS tag value to match for cost allocation. Must be used with tagName for targeted resource matching.",
                    "example": ""
                  },
                  {
                    "name": "businessUnitId",
                    "kind": "optional",
                    "type": "string",
                    "description": "Target business unit identifier for cost assignment. Alternative to tagName/tagValue approach for direct business unit allocation.",
                    "example": ""
                  },
                  {
                    "name": "label",
                    "kind": "optional",
                    "type": "string",
                    "description": "Human-readable display name for rule management and identification. Used for administrative organization and rule tracking purposes.",
                    "example": ""
                  },
                  {
                    "name": "description",
                    "kind": "optional",
                    "type": "string",
                    "description": "Detailed explanation of rule purpose and allocation logic. Provides context for rule configuration and business unit cost assignment.",
                    "example": ""
                  },
                  {
                    "name": "enabled",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Rule activation status for automatic cost allocation processing. Controls whether rule participates in allocation execution sequence.",
                    "example": ""
                  },
                  {
                    "name": "createTimeInMillis",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "Rule creation timestamp in Unix time milliseconds. Tracks when automatic allocation rule was first established in system.",
                    "example": 0
                  },
                  {
                    "name": "updateTimeInMillis",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "Rule modification timestamp in Unix time milliseconds. Tracks when automatic allocation rule configuration was last changed.",
                    "example": 0
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/business_unit.focus_allocation.automatic.query.AutomaticMatchingRulePage.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "3hchEFh5xHzgIV9Ov_mrU",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://app.amberflo.io/business-unit/focus-allocation/automatic/rule \\\n     --header 'accept: application/json'"
        },
        {
          "id": "KEyG_PHfN7v3J9cPTBdXD",
          "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/business-unit/focus-allocation/automatic/rule\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "epAsuNnkkmRVILe5nOWnn",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/business-unit/focus-allocation/automatic/rule\")\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": "_JhQgjcd3r91X25szVNRr",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/business-unit/focus-allocation/automatic/rule\"\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": "3hchEFh5xHzgIV9Ov_mrU"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Successful request\n{\n  \"metadata\": {\n    \"limit\": \"\",\n    \"page\": \"\",\n    \"tagName\": \"\",\n    \"tagValues\": [\n      \"\"\n    ],\n    \"businessUnitIds\": [\n      \"\"\n    ],\n    \"providers\": [\n      \"\"\n    ],\n    \"enabled\": false,\n    \"totalRowCount\": \"\",\n    \"filteredRowCount\": \"\",\n    \"totalFilteredPages\": \"\"\n  },\n  \"items\": [\n    {\n      \"id\": \"0e63b938-6785-429b-a89d-c4164144fc88\",\n      \"provider\": \"\",\n      \"predicate\": {},\n      \"tagName\": \"\",\n      \"tagValue\": \"\",\n      \"businessUnitId\": \"\",\n      \"label\": \"\",\n      \"description\": \"\",\n      \"enabled\": false,\n      \"createTimeInMillis\": \"\",\n      \"updateTimeInMillis\": \"\"\n    }\n  ]\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": "",
      "id": "PNBcrtnD3vYBzzdAdToAM"
    }
  ]
}