OpsNow Developer Guide
  • About
  • Endpoint
    • Platform
    • Resources
  • Authentication
  • Errors
  • Rate Limiting
  • API reference
    • Platform
    • Cost
    • Resources
    • AutoSavings
    • Commitment
Powered by GitBook

© 2023 OpsNow, Inc.

On this page

Was this helpful?

Edit on GitHub
Export as PDF
  1. API reference

Cost

PreviousPlatformNextResources

Last updated 5 months ago

Was this helpful?

Anomaly History APIs

Anomaly Overview APIs

Anomaly Rules APIs

Cost Analytics APIs

Cost Analytics Filters APIs

Overview APIs

  • Anomaly History APIs
  • POSTAnomaly detection history
  • POSTAnomaly detection history detailed total daily grid list
  • POSTAnomaly detection history detailed notification result
  • POSTAnomaly detection history detail result and period chart
  • POSTManual anomaly detection history detail result and period chart
  • Anomaly Overview APIs
  • POSTTrend of anomaly detection by AI
  • POSTCost trend of cloud usage
  • POSTPotential anomalous usage data detected by AI
  • POSTSummary of detected anomalies
  • POSTSummary of detected anomalies
  • Anomaly Rules APIs
  • PUTCreate/Update an anomaly detection rule setting
  • POSTAnomaly detection rules
  • POSTSpecific anomaly detection rule
  • Cost Analytics APIs
  • POSTDetail of cost analytics
  • POSTDetail of cost analytics
  • POSTSummary of cost analytics
  • Cost Analytics Filters APIs
  • POSTFilter of Cost Analytics
  • POSTFilter of Cost Analytics
  • POSTCategory of cost analytics
  • Overview APIs
  • POSTCloud cost overview
  • POSTLatest cost collection date
  • POSTCloud account status

Anomaly detection history

post

View abnormal cost detection history list

Authorizations
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
userIdstringOptional

user id

Example: abcd
analyzeBystringRequired

Abnormal Cost Analysis Type

Example: account
analyzeTypestringRequired

Abnormal Cost AI/Manual Type

Example: manual
Responses
200
OK
*/*
post
POST /cost/v3/billing/anomaly/history/list HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 98

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "userId": "abcd",
  "analyzeBy": "account",
  "analyzeType": "manual"
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}

Anomaly detection history detailed total daily grid list

post

View ai/manual abnormal cost detection daily grid data

Authorizations
Path parameters
analyzeTypestringRequired

Analyze Type

Example: ai
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
userIdstringOptional

user id

Example: abcd
histSeqinteger · int32Required

History Seq

Example: 0
ruleSeqinteger · int32Required

Anomaly Rule Seq

Example: 0
Responses
200
OK
*/*
post
POST /cost/v3/billing/anomaly/history/detail/{analyzeType}/grid HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 77

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "userId": "abcd",
  "histSeq": 0,
  "ruleSeq": 0
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}

Anomaly detection history detailed notification result

post

View abnormal cost detection notification sent history

Authorizations
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
userIdstringOptional

user id

Example: abcd
histSeqinteger · int32Required

History Seq

Example: 0
ruleSeqinteger · int32Required

Anomaly Rule Seq

Example: 0
Responses
200
OK
*/*
post
POST /cost/v3/billing/anomaly/history/detail/sent HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 77

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "userId": "abcd",
  "histSeq": 0,
  "ruleSeq": 0
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}

Anomaly detection history detail result and period chart

post

View abnormal cost detection history details and pie chart data

Authorizations
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
userIdstringOptional

user id

Example: abcd
histSeqinteger · int32Required

History Seq

Example: 0
ruleSeqinteger · int32Required

Anomaly Rule Seq

Example: 0
Responses
200
OK
*/*
post
POST /cost/v3/billing/anomaly/history/detail/result HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 77

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "userId": "abcd",
  "histSeq": 0,
  "ruleSeq": 0
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}

Manual anomaly detection history detail result and period chart

post

View manual abnormal cost detection history details and pie chart data inquiry

Authorizations
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
userIdstringOptional

user id

Example: abcd
histSeqinteger · int32Required

History Seq

Example: 0
ruleSeqinteger · int32Required

Anomaly Rule Seq

Example: 0
Responses
200
OK
*/*
post
POST /cost/v3/billing/anomaly/history/detail/manual/period-chart HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 77

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "userId": "abcd",
  "histSeq": 0,
  "ruleSeq": 0
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}

Trend of anomaly detection by AI

post

View the trend of cost anomalies detected by AI.

Authorizations
Path parameters
vendorstringRequired

Vendor

Example: AWS
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
companyNamestringOptional

company name

Example: 1
defaultVendorstringRequired

default vendor

Example: AWS
userEmailstringOptional

user email

Example: abcd@bespingloba.com
userIdstringOptional

user id

Example: abcd
userNamestringOptional

user name

Example: abcd
vendorstringRequired

vendor

Example: AWS
sensitivitystringRequired

Sensitivity

Example: M
forecastDtstringOptional

Forecast Date

Example: 2024-06-02
Responses
200
OK
*/*
post
POST /cost/v3/billing/anomaly/vendors/{vendor}/detections/ai/trend HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 205

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "companyName": "1",
  "defaultVendor": "AWS",
  "userEmail": "abcd@bespingloba.com",
  "userId": "abcd",
  "userName": "abcd",
  "vendor": "AWS",
  "sensitivity": "M",
  "forecastDt": "2024-06-02"
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}

