Get Calculated Cost

Table 1. API: GET Calculated Cost
Element Description
API GetCalculatedCost
Description API returns the Calculated Cost for provided services.
Method POST
URL Http(s)://{xx.xxxx.xx.xx:xxx}/v3/costmodels/calculateCost
Body Parameters
{
"catalogEntityId": "CAT-1EA36F32-50C5-4763-B36A-75B6421F4A98",
"platformEntityId": "ARM-58B227EC-707F-4549-9EB3-8EB1D06F55D2",
"orgEntityId": "ORG-1F7557F7-F150-44E0-824F-91B7B90788B9",
"items": [
{
"itemNumber": "1",
"computeCPU": [
"2"
],
"computeMemoryInGB": [
"30"
],
"osDiskInGB": [
{
"type": "SRT2",
"value": "20"
}
],
"period": [
{
"id": "d",
"value": "1"
}
],
"servicePlan": "platinum",
"additionalDiskInGB": [
{
"type": "SRT2",
"value": "10"
}
]
}
]
}
  • queryParams (Optional): It is used for filtering and sorting of records. It has three properties, which are as follows:
  • Filter: To filter records based on column name received from output. E.g. Filter="keyname='keyvalue'"
  • Sort Order: To define sorting order either ASC (Ascending) or DESC (descending). E.g. Sortorder="ASC".
  • Page Number: To get the records for related page number. Eg. Pagenumber="1”
  • Page Size: To get the number of records on selected page. Eg. Pagesize="10”
  • For e.g.
    {"filter": "itemNumber =’1’","sortorder": "desc", "pagenumber”: "1", "pagesize" : "10"}
Header
  • Authorization Key: The initial step that needs to be performed before consuming HCL BigFix CLM API is to obtain the Token Value for an authorization key. Once a Token value is obtained, it remains valid for all API calls made in a session. For more information on how to do that, refer Token API description.
  • Content-type: application/json
Response

A Sample Response:

{
"totalRecords": 1,
"records": [
{
"itemNumber": 1,
"cloudPlatformCode": "ARM",
"orgEntityId": "ORG-1F7557F7-F150-44E0-824F-91B7B90788B9",
"organizationName": "hclorg",
"locationId": 4,
"location": "eastus",
"exceptedCost": [
{
"platformType": "Microsoft Azure",
"servicePlanId": "1",
"servicePlanName": "platinum",
"subPlanId": -1,
"subPlanName": "N/A",
"costType": 2,
"costTypeName": "Time Based model",
"charagableItemCodeType": "SER",
"charagableItemTypeName": "Service",
"charagableItemId": "SER-91444F1D-C5CF-48AC-B1EE-E2FD8EDC59C8",
"charagableItemName": "backup",
"charagableItemCode": "SER",
"itemValue": 1,
"unitId": -1,
"computeUnit": 1,
"instanceSize": "",
"fixedCost": 0,
"recurringCost": 0.86,
"cost": 24,
"currency": "₹",
"periodInDays": 1,
"displayPeriod": "1 Day(s)"
},
{
"platformType": "Microsoft Azure",
"servicePlanId": "1",
"servicePlanName": "platinum",
"subPlanId": -1,
"subPlanName": "N/A",
"costType": 2,
"costTypeName": "Time Based model",
"charagableItemCodeType": "SER",
"charagableItemTypeName": "Service",
"charagableItemId": "SER-F7335925-EF8E-4F1B-A98D-96DFC4C038B1",
"charagableItemName": "AGService",
"charagableItemCode": "SER",
"itemValue": 1,
"unitId": -1,
"computeUnit": 1,
"instanceSize": "",
"fixedCost": 2,
"recurringCost": 0.29,
"cost": 120,
"currency": "₹",
"periodInDays": 1,
"displayPeriod": "1 Day(s)"
}
]
}
]
}
Response Parameters
  • Result:
  • itemNumber
  • cloudPlatformCode
  • orgEntityId
  • organizationName
  • locationId
  • location
  • expectedCost
  • platformType
  • servicePlanId
  • servicePlanName
  • costType
  • costTypeName
  • charagableItemCodeType
  • charagableItemTypeName
  • charagableItemId
  • charagableItemName
  • charagableItemCode
  • itemValue
  • unitId
  • computeUnit
  • instanceSize
  • fixedCost
  • recurringCost
  • cost
  • currency
  • periodInDays
  • displayPeriod