Cloud Cost Management

Update a unit cost

Replace an ROI metric (unit cost) with a new set of attributes.

put/api/v2/cost/unit_costs/{unit_cost_id}

Request

Path parameters

unit_cost_idstring uuid required

The UUID of the unit cost.

Request body

Example request

{
  "data": {
    "attributes": {
      "denominator_query": {
        "formulas": [
          {
            "formula": "numerator"
          }
        ],
        "queries": [
          {
            "data_source": "cloud_cost",
            "name": "numerator",
            "query": "sum:aws.cost.net.amortized.shared.resources.allocated{*}.rollup(sum, daily)"
          }
        ]
      },
      "description": "Amortized cloud spend divided by the number of active users.",
      "name": "Cloud cost per active user",
      "numerator_query": {
        "formulas": [
          {
            "formula": "numerator"
          }
        ],
        "queries": [
          {
            "data_source": "cloud_cost",
            "name": "numerator",
            "query": "sum:aws.cost.net.amortized.shared.resources.allocated{*}.rollup(sum, daily)"
          }
        ]
      },
      "unit_label": "user"
    },
    "id": "64aecd58-e355-4f07-9c3a-56ff6bda6cd8",
    "type": "unit_cost"
  }
}

Response

OK

Example response

{
  "data": {
    "attributes": {
      "created_at": "2026-09-01T18:46:15.933716Z",
      "created_by": "36ea1610-8866-4bd3-bb6d-9bb9fc87cad2",
      "denominator_query": {
        "formulas": [
          {
            "formula": "numerator"
          }
        ],
        "queries": [
          {
            "data_source": "cloud_cost",
            "name": "numerator",
            "query": "sum:aws.cost.net.amortized.shared.resources.allocated{*}.rollup(sum, daily)"
          }
        ]
      },
      "denominator_type": "metrics",
      "description": "Amortized cloud spend divided by the number of active users.",
      "name": "Cloud cost per active user",
      "numerator_query": {
        "formulas": [
          {
            "formula": "numerator"
          }
        ],
        "queries": [
          {
            "data_source": "cloud_cost",
            "name": "numerator",
            "query": "sum:aws.cost.net.amortized.shared.resources.allocated{*}.rollup(sum, daily)"
          }
        ]
      },
      "org_id": 321813,
      "unit_label": "user",
      "updated_at": "2026-09-01T19:52:08.820536Z",
      "updated_by": "13cc0adf-2595-479e-b448-5051c180dddb"
    },
    "id": "64aecd58-e355-4f07-9c3a-56ff6bda6cd8",
    "type": "unit_cost"
  }
}

Changes

Changes to this operation have not been checked yet.