Cost trend of cloud usage

post

View the cost trend of cloud usage.

Authorizations
Path parameters
vendorstringRequired

Vendor

Example: AWS
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
companyNamestringOptional

company name

Example: 1
defaultVendorstringRequired

default vendor

Example: AWS
userEmailstringOptional

user email

Example: abcd@bespingloba.com
userIdstringOptional

user id

Example: abcd
userNamestringOptional

user name

Example: abcd
vendorstringOptional

vendor

Example: AWS
vendorsstring[]Optional

List of vendors

selectedVendorsByWidgetstring[]Required

Selected Vendors by Widget

Example: ["AWS"]
viewTypestringRequired

View Type

Example: account
widgetTypestringRequired

Component Type

Example: dashboard_compare_cost_trend_widget
dateTypestringOptional

Widget Date Type

Example: monthly
dataTypestringOptional

Widget Date Type (etc. monthly, weekly, daily)

Example: monthly, weekly, daily
timeFramestringRequired

Time Frame

Example: last_3_months
viewBystringRequired

View By(account,product,region)

Example: account
filterstringOptional

Filter Type(top_10_by_cost / custom)

Example: top_10_by_cost
selectedAccountstringOptional

Selected Account Filter

Example: 000000000000
selectedAccountsstring[]Optional

Selected Accounts Filter

itemstring[]Optional

Selected Items Filter

selectedTagKeystringOptional

Selected Tag Key Filter

Example: Name
selectedServiceGroupSetstringOptional

Selected Service Group Set Filter

Example: 00000000-0000-0000-0000-000000000000
widgetCurrencynumber · doubleOptional

Widget Selected Currency

sensitivitystringOptional

Sensitivity value for a specific widget

Example: M
analyzedDtstringOptional

Analysis date

Example: 2024-06-02
Responses
200
OK
*/*
post
POST /cost/v3/billing/anomaly/vendors/{vendor}/dashboard/trend HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 694

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "companyName": "1",
  "defaultVendor": "AWS",
  "userEmail": "abcd@bespingloba.com",
  "userId": "abcd",
  "userName": "abcd",
  "vendor": "AWS",
  "vendors": [
    "text"
  ],
  "selectedVendorsByWidget": [
    "AWS"
  ],
  "viewType": "account",
  "widgetType": "dashboard_compare_cost_trend_widget",
  "dateType": "monthly",
  "dataType": "monthly, weekly, daily",
  "timeFrame": "last_3_months",
  "viewBy": "account",
  "filter": "top_10_by_cost",
  "customFilter": [
    {
      "vendor": "text",
      "item": "text"
    }
  ],
  "selectedAccount": "000000000000",
  "selectedAccounts": [
    "text"
  ],
  "item": [
    "text"
  ],
  "selectedTagKey": "Name",
  "selectedServiceGroupSet": "00000000-0000-0000-0000-000000000000",
  "widgetCurrency": 1,
  "sensitivity": "M",
  "analyzedDt": "2024-06-02"
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}

Potential anomalous usage data detected by AI

post

View the usage data that may lead to ai-predicted anomalous costs

Authorizations
Path parameters
vendorstringRequired

Vendor

Example: AWS
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
companyNamestringOptional

company name

Example: 1
defaultVendorstringRequired

default vendor

Example: AWS
userEmailstringOptional

user email

Example: abcd@bespingloba.com
userIdstringOptional

user id

Example: abcd
userNamestringOptional

user name

Example: abcd
vendorstringOptional

vendor

Example: AWS
selectedVendorsByWidgetstring[]Required

Selected Vendors by Widget

Example: ["AWS","GCP"]
sensitivitystringRequired

Sensitivity

Example: M
forecastDatestringRequired

Forecast Date

Example: 2024-09-23
Responses
200
OK
*/*
post
POST /cost/v3/billing/anomaly/vendors/{vendor}/anomaly/aiPossibleCause HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 247

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "companyName": "1",
  "defaultVendor": "AWS",
  "userEmail": "abcd@bespingloba.com",
  "userId": "abcd",
  "userName": "abcd",
  "vendor": "AWS",
  "selectedVendorsByWidget": [
    "AWS",
    "GCP"
  ],
  "sensitivity": "M",
  "forecastDate": "2024-09-23"
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}

Summary of detected anomalies

post

View the number of triggered alerts and abnormal cost information by cloud vendor and type.

Authorizations
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
userIdstringOptional

user id

Example: abcd
vendorsstring[]Required

List of vendors

Example: ["AWS"]
Responses
200
OK
*/*
post
POST /cost/v3/billing/anomaly/vendors/aggregate HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "userId": "abcd",
  "vendors": [
    "AWS"
  ]
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}

Summary of detected anomalies

post

View the number of triggered alerts and abnormal cost information by cloud vendor and type.

Authorizations
Path parameters
vendorstringRequired

Vendor

Example: AWS
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
userIdstringOptional

user id

Example: abcd
vendorsstring[]Required

List of vendors

Example: ["AWS"]
Responses
200
OK
*/*
post
POST /cost/v3/billing/anomaly/vendors/{vendor}/aggregate HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "userId": "abcd",
  "vendors": [
    "AWS"
  ]
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}

