Cloud Cost Perspectives

This contains APIs related to Cloud Cost Perspectives

Get the last month cost for a Perspective

Get last month cost for a Perspective

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the entity

perspectiveId
required
string

The Perspective identifier for which we want the last month cost

Responses
400

Bad Request

500

Internal server error

default

Returns a number having the cost of last month

get/ccm/api/perspective/lastMonthCost
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ccm/api/perspective/lastMonthCost?accountIdentifier=string&perspectiveId=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get the forecasted cost of a Perspective

Get the forecasted cost of a Perspective for next 30 days

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the entity

perspectiveId
required
string

The Perspective identifier for which we want the forecast cost

Responses
400

Bad Request

500

Internal server error

default

Returns a number having the forecast cost of a Perspective for next 30 days

get/ccm/api/perspective/forecastCost
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ccm/api/perspective/forecastCost?accountIdentifier=string&perspectiveId=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get a Perspective by identifier

Get complete CEView object by Perspective identifier passed as a url param

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the entity

perspectiveId
required
string

The identifier of the Perspective to fetch

Responses
400

Bad Request

500

Internal server error

default

Returns a CEView object with all the rules and filters, returns null if no Perspective exists for that particular identifier

get/ccm/api/perspective
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ccm/api/perspective?accountIdentifier=string&perspectiveId=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Update an existing Perspective

Update an existing Perspective, it accepts a CEView and upserts it using the uuid mentioned in the definition

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the entity

Request Body schema: application/json

Request body containing Perspective's CEView object to update

uuid
string
name
string [ 1 .. 32 ] characters
accountId
string
viewVersion
string
object (ViewTimeRange)

The time interval on which you want to create a Perspective

Array of objects (ViewRule)
dataSources
Array of strings
Items Enum: "CLUSTER" "AWS" "GCP" "AZURE" "COMMON" "CUSTOM" "BUSINESS_MAPPING" "LABEL"
object (ViewVisualization)
viewType
string
Enum: "SAMPLE" "CUSTOMER" "DEFAULT_AZURE" "DEFAULT"
viewState
string
Enum: "DRAFT" "COMPLETED"
totalCost
number <double>
createdAt
integer <int64>
lastUpdatedAt
integer <int64>
object (EmbeddedUser)
object (EmbeddedUser)
Responses
400

Bad Request

500

Internal server error

default

Upserted CEView object with all the rules and filters

put/ccm/api/perspective
Request samples
application/json
{
  • "uuid": "string",
  • "name": "string",
  • "accountId": "string",
  • "viewVersion": "string",
  • "viewTimeRange": {
    },
  • "viewRules": [
    ],
  • "dataSources": [
    ],
  • "viewVisualization": {
    },
  • "viewType": "SAMPLE",
  • "viewState": "DRAFT",
  • "totalCost": 0,
  • "createdAt": 0,
  • "lastUpdatedAt": 0,
  • "createdBy": {
    },
  • "lastUpdatedBy": {
    }
}
Response samples
application/json
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Create a Perspective

Create a Perspective, accepts a url param 'clone' which decides whether the Perspective being created should be a clone of existing Perspective, and a Request Body with the PerspectiveDefinition

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the entity

clone
required
boolean

Whether the Perspective being created should be a clone of existing Perspective, if true we will ignore the uuid field in the request body and create a completely new Perspective

Request Body schema: application/json

Request body containing Perspective's CEView object to create

uuid
string
name
string [ 1 .. 32 ] characters
accountId
string
viewVersion
string
object (ViewTimeRange)

The time interval on which you want to create a Perspective

Array of objects (ViewRule)
dataSources
Array of strings
Items Enum: "CLUSTER" "AWS" "GCP" "AZURE" "COMMON" "CUSTOM" "BUSINESS_MAPPING" "LABEL"
object (ViewVisualization)
viewType
string
Enum: "SAMPLE" "CUSTOMER" "DEFAULT_AZURE" "DEFAULT"
viewState
string
Enum: "DRAFT" "COMPLETED"
totalCost
number <double>
createdAt
integer <int64>
lastUpdatedAt
integer <int64>
object (EmbeddedUser)
object (EmbeddedUser)
Responses
400

Bad Request

500

Internal server error

default

Returns a created CEView object with all the rules and filters

post/ccm/api/perspective
Request samples
application/json
{
  • "uuid": "string",
  • "name": "string",
  • "accountId": "string",
  • "viewVersion": "string",
  • "viewTimeRange": {
    },
  • "viewRules": [
    ],
  • "dataSources": [
    ],
  • "viewVisualization": {
    },
  • "viewType": "SAMPLE",
  • "viewState": "DRAFT",
  • "totalCost": 0,
  • "createdAt": 0,
  • "lastUpdatedAt": 0,
  • "createdBy": {
    },
  • "lastUpdatedBy": {
    }
}
Response samples
application/json
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Delete a Perspective by identifier

Deletes a perspective by identifier, it accepts a mandatory CEView's identifier as url param and returns a test response on successful deletion

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the entity

perspectiveId
required
string

The identifier of the CEView object to delete

Responses
400

Bad Request

500

Internal server error

default

A string text message whether the delete was successful or not

delete/ccm/api/perspective
Request samples
curl -i -X DELETE \
  'https://app.harness.io/gateway/ccm/api/perspective?accountIdentifier=string&perspectiveId=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}