Business Mapping

The public API for Business Mapping: create and maintain the viewpoints and mapping rules that allocate cloud cost to business units, and control the order in which mappings claim cost.


Concept

TermWhat it is
ViewpointOne way of slicing cost, such as "By Team" or "By Product". Holds an ordered list of mappings
MappingA named bucket such as "Platform Team", defined by rules. Cost matching the rules is allocated to it
RuleA set of filters that are ANDed together. A mapping's rules are ORed: cost matching any one rule belongs to the mapping
RankA mapping's position in its viewpoint. Mappings claim cost in rank order; cost already claimed by a lower-numbered rank is not claimed again
Global mappingA mapping defined once and attached to several viewpoints. Editing it changes it everywhere it is attached
Mapping groupA visual folder for organizing mappings inside a viewpoint. Affects display only, not allocation

Endpoints


Viewpoints

MethodPathWhat it doesSuccess
GET/viewpointsList the viewpoints200
GET/viewpoints/:viewpointIdOne viewpoint200
POST/viewpointsCreate one. Body { "name": "By Team" }201
PUT/viewpoints/:viewpointIdUpdate one (e.g. rename)201
POST/viewpoints/:viewpointId/cloneCopy a viewpoint with all its mappings201
DELETE/viewpoints/:viewpointIdDelete a viewpoint200

Mappings in a viewpoint

MethodPathWhat it doesSuccess
GET/viewpoints/:viewpointId/mappingsThe viewpoint's mappings, ordered by rank200
POST/viewpoints/:viewpointId/mappingsCreate a mapping in the viewpoint201
PUT/viewpoints/:viewpointId/mappings/:mappingIdReplace a mapping's definition201
DELETE/viewpoints/:viewpointId/mappings/:mappingIdRemove a mapping from the viewpoint (see §6)200
PUT/viewpoints/:viewpointId/mappings/rankReorder all mappings of the viewpoint200

Global mappings

MethodPathWhat it doesSuccess
GET/global-mappingsList global mappings, each with the viewpoints it is attached to200
POST/global-mappingsCreate a global mapping201
PUT/global-mappings/:mappingIdReplace a global mapping's definition (every viewpoint sees the change)201
DELETE/global-mappings/:mappingIdDelete it, and detach it from every viewpoint200
PUT/viewpoints/:viewpointId/global-mappings/:mappingIdAttach an existing global mapping to a viewpoint200

Mapping groups (display folders)

MethodPathWhat it doesSuccess
POST/viewpoints/:viewpointId/mapping-groupsCreate a group. Body { "name": "Engineering", "color": "#4C9AFF" } (color optional)201
PUT/viewpoints/:viewpointId/mapping-groups/:groupIdUpdate a group's name and/or color200
DELETE/viewpoints/:viewpointId/mapping-groups/:groupIdDelete a group200
PUT/viewpoints/:viewpointId/mappings/:mappingId/groupPut a mapping in a group: { "mappingGroupId": "<groupId>" }. null or "" takes it out200