Create/Update an anomaly detection rule setting

put

Create or update the setting of anomaly detection rule.

Authorizations
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
companyNamestringOptional

company name

Example: 1
defaultVendorstringRequired

default vendor

Example: AWS
userEmailstringOptional

user email

Example: abcd@bespingloba.com
userIdstringOptional

user id

Example: abcd
userNamestringOptional

user name

Example: abcd
vendorstringOptional

vendor

Example: AWS
seqinteger · int32Optional

Anomaly Rule Seq

Example: 0
namestringOptional

Anomaly Rule Name

Example: Name
analyzeTypestringRequired

Abnormal Cost AI/Manual Type

Example: manual
analyzeBystringRequired

Abnormal Cost Analysis Type

Example: account
sensitivitystringRequired

Sensitivity

Example: M
thValnumber · doubleOptional

Threshold value

Example: 1
thOptstringOptional

Threshold detection options(percentage/amount)

Example: percentage
alertStatusstringOptional

Alarm Setting Status(active/inactive)

Example: inactive
alertFreqstringOptional

Alarm Frequency(daily, weekly)

Example: daily
alertOptstringOptional

Alarm Option(only, all)

Example: only
receiversstringOptional

Alarm recipients

useYnstringOptional

Alarm Enabled

Example: Y
forecastDtstringOptional

Forecast Date

Example: 2024-06-02
analyzedDtstringOptional

Analysis date

Example: 2024-06-02
viewBystringOptional

View By

Example: account
Responses
200
OK
*/*
put
PUT /cost/v3/billing/anomaly/vendors/detections/alerts/rule/setting HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 442

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "companyName": "1",
  "defaultVendor": "AWS",
  "userEmail": "abcd@bespingloba.com",
  "userId": "abcd",
  "userName": "abcd",
  "vendor": "AWS",
  "seq": 0,
  "name": "Name",
  "analyzeType": "manual",
  "analyzeBy": "account",
  "sensitivity": "M",
  "thVal": 1,
  "thOpt": "percentage",
  "alertStatus": "inactive",
  "alertFreq": "daily",
  "alertOpt": "only",
  "receivers": "text",
  "useYn": "Y",
  "forecastDt": "2024-06-02",
  "analyzedDt": "2024-06-02",
  "viewBy": "account"
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}

Anomaly detection rules

post

View the rules for detecting anomalies and sending alerts.

Authorizations
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
companyNamestringOptional

company name

Example: 1
defaultVendorstringRequired

default vendor

Example: AWS
userEmailstringOptional

user email

Example: abcd@bespingloba.com
userIdstringOptional

user id

Example: abcd
userNamestringOptional

user name

Example: abcd
vendorstringOptional

vendor

Example: AWS
Responses
200
OK
*/*
post
POST /cost/v3/billing/anomaly/vendors/detections/alerts/rule HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 161

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "companyName": "1",
  "defaultVendor": "AWS",
  "userEmail": "abcd@bespingloba.com",
  "userId": "abcd",
  "userName": "abcd",
  "vendor": "AWS"
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}

Specific anomaly detection rule

post

View the specific rule for detecting anomalies and sending alerts.

Authorizations
Path parameters
seqinteger · int32Required

Rule Seq

Example: 0
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
companyNamestringOptional

company name

Example: 1
defaultVendorstringRequired

default vendor

Example: AWS
userEmailstringOptional

user email

Example: abcd@bespingloba.com
userIdstringOptional

user id

Example: abcd
userNamestringOptional

user name

Example: abcd
vendorstringOptional

vendor

Example: AWS
seqinteger · int32Optional

Anomaly Rule Seq

