---
title: Retrieve tag-scoped allocation rule details
slug: reference/retrieve-tag-scoped-allocation-rule-details
docTags: 
createdAt: 2025-07-03T16:20:35.017Z
---

{
  "id": "TfwRDLxzroUTFw_uzLeui",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://app.amberflo.io/business-unit/focus-allocation/automatic/rule/tag/{tagName}/{ruleId}",
    "servers": [
      {
        "url": "https://app.amberflo.io/business-unit/focus-allocation/automatic/rule/tag/{tagName}/{ruleId}"
      }
    ],
    "name": "Retrieve tag-scoped allocation rule details",
    "description": "<p>Retrieves detailed configuration for a specific automatic FOCUS allocation rule scoped to a particular tag name context.\nReturns complete rule definition including tag-specific allocation logic, business unit assignments, and execution metadata.</p>\n<p>Required parameters:</p>\n<ul>\n<li><code>tagName</code>: FOCUS tag name that scopes the rule retrieval</li>\n<li><code>ruleId</code>: Unique identifier for the automatic allocation rule</li>\n</ul>\n<p>Returns comprehensive rule configuration including tag-specific allocation conditions, cost assignment targets, and rule execution settings.\nUse this endpoint to examine tag-scoped rule definitions for specialized allocation scenarios and troubleshooting.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "tagName",
          "type": "string",
          "description": "<p>FOCUS tag name that defines the scope for rule retrieval. Filters rule access to specific tag-based allocation contexts.</p>"
        },
        {
          "kind": "required",
          "name": "ruleId",
          "type": "string<uuid>",
          "example": "0e63b938-6785-429b-a89d-c4164144fc88",
          "description": "<p>Unique system-generated identifier for the automatic allocation rule within the specified tag name scope.</p>"
        }
      ],
      "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": "object",
            "description": "Complete automatic FOCUS allocation rule configuration with system-generated metadata for cost assignment to business units based on resource tag matching.",
            "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.AutomaticMatchingRule.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "bd4Roa1FyhjT1-v3izvX1",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://app.amberflo.io/business-unit/focus-allocation/automatic/rule/tag/{tagName}/{ruleId} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "N0d3hk6pjMBOcGck3Qt71",
          "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/tag/{tagName}/{ruleId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "WgqGbA_ot88N3dfpeU6PH",
          "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/tag/{tagName}/{ruleId}\")\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": "NrcPaFbmuxIgL90xY14nE",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/business-unit/focus-allocation/automatic/rule/tag/{tagName}/{ruleId}\"\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": "bd4Roa1FyhjT1-v3izvX1"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Successful request\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}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": "",
      "id": "4NFdUcAHL7SE0nC31bTwm"
    }
  ]
}