Cost Categories
Allows you to categorize based on business requirements and get a contextual view of your expenses.
Retrieve a specific Cost Category by its unique identifier. Returns the complete Cost Category configuration including all cost buckets, shared costs, and rule definitions.
Bad Request
This is Failure entity as defied in Harness
Internal server error
Returns a Cost category object with all the cost and shared buckets, returns null if no Cost category exists for that particular identifier
GET /gateway/ccm/api/business-mapping/{id} HTTP/1.1
Host: nextgen-ce-d788d786-ssnpc
Accept: */*
{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Delete a Cost Category by its unique identifier. The deletion will fail if the Cost Category is currently used in any Perspectives. Returns a list of linked Perspectives if deletion is blocked.
Bad Request
This is Failure entity as defied in Harness
Internal server error
A string text message whether the delete was successful or not. If the cost category is used in the perspective, the deletion will fail and it will send you the IDs of all the linked perspectives
DELETE /gateway/ccm/api/business-mapping/{id}?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-ssnpc
Accept: */*
{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Get (cost-categories)/(cost buckets) for recommendation filter panel
Account Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Internal server error
Returns List of cost-category/cost-buckets
GET /gateway/ccm/api/business-mapping/filter-panel?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-ssnpc
Accept: */*
{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}List all Cost Categories for your account with support for search, sorting, and pagination. Use this endpoint to browse and discover existing Cost Categories and their configurations.
Bad Request
This is Failure entity as defied in Harness
Internal server error
Returns a List of Cost Categories
GET /gateway/ccm/api/business-mapping HTTP/1.1
Host: nextgen-ce-d788d786-ssnpc
Accept: */*
{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Create a Cost Category to organize and allocate cloud and AI costs based on your business structure. Define custom rules and cost buckets to automatically categorize expenses by teams, projects, environments, or any business dimension. Cost Categories enable accurate cost allocation, chargeback, and financial reporting across your organization.
^[^\d][^'"\\]*$Successfully created Cost Category with all cost buckets and shared costs
Bad Request - Invalid Cost Category definition
No content
Internal server error
POST /gateway/ccm/api/business-mapping HTTP/1.1
Host: nextgen-ce-d788d786-ssnpc
Content-Type: application/json
Accept: */*
Content-Length: 286
{
"name": "Engineering Teams",
"accountId": "acc_xyz789",
"costBuckets": [
{
"name": "Backend Team",
"rules": [
{
"conditions": [
{
"type": "LABEL",
"key": "team",
"value": "backend"
}
]
}
]
},
{
"name": "Frontend Team",
"rules": [
{
"conditions": [
{
"type": "LABEL",
"key": "team",
"value": "frontend"
}
]
}
]
}
],
"sharedCosts": []
}No content
Update an existing Cost Category configuration. Modify cost buckets, shared costs, rules, or rename the Cost Category. The update is identified by the UUID in the request body.
^[^\d][^'"\\]*$Bad Request
This is Failure entity as defied in Harness
Internal server error
Successfully updated the Business Mapping
PUT /gateway/ccm/api/business-mapping HTTP/1.1
Host: nextgen-ce-d788d786-ssnpc
Content-Type: application/json
Accept: */*
Content-Length: 783
{
"uuid": "text",
"name": "text",
"accountId": "text",
"costTargets": [
{
"name": "text",
"rules": [
{
"viewConditions": [
{
"type": "text"
}
]
}
]
}
],
"sharedCosts": [
{
"name": "text",
"rules": [
{
"viewConditions": [
{
"type": "text"
}
]
}
],
"strategy": "EQUAL",
"splits": [
{
"costTargetName": "text",
"percentageContribution": 1
}
]
}
],
"unallocatedCost": {
"strategy": "DISPLAY_NAME",
"label": "text",
"sharingStrategy": "EQUAL",
"splits": [
{
"costTargetName": "text",
"percentageContribution": 1
}
]
},
"dataSources": [
"CLUSTER"
],
"supportsTagNormalization": true,
"createdAt": 1,
"lastUpdatedAt": 1,
"createdBy": {
"uuid": "text",
"name": "text",
"email": "text",
"externalUserId": "text"
},
"lastUpdatedBy": {
"uuid": "text",
"name": "text",
"email": "text",
"externalUserId": "text"
},
"costTargetsWithUUID": [
{
"name": "text",
"rules": [
{
"viewConditions": [
{
"type": "text"
}
]
}
]
}
]
}{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Last updated
Was this helpful?