Create Viewpoint Mapping

Create one business mapping in a viewpoint.


Rules- how the match is defined

Two levels, and the nesting is the whole grammar:

rules[] → OR between rules

└ filters[] → AND between filters inside one rule

So rules: [A, B] matches a row satisfying either rule, while a rule holding two filters matches only rows satisfying both. There is no third level and no explicit operator between the levels - the shape is the operator.

{"name": "Platform - EU production", "rules": [ { "filters": [ { "field": "service", "operator": "IS", "values": ["Amazon Elastic Compute Cloud"] }, { "field": "region", "operator": "STARTS_WITH", "values": "eu-" } ] }, { "filters": [ { "field": "customtags", "prefix": "team", "operator": "IS", "values": ["platform"] } ] } ]}

Reads as: (service is EC2 and region starts with eu-) or (tag team is platform).


Operators

OperatorvaluesMeaning
ISarrayExact match against any value in the list.
IS_NOTarrayMatches nothing in the list.
LIKEstringSubstring, case-insensitive.
LIKE_CASE_SstringSubstring, case-sensitive.
NOT_LIKEstringNegated substring, case-insensitive.
NOT_LIKE_CASE_SstringNegated substring, case-sensitive.
STARTS_WITHstringPrefix match.
ENDS_WITHstringSuffix match.
GTEstringGreater than or equal — for the numeric dimensions.

Table Fields

The set is per cloud, and it is narrower than the Cost & Usage dimension list - a dimension you can group a report by is not necessarily one a mapping can be built from.

CloudFields
AWSregion, linkedaccid, service, division, customtags, virtualcustomtags, subviewscustomtags, payeraccount, operation, familytype, instancetype, chargetype, zonetag, resource, usagetype, and the Kubernetes four: k8snamespace, k8slabels, k8scluster, k8snodegroup
AZURElinkedaccid, resourcegroup, region, service, operation, payeraccount, division, customtags, virtualcustomtags, resource, usagetype
GCPregion, linkedaccid, project, service, operation, familytype, instancetype, division, customtags, virtualcustomtags, resource

NOTE: The Kubernetes fields are listed under AWS but apply wherever the account has K8s data; pair them with k8s: true.



Split (optional)

A split mapping does not keep the cost its rules collect. It collects the cost and then redistributes every dollar of it onto other mappings, leaving itself at zero. This is how shared cost is charged out: a "Shared infrastructure" mapping catches the cluster bill and pushes it onto the teams.

end split: true and a splitOptions object. The two fields every split needs:

FieldTypeNotes
splitOptions.mappingsstring[]Required, min 1. The uuids of the target mappings — not their names. Get them from GET /api/v2/business-mapping/viewpoints/:viewpointId/mappings. Targets must already exist; this route does not resolve or verify them.
splitOptions.splitTypestringRequired. How the cost divides. See below.

Split types

TypeAccepted hereHow the share is computedExtra fields
EQUALyesEvery target gets 1 / n, regardless of its own size. The simplest and the default the UI starts from.—
RATIOyesProportional to each target's own cost in the same time bucket. A target twice the size absorbs twice the shared cost. When the targets sum to zero in a bucket, it degrades to an equal split rather than dividing by zero.—
CUSTOMyesFixed percentages you set per target.customDivision
RATIO_MONTHLYno — 400Like RATIO, but the ratio is averaged over the months covering the bucket rather than recomputed per bucket, so the allocation stays steady instead of moving with daily noise. Stored and honoured; simply not reachable through this route.—
METRICno — 400Shares follow a Unit Economics metric or KPI (seats, requests, GB) instead of cost. Stored and honoured; not reachable through this route. Refused outright on AI-provider accounts.kpiConfig



Mapping types

The flags above are not variants of one thing - they pick which kind of mapping you are creating, and each resolves differently at query time.


TypeSet byWhat it produces
Rule mappingnothing extra — the defaultOne bucket. Rows matching the rules land in it and stay.
Split mappingsplit: true + splitOptionsOne bucket that empties itself into other mappings. Ends at zero by design.
Group By mappingis_group_by: true + group_by_fieldMany buckets from one definition — one per distinct value of the field, named <value>____<mapping name> - the four underscores are the separator the split pipeline reads back apart. One rule, a bucket per linked account or per team tag, without writing them out. Add group_by_field_key for a two-level field. Eligible fields are narrower than the rule fields: linkedaccid, region, service, familytype, operation, customtags, virtualcustomtags, accounttags, governance_tags_keys, plus payeraccount and cloudprovider on multi-cloud.
Telemetry mappingis_telemetry: true + telemetryConfigAllocation driven by a Unit Economics pipeline metric rather than by cost. Mutually exclusive with split and is_group_by — a rule the in-app route enforces and this one does not.
Kubernetes mappingk8s: true (+ k8s_config)Rules resolve against the Kubernetes dataset, which is what makes k8snamespace, k8scluster, k8snodegroup and k8slabels meaningful.
Global mappinga different endpointDefined once in the account library and attached to many viewpoints. Created via POST /api/v2/business-mapping/global-mappings and attached with PUT …/viewpoints/:viewpointId/global-mappings/:mappingId. Same body, but split is refused.
Path Params
string
required

viewpoint uuid

Body Params
string
required

Display name, and the value this mapping contributes to the viewpoint dimension. Names are how split targets and viewpoint filters address a mapping, so keep them unique within a viewpoint.

rules
array of objects
required

Min 1. The match condition. See above "Rules"

rules*
string

Puts the new mapping inside a mapping group (if defined).

boolean

Turns this into a split mapping - its cost is redistributed onto other mappings instead of staying here. See Split explanation above.

splitOptions
object

Required when split is truthy.

boolean

Marks the mapping as a Kubernetes mapping, so its rules are resolved against the K8s dataset.

boolean

Makes this a Group By mapping - one bucket per distinct value of group_by_field. See Mapping types above.

string

The dimension to bucket by.

boolean

Allocates by a Unit Economics pipeline metric instead of by cost ratio.

Headers
string
required
string
required
Responses

Language
LoadingLoading…
Response
Choose an example:
application/json