Example: 0
Responses
200
OK
*/*
post
POST /cost/v3/billing/anomaly/vendors/detections/alerts/rule/{seq} HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 169

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "companyName": "1",
  "defaultVendor": "AWS",
  "userEmail": "abcd@bespingloba.com",
  "userId": "abcd",
  "userName": "abcd",
  "vendor": "AWS",
  "seq": 0
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}

Detail of cost analytics

post

View detailed portion chart data of cost analytics

Authorizations
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
userIdstringOptional

user id

Example: abcd
selectedVendorstringRequiredExample: AWS
costDatestringRequiredExample: 2019-08-12
startDatestringRequiredExample: 2023-02-01
endDatestringRequiredExample: 2024-02-12
viewBystringRequiredExample: account
viewByIdstringOptional
viewByItemstringRequiredExample: 216093335544
itemViewIdstringRequiredExample: 216093335544
visibleFieldsstring[]Required

VisibleFields of detail grid

Example: ["vendor","linkedAccountId","productName","region","usage","cost","usageType"]
isMonthlybooleanRequiredExample: false
Responses
200
OK
*/*
post
POST /cost/v3/billing/analytics/daily-portion HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 2043

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "userId": "abcd",
  "selectedVendor": "AWS",
  "costDate": "2019-08-12",
  "startDate": "2023-02-01",
  "endDate": "2024-02-12",
  "viewBy": "account",
  "viewById": "text",
  "viewByItem": "216093335544",
  "itemViewId": "216093335544",
  "filters": {
    "aws": {
      "linkedAccountId": [
        "text"
      ],
      "productCode": [
        "text"
      ],
      "region": [
        "text"
      ],
      "productFamily": [
        "text"
      ],
      "tags": [
        {
          "tagKey": "text",
          "tagValue": "text"
        }
      ],
      "serviceGroup": [
        {
          "serviceGroupKey": "text",
          "serviceGroupValue": "text",
          "serviceGroupSetNm": "text",
          "serviceGroupSetId": "text",
          "serviceGroupNm": "text",
          "serviceGroupId": "text",
          "dfltYn": "text"
        }
      ],
      "instanceType": [
        "text"
      ],
      "instanceTypeFamily": [
        "text"
      ],
      "chargeType": [
        "text"
      ],
      "os": [
        "text"
      ],
      "database": [
        "text"
      ],
      "transferType": [
        "text"
      ],
      "purchaseOption": [
        "text"
      ],
      "apiOperation": [
        "text"
      ],
      "resourceId": [
        "text"
      ],
      "usageType": [
        "text"
      ],
      "invoiceId": [
        "text"
      ],
      "itemDescription": [
        "text"
      ],
      "cacheEngine": [
        "text"
      ],
      "availabilityZone": [
        "text"
      ],
      "platform": [
        "text"
      ]
    },
    "azure": {
      "linkedAccountId": [
        "text"
      ],
      "productCode": [
        "text"
      ],
      "region": [
        "text"
      ],
      "productFamily": [
        "text"
      ],
      "tags": [
        {
          "tagKey": "text",
          "tagValue": "text"
        }
      ],
      "serviceGroup": [
        {
          "serviceGroupKey": "text",
          "serviceGroupValue": "text",
          "serviceGroupSetNm": "text",
          "serviceGroupSetId": "text",
          "serviceGroupNm": "text",
          "serviceGroupId": "text",
          "dfltYn": "text"
        }
      ],
      "subscriptionNm": [
        "text"
      ],
      "subscriptionId": [
        "text"
      ],
      "infraType": [
        "text"
      ],
      "mtCategory": [
        "text"
      ],
      "mtName": [
        "text"
      ],
      "usage": [
        "text"
      ],
      "unitPrice": [
        "text"
      ],
      "totalCost": [
        "text"
      ]
    },
    "gcp": {
      "linkedAccountId": [
        "text"
      ],
      "productCode": [
        "text"
      ],
      "region": [
        "text"
      ],
      "productFamily": [
        "text"
      ],
      "tags": [
        {
          "tagKey": "text",
          "tagValue": "text"
        }
      ],
      "serviceGroup": [
        {
          "serviceGroupKey": "text",
          "serviceGroupValue": "text",
          "serviceGroupSetNm": "text",
          "serviceGroupSetId": "text",
          "serviceGroupNm": "text",
          "serviceGroupId": "text",
          "dfltYn": "text"
        }
      ]
    }
  },
  "detailFilters": {
    "linkedAccountId": [
      "text"
    ],
    "productCode": [
      "text"
    ],
    "region": [
      "text"
    ],
    "usageType": [
      "text"
    ]
  },
  "visibleFields": [
    "vendor",
    "linkedAccountId",
    "productName",
    "region",
    "usage",
    "cost",
    "usageType"
  ],
  "tags": [
    {
      "tagKey": "text",
      "tagValue": "text"
    }
  ],
  "isMonthly": false
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}

Detail of cost analytics

post

View detailed grid of cost analytics

Authorizations
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
userIdstringOptional

user id

Example: abcd
selectedVendorstringRequiredExample: AWS
costDatestringRequiredExample: 2019-08-12
startDatestringRequiredExample: 2023-02-01
endDatestringRequiredExample: 2024-02-12
viewBystringRequiredExample: account
viewByIdstringOptional
viewByItemstringRequiredExample: 216093335544
itemViewIdstringRequiredExample: 216093335544
visibleFieldsstring[]Required

VisibleFields of detail grid

