For the complete documentation index, see llms.txt. This page is also available as Markdown.

Cost Details

Fetch cloud and AI cost data for cost analysis

Returns cost overview for IaCM resources

post

Returns cost details for IaCM-managed resources based on cloud-native identifiers and Terraform provider/type metadata.

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Body

Request to get costs for IaCM-managed cloud resources

Responses
400

Bad Request

application/json

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/costdetails/overview/iacm
POST /gateway/ccm/api/costdetails/overview/iacm?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-66b6b78845-wrv4l
Content-Type: application/json
Accept: */*
Content-Length: 167

{
  "resources": [
    {
      "provider": "registry.terraform.io/hashicorp/aws",
      "type": "aws_instance",
      "resourceId": "arn:aws:ec2:us-east-1:123456789012:instance/i-0123456789abcdef0"
    }
  ]
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Returns an overview of the cost

post

Returns total cost, cost trend, and the time period based on the specified query parameters.

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

perspectiveIdstringRequired

Perspective identifier of the cost details

startTimestringOptional

Start time of the cost details. Should use org.joda.time.DateTime parsable format. Example, '2022-01-31', '2022-01-31T07:54Z' or '2022-01-31T07:54:51.264Z'. Defaults to Today - 7days

endTimestringOptional

End time of the cost details. Should use org.joda.time.DateTime parsable format. Example, '2022-01-31', '2022-01-31T07:54Z' or '2022-01-31T07:54:51.264Z'. Defaults to Today

isClusterHourlyDatabooleanOptional

To fetch cluster hourly data in case of cluster perspective. Defaults to false

useCostCategoryStampedDatabooleanOptionalDefault: false
Body

Common query parameters for all cost details APIs

timeResolutionstring · enumOptional

Only applicable for Time Series Endpoints, defaults to DAY

Possible values:
limitinteger · int32Optional

Limit on the number of cost values returned, 0 by default.

sortOrderstring · enumOptional

Order of sorting on cost, Descending by default.

Possible values:
offsetinteger · int32Optional

Offset on the cost values returned, 10 by default.

skipRoundOffbooleanOptional

Skip Rounding off the cost values returned, false by default.

Responses
400

Bad Request

application/json

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/costdetails/overview
POST /gateway/ccm/api/costdetails/overview?accountIdentifier=text&perspectiveId=text HTTP/1.1
Host: nextgen-ce-66b6b78845-wrv4l
Content-Type: application/json
Accept: */*
Content-Length: 261

