Anomalies API
Cloud cost anomaly detection offers end-to-end monitoring of spikes in your Google Cloud or Amazon Web Services billing, seamlessly, across all your projects and services. More information about cost anomalies in the CMP is available here
The Anomalies API helps you programmatically obtain cloud cost or usage anomalies for all supported platforms such as Google Cloud or Amazon Web Services with an easy-to-use RESTful API.
API Reference
The Anomalies API reference is available at https://developer.doit-intl.com/reference#anomalies
Required Permissions
Cloud Analytics (part of
Standard User
built-in role)
Anomalies API has the following methods:
anomalies.list
The anomalies.list method provides a list of all anomalies available for your cloud platforms.
You can filter the list by using one or more of the following parameters:
Parameter | Description |
---|---|
|
|
|
|
|
Supported filter keys:
Learn more about how to properly use filter *.list requests |
Sample anomalies.list Request using both minCreationTime
and filter
parameters:
curl --location --request GET 'https://api.doit-intl.com/anomalies/v1/?filter=serviceName:BigQuery&minCreationTime=1599436800000' \
--header 'Authorization: Bearer your-api-key'
your-api-key
Always replace "your-api-key" with your actual API key as explained at Getting Started
Sample anomalies.list Response:
{
"rowCount": 2,
"anomalies": [
{
"anomalyId": "7c045b29-57ee-437b-9dc0-e7e4eb005a64",
"billingAccount": "01A29B-B56F30-AA7597",
"platform": "google-cloud",
"scope": "iottempstreaming",
"serviceName": "BigQuery",
"severityLevel": "warning",
"timeFrame": "hourly",
"startTime": 1612818000000
},
{
"anomalyId": "36ba6c14-bd3c-40e3-bfa2-31189ea740b4",
"billingAccount": "01A29B-B56F30-AA7597",
"platform": "google-cloud",
"scope": "iottempstreaming",
"serviceName": "BigQuery",
"severityLevel": "critical",
"timeFrame": "daily",
"startTime": 1612656000000
}
]
}
anomalies.get
Get the full details of the individual anomaly using the anomaly id.
Sample anomalies.get Request
curl --location --request GET 'https://api.doit-intl.com/anomalies/v1/7c045b29-57ee-437b-9dc0-e7e4eb005a64' \
--header 'Authorization: Bearer your-api-key'
your-api-key
Always replace "your-api-key" with your actual API key as explained at Getting Started
Sample anomalies.get Response:
{
"anomalyChartUrl": "https://storage.googleapis.com/me-doit-intl-com-gcp-anomalies/7c045b29-57ee-437b-9dc0-e7e4eb005a64.png",
"billingAccount": "01C29B-B56F30-AA7597",
"cloudProvider": "google-cloud",
"scope": "iottempstreaming",
"serviceName": "BigQuery",
"severityLevel": "warning",
"timeFrame": "hourly",
"startTime": 1612818000000
}
Response Body
If successful, the response body contains an instance of Anomaly
{
"billingAccount":string,
"platform":string,
"scope":string,
"serviceName":string,
"severityLevel":string,
"startTime":integer,
"timeFrame":string
}
Response Body Fields
Field | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Updated about 1 year ago