Example: ["vendor","linkedAccountId","productName","region","usage","cost","usageType"]
isMonthlybooleanRequiredExample: false
Responses
200
OK
*/*
post
POST /cost/v3/billing/analytics/daily-cost HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 2043

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "userId": "abcd",
  "selectedVendor": "AWS",
  "costDate": "2019-08-12",
  "startDate": "2023-02-01",
  "endDate": "2024-02-12",
  "viewBy": "account",
  "viewById": "text",
  "viewByItem": "216093335544",
  "itemViewId": "216093335544",
  "filters": {
    "aws": {
      "linkedAccountId": [
        "text"
      ],
      "productCode": [
        "text"
      ],
      "region": [
        "text"
      ],
      "productFamily": [
        "text"
      ],
      "tags": [
        {
          "tagKey": "text",
          "tagValue": "text"
        }
      ],
      "serviceGroup": [
        {
          "serviceGroupKey": "text",
          "serviceGroupValue": "text",
          "serviceGroupSetNm": "text",
          "serviceGroupSetId": "text",
          "serviceGroupNm": "text",
          "serviceGroupId": "text",
          "dfltYn": "text"
        }
      ],
      "instanceType": [
        "text"
      ],
      "instanceTypeFamily": [
        "text"
      ],
      "chargeType": [
        "text"
      ],
      "os": [
        "text"
      ],
      "database": [
        "text"
      ],
      "transferType": [
        "text"
      ],
      "purchaseOption": [
        "text"
      ],
      "apiOperation": [
        "text"
      ],
      "resourceId": [
        "text"
      ],
      "usageType": [
        "text"
      ],
      "invoiceId": [
        "text"
      ],
      "itemDescription": [
        "text"
      ],
      "cacheEngine": [
        "text"
      ],
      "availabilityZone": [
        "text"
      ],
      "platform": [
        "text"
      ]
    },
    "azure": {
      "linkedAccountId": [
        "text"
      ],
      "productCode": [
        "text"
      ],
      "region": [
        "text"
      ],
      "productFamily": [
        "text"
      ],
      "tags": [
        {
          "tagKey": "text",
          "tagValue": "text"
        }
      ],
      "serviceGroup": [
        {
          "serviceGroupKey": "text",
          "serviceGroupValue": "text",
          "serviceGroupSetNm": "text",
          "serviceGroupSetId": "text",
          "serviceGroupNm": "text",
          "serviceGroupId": "text",
          "dfltYn": "text"
        }
      ],
      "subscriptionNm": [
        "text"
      ],
      "subscriptionId": [
        "text"
      ],
      "infraType": [
        "text"
      ],
      "mtCategory": [
        "text"
      ],
      "mtName": [
        "text"
      ],
      "usage": [
        "text"
      ],
      "unitPrice": [
        "text"
      ],
      "totalCost": [
        "text"
      ]
    },
    "gcp": {
      "linkedAccountId": [
        "text"
      ],
      "productCode": [
        "text"
      ],
      "region": [
        "text"
      ],
      "productFamily": [
        "text"
      ],
      "tags": [
        {
          "tagKey": "text",
          "tagValue": "text"
        }
      ],
      "serviceGroup": [
        {
          "serviceGroupKey": "text",
          "serviceGroupValue": "text",
          "serviceGroupSetNm": "text",
          "serviceGroupSetId": "text",
          "serviceGroupNm": "text",
          "serviceGroupId": "text",
          "dfltYn": "text"
        }
      ]
    }
  },
  "detailFilters": {
    "linkedAccountId": [
      "text"
    ],
    "productCode": [
      "text"
    ],
    "region": [
      "text"
    ],
    "usageType": [
      "text"
    ]
  },
  "visibleFields": [
    "vendor",
    "linkedAccountId",
    "productName",
    "region",
    "usage",
    "cost",
    "usageType"
  ],
  "tags": [
    {
      "tagKey": "text",
      "tagValue": "text"
    }
  ],
  "isMonthly": false
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}

Summary of cost analytics

post

View summary of cost analytics

Authorizations
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
userIdstringOptional

user id

Example: abcd
startDatestringRequired

start date

Example: 2023-02-01
endDatestringRequired

end date

Example: 2024-02-12
itemsPerPageinteger · int64Required

items per page

Example: 30
pageinteger · int64Required

page number

Example: 1
userNamestringOptional

user name

Example: abcd
viewBystringRequired

view by

Example: account
selectedVendorsstring[]Required

selected vendors

Example: ["AWS"]
isMonthlybooleanRequired

monthly

Example: false
Responses
200
OK
*/*
post
POST /cost/v3/billing/analytics/cost HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 1746

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "userId": "abcd",
  "startDate": "2023-02-01",
  "endDate": "2024-02-12",
  "itemsPerPage": 30,
  "page": 1,
  "userName": "abcd",
  "viewBy": "account",
  "selectedVendors": [
    "AWS"
  ],
  "filters": {
    "aws": {
      "linkedAccountId": [
        "text"
      ],
      "productCode": [
        "text"
      ],
      "region": [
        "text"
      ],
      "productFamily": [
        "text"
      ],
      "tags": [
        {
          "tagKey": "text",
          "tagValue": "text"
        }
      ],
      "serviceGroup": [
        {
          "serviceGroupKey": "text",
          "serviceGroupValue": "text",
          "serviceGroupSetNm": "text",
          "serviceGroupSetId": "text",
          "serviceGroupNm": "text",
          "serviceGroupId": "text",
          "dfltYn": "text"
        }
      ],
      "instanceType": [
        "text"
      ],
      "instanceTypeFamily": [
        "text"
      ],
      "chargeType": [
        "text"
      ],
      "os": [
        "text"
      ],
      "database": [
        "text"
      ],
      "transferType": [
        "text"
      ],
      "purchaseOption": [
        "text"
      ],
      "apiOperation": [
        "text"
      ],
      "resourceId": [
        "text"
      ],
      "usageType": [
        "text"
      ],
      "invoiceId": [
        "text"
      ],
      "itemDescription": [
        "text"
      ],
      "cacheEngine": [
        "text"
      ],
      "availabilityZone": [
        "text"
      ],
      "platform": [
        "text"
      ]
    },
    "azure": {
      "linkedAccountId": [
        "text"
      ],
      "productCode": [
        "text"
      ],
      "region": [
        "text"
      ],
      "productFamily": [
        "text"
      ],
      "tags": [
        {
          "tagKey": "text",
          "tagValue": "text"
        }
      ],
      "serviceGroup": [
        {
          "serviceGroupKey": "text",
          "serviceGroupValue": "text",
          "serviceGroupSetNm": "text",
          "serviceGroupSetId": "text",
          "serviceGroupNm": "text",
          "serviceGroupId": "text",
          "dfltYn": "text"
        }
      ],
      "subscriptionNm": [
        "text"
      ],
      "subscriptionId": [
        "text"
      ],
      "infraType": [
        "text"
      ],
      "mtCategory": [
        "text"
      ],
      "mtName": [
        "text"
      ],
      "usage": [
        "text"
      ],
      "unitPrice": [
        "text"
      ],
      "totalCost": [
        "text"
      ]
    },
    "gcp": {
      "linkedAccountId": [
        "text"
      ],
      "productCode": [
        "text"
      ],
      "region": [
        "text"
      ],
      "productFamily": [
        "text"
      ],
      "tags": [
        {
          "tagKey": "text",
          "tagValue": "text"
        }
      ],
      "serviceGroup": [
        {
          "serviceGroupKey": "text",
          "serviceGroupValue": "text",
          "serviceGroupSetNm": "text",
          "serviceGroupSetId": "text",
          "serviceGroupNm": "text",
          "serviceGroupId": "text",
          "dfltYn": "text"
        }
      ]
    }
  },
  "isMonthly": false
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}