{
  "filters": [
    {
      "field": "PERSPECTIVE_ID",
      "operator": "NOT_IN",
      "values": [
        "text"
      ]
    }
  ],
  "groupBy": [
    "PERSPECTIVE_ID"
  ],
  "timeResolution": "HOUR",
  "limit": 1,
  "sortOrder": "ASCENDING",
  "offset": 1,
  "skipRoundOff": true,
  "viewParams": {
    "viewTimeGranularity": "DAY",
    "isAITraceQuery": true
  }
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Returns cluster data in a tabular format

post

Returns cluster data based on the specified query parameters.

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

startTimestringOptional

Start time of the cost details. Should use org.joda.time.DateTime parsable format. Example, '2022-01-31', '2022-01-31T07:54Z' or '2022-01-31T07:54:51.264Z'. Defaults to Today - 7days

endTimestringOptional

End time of the cost details. Should use org.joda.time.DateTime parsable format. Example, '2022-01-31', '2022-01-31T07:54Z' or '2022-01-31T07:54:51.264Z'. Defaults to Today

isClusterHourlyDatabooleanOptional

To fetch cluster hourly data in case of cluster perspective. Defaults to false

useCostCategoryStampedDatabooleanOptionalDefault: false
Body

Common query parameters for all cluster cost details APIs

timeResolutionstring · enumOptional

Only applicable for Time Series Endpoints, defaults to DAY

Possible values:
limitinteger · int32Optional

Limit on the number of cost values returned, 0 by default.

sortOrderstring · enumOptional

Order of sorting on cost, Descending by default.

Possible values:
offsetinteger · int32Optional

Offset on the cost values returned, 10 by default.

skipRoundOffbooleanOptional

Skip Rounding off the cost values returned, false by default.

selectedLabelsstring[]Optional

The response will contain values corresponding to these labels

Responses
400

Bad Request

application/json

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/costdetails/clusterData
POST /gateway/ccm/api/costdetails/clusterData?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-66b6b78845-wrv4l
Content-Type: application/json
Accept: */*
Content-Length: 288

{
  "aggregations": [
    {
      "operationType": "SUM",
      "field": "PERSPECTIVE_ID"
    }
  ],
  "filters": [
    {
      "field": "PERSPECTIVE_ID",
      "operator": "NOT_IN",
      "values": [
        "text"
      ]
    }
  ],
  "groupBy": [
    "PERSPECTIVE_ID"
  ],
  "timeResolution": "HOUR",
  "limit": 1,
  "sortOrder": "ASCENDING",
  "offset": 1,
  "skipRoundOff": true,
  "selectedLabels": [
    "text"
  ]
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Returns cost details in a tabular format

post

Returns cost details in a tabular format based on the specified query parameters.

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

perspectiveIdstringRequired

Perspective identifier of the cost details

startTimestringOptional

Start time of the cost details. Should use org.joda.time.DateTime parsable format. Example, '2022-01-31', '2022-01-31T07:54Z' or '2022-01-31T07:54:51.264Z'. Defaults to Today - 7days

endTimestringOptional

End time of the cost details. Should use org.joda.time.DateTime parsable format. Example, '2022-01-31', '2022-01-31T07:54Z' or '2022-01-31T07:54:51.264Z'. Defaults to Today

isClusterHourlyDatabooleanOptional

To fetch cluster hourly data in case of cluster perspective. Defaults to false

useCostCategoryStampedDatabooleanOptionalDefault: false
Body

Common query parameters for all cost details APIs

timeResolutionstring · enumOptional

Only applicable for Time Series Endpoints, defaults to DAY

Possible values:
limitinteger · int32Optional

Limit on the number of cost values returned, 0 by default.

sortOrderstring · enumOptional

Order of sorting on cost, Descending by default.

Possible values:
offsetinteger · int32Optional

Offset on the cost values returned, 10 by default.

skipRoundOffbooleanOptional

Skip Rounding off the cost values returned, false by default.

Responses
400

Bad Request

application/json

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/costdetails/tabularformat
POST /gateway/ccm/api/costdetails/tabularformat?accountIdentifier=text&perspectiveId=text HTTP/1.1
Host: nextgen-ce-66b6b78845-wrv4l
Content-Type: application/json
Accept: */*
Content-Length: 261

{
  "filters": [
    {
      "field": "PERSPECTIVE_ID",
      "operator": "NOT_IN",
      "values": [
        "text"
      ]
    }
  ],
  "groupBy": [
    "PERSPECTIVE_ID"
  ],
  "timeResolution": "HOUR",
  "limit": 1,
  "sortOrder": "ASCENDING",
  "offset": 1,
  "skipRoundOff": true,
  "viewParams": {
    "viewTimeGranularity": "DAY",
    "isAITraceQuery": true
  }
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Returns cost details in a time series format

post

Returns cost details in a time series format based on the specified query parameters.

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

perspectiveIdstringRequired

Perspective identifier of the cost details

startTimestringOptional

Start time of the cost details. Should use org.joda.time.DateTime parsable format. Example, '2022-01-31', '2022-01-31T07:54Z' or '2022-01-31T07:54:51.264Z'. Defaults to Today - 7days

endTimestringOptional

End time of the cost details. Should use org.joda.time.DateTime parsable format. Example, '2022-01-31', '2022-01-31T07:54Z' or '2022-01-31T07:54:51.264Z'. Defaults to Today

isClusterHourlyDatabooleanOptional

To fetch cluster hourly data in case of cluster perspective. Defaults to false

useCostCategoryStampedDatabooleanOptionalDefault: false
Body

Common query parameters for all cost details APIs

timeResolutionstring · enumOptional

Only applicable for Time Series Endpoints, defaults to DAY

Possible values:
limitinteger · int32Optional

Limit on the number of cost values returned, 0 by default.

sortOrderstring · enumOptional

Order of sorting on cost, Descending by default.

Possible values:
offsetinteger · int32Optional

Offset on the cost values returned, 10 by default.

skipRoundOffbooleanOptional

Skip Rounding off the cost values returned, false by default.

Responses
400

Bad Request

application/json

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/costdetails/timeseriesformat
POST /gateway/ccm/api/costdetails/timeseriesformat?accountIdentifier=text&perspectiveId=text HTTP/1.1
Host: nextgen-ce-66b6b78845-wrv4l
Content-Type: application/json
Accept: */*
Content-Length: 261

{
  "filters": [
    {
      "field": "PERSPECTIVE_ID",
      "operator": "NOT_IN",
      "values": [
        "text"
      ]
    }
  ],
  "groupBy": [
    "PERSPECTIVE_ID"
  ],
  "timeResolution": "HOUR",
  "limit": 1,
  "sortOrder": "ASCENDING",
  "offset": 1,
  "skipRoundOff": true,
  "viewParams": {
    "viewTimeGranularity": "DAY",
    "isAITraceQuery": true
  }
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Last updated

Was this helpful?