Filter of Cost Analytics

post

View Cost Analytics filter

Authorizations
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
userIdstringOptional

user id

Example: abcd
startDatestringRequired

Cost Analytics inquiry start date

Example: 2024-09-01
endDatestringRequired

Cost Analytics inquiry end date

Example: 2024-09-30
viewBystringOptional

View By

Example: account
fieldstringOptional

Filter query category

Example: platform
selectedKeystringOptional

Selected Key

Example: test
searchTextstringOptional

Search Text

Example: test
selectedVendorsstring[]Required

selected vendors

Example: ["AWS"]
Responses
200
OK
*/*
post
POST /cost/v3/billing/analytics/related HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 1746

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "userId": "abcd",
  "conditions": {
    "aws": {
      "linkedAccountId": [
        "text"
      ],
      "productCode": [
        "text"
      ],
      "region": [
        "text"
      ],
      "productFamily": [
        "text"
      ],
      "tags": [
        {
          "tagKey": "text",
          "tagValue": "text"
        }
      ],
      "serviceGroup": [
        {
          "serviceGroupKey": "text",
          "serviceGroupValue": "text",
          "serviceGroupSetNm": "text",
          "serviceGroupSetId": "text",
          "serviceGroupNm": "text",
          "serviceGroupId": "text",
          "dfltYn": "text"
        }
      ],
      "instanceType": [
        "text"
      ],
      "instanceTypeFamily": [
        "text"
      ],
      "chargeType": [
        "text"
      ],
      "os": [
        "text"
      ],
      "database": [
        "text"
      ],
      "transferType": [
        "text"
      ],
      "purchaseOption": [
        "text"
      ],
      "apiOperation": [
        "text"
      ],
      "resourceId": [
        "text"
      ],
      "usageType": [
        "text"
      ],
      "invoiceId": [
        "text"
      ],
      "itemDescription": [
        "text"
      ],
      "cacheEngine": [
        "text"
      ],
      "availabilityZone": [
        "text"
      ],
      "platform": [
        "text"
      ]
    },
    "azure": {
      "linkedAccountId": [
        "text"
      ],
      "productCode": [
        "text"
      ],
      "region": [
        "text"
      ],
      "productFamily": [
        "text"
      ],
      "tags": [
        {
          "tagKey": "text",
          "tagValue": "text"
        }
      ],
      "serviceGroup": [
        {
          "serviceGroupKey": "text",
          "serviceGroupValue": "text",
          "serviceGroupSetNm": "text",
          "serviceGroupSetId": "text",
          "serviceGroupNm": "text",
          "serviceGroupId": "text",
          "dfltYn": "text"
        }
      ],
      "subscriptionNm": [
        "text"
      ],
      "subscriptionId": [
        "text"
      ],
      "infraType": [
        "text"
      ],
      "mtCategory": [
        "text"
      ],
      "mtName": [
        "text"
      ],
      "usage": [
        "text"
      ],
      "unitPrice": [
        "text"
      ],
      "totalCost": [
        "text"
      ]
    },
    "gcp": {
      "linkedAccountId": [
        "text"
      ],
      "productCode": [
        "text"
      ],
      "region": [
        "text"
      ],
      "productFamily": [
        "text"
      ],
      "tags": [
        {
          "tagKey": "text",
          "tagValue": "text"
        }
      ],
      "serviceGroup": [
        {
          "serviceGroupKey": "text",
          "serviceGroupValue": "text",
          "serviceGroupSetNm": "text",
          "serviceGroupSetId": "text",
          "serviceGroupNm": "text",
          "serviceGroupId": "text",
          "dfltYn": "text"
        }
      ]
    }
  },
  "startDate": "2024-09-01",
  "endDate": "2024-09-30",
  "viewBy": "account",
  "field": "platform",
  "selectedKey": "test",
  "searchText": "test",
  "selectedVendors": [
    "AWS"
  ]
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}

Filter of Cost Analytics

post

View Cost Analytics filter

Authorizations
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
userIdstringOptional

user id

Example: abcd
startDatestringRequired

Cost Analytics inquiry start date

Example: 2024-09-01
endDatestringRequired

Cost Analytics inquiry end date

Example: 2024-09-30
viewBystringOptional

View By

Example: account
fieldstringOptional

Filter query category

Example: platform
selectedKeystringOptional

Selected Key

Example: test
searchTextstringOptional

Search Text

Example: test
selectedVendorsstring[]Required

selected vendors

Example: ["AWS"]
Responses
200
OK
*/*
post
POST /cost/v3/billing/analytics/filter HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 1746

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "userId": "abcd",
  "conditions": {
    "aws": {
      "linkedAccountId": [
        "text"
      ],
      "productCode": [
        "text"
      ],
      "region": [
        "text"
      ],
      "productFamily": [
        "text"
      ],
      "tags": [
        {
          "tagKey": "text",
          "tagValue": "text"
        }
      ],
      "serviceGroup": [
        {
          "serviceGroupKey": "text",
          "serviceGroupValue": "text",
          "serviceGroupSetNm": "text",
          "serviceGroupSetId": "text",
          "serviceGroupNm": "text",
          "serviceGroupId": "text",
          "dfltYn": "text"
        }
      ],
      "instanceType": [
        "text"
      ],
      "instanceTypeFamily": [
        "text"
      ],
      "chargeType": [
        "text"
      ],
      "os": [
        "text"
      ],
      "database": [
        "text"
      ],
      "transferType": [
        "text"
      ],
      "purchaseOption": [
        "text"
      ],
      "apiOperation": [
        "text"
      ],
      "resourceId": [
        "text"
      ],
      "usageType": [
        "text"
      ],
      "invoiceId": [
        "text"
      ],
      "itemDescription": [
        "text"
      ],
      "cacheEngine": [
        "text"
      ],
      "availabilityZone": [
        "text"
      ],
      "platform": [
        "text"
      ]
    },
    "azure": {
      "linkedAccountId": [
        "text"
      ],
      "productCode": [
        "text"
      ],
      "region": [
        "text"
      ],
      "productFamily": [
        "text"
      ],
      "tags": [
        {
          "tagKey": "text",
          "tagValue": "text"
        }
      ],
      "serviceGroup": [
        {
          "serviceGroupKey": "text",
          "serviceGroupValue": "text",
          "serviceGroupSetNm": "text",
          "serviceGroupSetId": "text",
          "serviceGroupNm": "text",
          "serviceGroupId": "text",
          "dfltYn": "text"
        }
      ],
      "subscriptionNm": [
        "text"
      ],
      "subscriptionId": [
        "text"
      ],
      "infraType": [
        "text"
      ],
      "mtCategory": [
        "text"
      ],
      "mtName": [
        "text"
      ],
      "usage": [
        "text"
      ],
      "unitPrice": [
        "text"
      ],
      "totalCost": [
        "text"
      ]
    },
    "gcp": {
      "linkedAccountId": [
        "text"
      ],
      "productCode": [
        "text"
      ],
      "region": [
        "text"
      ],
      "productFamily": [
        "text"
      ],
      "tags": [
        {
          "tagKey": "text",
          "tagValue": "text"
        }
      ],
      "serviceGroup": [
        {
          "serviceGroupKey": "text",
          "serviceGroupValue": "text",
          "serviceGroupSetNm": "text",
          "serviceGroupSetId": "text",
          "serviceGroupNm": "text",
          "serviceGroupId": "text",
          "dfltYn": "text"
        }
      ]
    }
  },
  "startDate": "2024-09-01",
  "endDate": "2024-09-30",
  "viewBy": "account",
  "field": "platform",
  "selectedKey": "test",
  "searchText": "test",
  "selectedVendors": [
    "AWS"
  ]
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}

Category of cost analytics

post

View Category of cost analytics

Authorizations
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
userIdstringOptional

user id

Example: abcd
startDatestringRequired

Cost Analytics inquiry start date

Example: 2024-09-01
endDatestringRequired

Cost Analytics inquiry end date

Example: 2024-09-30
viewBystringOptional

View By

Example: account
fieldstringOptional

Filter query category

Example: platform
selectedKeystringOptional

Selected Key

Example: test
searchTextstringOptional

Search Text

Example: test
selectedVendorsstring[]Required

selected vendors

Example: ["AWS"]
Responses
200
OK
*/*
post
POST /cost/v3/billing/analytics/filter/category HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 1746

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "userId": "abcd",
  "conditions": {
    "aws": {
      "linkedAccountId": [
        "text"
      ],
      "productCode": [
        "text"
      ],
      "region": [
        "text"
      ],
      "productFamily": [
        "text"
      ],
      "tags": [
        {
          "tagKey": "text",
          "tagValue": "text"
        }
      ],
      "serviceGroup": [
        {
          "serviceGroupKey": "text",
          "serviceGroupValue": "text",
          "serviceGroupSetNm": "text",
          "serviceGroupSetId": "text",
          "serviceGroupNm": "text",
          "serviceGroupId": "text",
          "dfltYn": "text"
        }
      ],
      "instanceType": [
        "text"
      ],
      "instanceTypeFamily": [
        "text"
      ],
      "chargeType": [
        "text"
      ],
      "os": [
        "text"
      ],
      "database": [
        "text"
      ],
      "transferType": [
        "text"
      ],
      "purchaseOption": [
        "text"
      ],
      "apiOperation": [
        "text"
      ],
      "resourceId": [
        "text"
      ],
      "usageType": [
        "text"
      ],
      "invoiceId": [
        "text"
      ],
      "itemDescription": [
        "text"
      ],
      "cacheEngine": [
        "text"
      ],
      "availabilityZone": [
        "text"
      ],
      "platform": [
        "text"
      ]
    },
    "azure": {
      "linkedAccountId": [
        "text"
      ],
      "productCode": [
        "text"
      ],
      "region": [
        "text"
      ],
      "productFamily": [
        "text"
      ],
      "tags": [
        {
          "tagKey": "text",
          "tagValue": "text"
        }
      ],
      "serviceGroup": [
        {
          "serviceGroupKey": "text",
          "serviceGroupValue": "text",
          "serviceGroupSetNm": "text",
          "serviceGroupSetId": "text",
          "serviceGroupNm": "text",
          "serviceGroupId": "text",
          "dfltYn": "text"
        }
      ],
      "subscriptionNm": [
        "text"
      ],
      "subscriptionId": [
        "text"
      ],
      "infraType": [
        "text"
      ],
      "mtCategory": [
        "text"
      ],
      "mtName": [
        "text"
      ],
      "usage": [
        "text"
      ],
      "unitPrice": [
        "text"
      ],
      "totalCost": [
        "text"
      ]
    },
    "gcp": {
      "linkedAccountId": [
        "text"
      ],
      "productCode": [
        "text"
      ],
      "region": [
        "text"
      ],
      "productFamily": [
        "text"
      ],
      "tags": [
        {
          "tagKey": "text",
          "tagValue": "text"
        }
      ],
      "serviceGroup": [
        {
          "serviceGroupKey": "text",
          "serviceGroupValue": "text",
          "serviceGroupSetNm": "text",
          "serviceGroupSetId": "text",
          "serviceGroupNm": "text",
          "serviceGroupId": "text",
          "dfltYn": "text"
        }
      ]
    }
  },
  "startDate": "2024-09-01",
  "endDate": "2024-09-30",
  "viewBy": "account",
  "field": "platform",
  "selectedKey": "test",
  "searchText": "test",
  "selectedVendors": [
    "AWS"
  ]
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}

Cloud cost overview

post

View cloud costs from the previous period and the estimated costs for the current month.

Authorizations
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
companyNamestringOptional

company name

Example: 1
defaultVendorstringRequired

default vendor

Example: AWS
userEmailstringOptional

user email

Example: abcd@bespingloba.com
userIdstringOptional

user id

Example: abcd
userNamestringOptional

user name

Example: abcd
vendorstringOptional

vendor

Example: AWS
selectedVendorstringRequired

selected Vendor

Example: AWS
endDatestringOptional

The last date to include in the data range (inclusive). If not provided, defaults to the UTC current date.

Responses
200
OK
*/*
post
POST /cost/v3/billing/overview/spend HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 201

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "companyName": "1",
  "defaultVendor": "AWS",
  "userEmail": "abcd@bespingloba.com",
  "userId": "abcd",
  "userName": "abcd",
  "vendor": "AWS",
  "selectedVendor": "AWS",
  "endDate": "text"
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}

Latest cost collection date

post

View the latest cloud costs collection date of each vendor.

Authorizations
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
companyNamestringOptional

company name

Example: 1
defaultVendorstringRequired

default vendor

Example: AWS
userEmailstringOptional

user email

Example: abcd@bespingloba.com
userIdstringOptional

user id

Example: abcd
userNamestringOptional

user name

Example: abcd
vendorstringOptional

vendor

Example: AWS
Responses
200
OK
*/*
post
POST /cost/v3/billing/overview/companyMaxDate HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 161

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "companyName": "1",
  "defaultVendor": "AWS",
  "userEmail": "abcd@bespingloba.com",
  "userId": "abcd",
  "userName": "abcd",
  "vendor": "AWS"
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}

Cloud account status

post

View cloud accounts and status from specific vendor

Authorizations
Body
siteCodestringRequired

site code

Example: BESPIN
companyIdstringRequired

company id

Example: 1
userIdstringOptional

user id

Example: abcd
vendorstringRequired

vendor

Example: AWS
Responses
200
OK
*/*
post
POST /cost/v3/billing/overview/accounts HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 68

{
  "siteCode": "BESPIN",
  "companyId": "1",
  "userId": "abcd",
  "vendor": "AWS"
}
200

OK

{
  "status": "success",
  "error": {
    "code": "OK",
    "message": "Error Message"
  }
}