API Reference Guide

Introduction

Below is the list of CloudCheckr API calls. Most calls can be made against general CloudCheckr accounts, or against CloudCheckr Multi-Account Views where noted.

New API Documentation Structure

CloudCheckr is revamping its API documentation to ensure that it reflects the best practices for REST and to improve overall consistency. We will restructure each call to include these sections:

Section Description
Input Parameters Options that you pass with the endpoint to influence a response.

Identifies if a parameter is required or optional, the data type, and the parameter description.

API Call URL Identifies the common path for the API (highlighted in yellow) and the end path of the endpoint (highlighted in light blue).

Request Example Includes a sample request that shows the endpoint and a few key parameters.

Formatted in curl since it’s language-agnostic.

Includes the header information and the method (GET or POST in most cases).

Response Example Shows a sample response for all of the parameters passed in the request example.

Includes examples in XML and JSON.


See Also:
API User Guide
Admin API Reference Guide
API Reference Guide (Inventory)
Azure API Reference Guide
Deprecated API Calls
Deprecated Admin API Calls


API Calls

account/get_improperly_tagged_resources
alert/add_cost_alert*
alert/add_cost_alert_percent
alert/delete_cost_alert*
alert/delete_cost_alert_percent
alert/edit_cost_alert_percent
alert/get_cost_alert_percent
alert/get_cost_alert_results*
alert/get_resources_alert_results*
alert/get_utilization_alert_results*
best_practice/get_best_practices_v2
billing/add_tag_rule
billing/create_customer*
billing/create_detailed_billing_grouped_filter
billing/delete_detailed_billing_grouped_filter
billing/delete_tag_rule
billing/get_billing_detailed_grouped_pdf
billing/get_cost_saving
billing/get_dashboard
billing/get_ec2_reserved_instance_rebalancer_ec2_instances_v2
billing/get_detailed_billing_analysis*
billing/get_detailed_billing_file*
billing/get_detailed_billing_with_grouping_v2
billing/get_invoice*
billing/get_invoice_customers*
billing/get_monthly_bill
billing/get_ri_upfront_cost_amortization*
billing/get_tag_rules
billing/edit_payee_support_charges
billing/schedule_invoice
billing/schedule_report_email_advanced_grouping

change_monitoring/get_changes*
cloudwatch/get_history*
help/get_all_api_endpoints
inventory/get_resources
security/get_cloudtrail_alert_results_v2
security/get_cloudtrail_custom_metrics
security/get_publicly_accessible_resources

* these calls are not compatible with Multi-Account Views.

USING ACCESS KEYS

CloudCheckr requires an access key to be passed as a parameter to all API calls.

Note: An admin-level Access key is needed to make calls which affect any account functions. A general access key will not be able to authorize these types of calls and will result in an error.

Click here for details on creating and managing access keys.

Example of Using an Access Key:

https://api.cloudcheckr.com/api/change_monitoring.json/get_changes?access_key=[access_key]

Access Keys are 64 bytes long and have the following format.

56422A55E6B340239D6F472537128F979A86766B738C4BD1AC29F1F42DFEF55A

Putting It All Together:

https://api.cloudcheckr.com/api/change_monitoring.json/get_changes?access_key=56422A55E6B340239D6F472537128F979A86766B738C4BD1AC29F1F42DFEF55A

API PAGINATION

When you select from the API, it returns up to 100 results. If the output of your call contains more than 100 results, CloudCheckr will pass back a token allowing you to get the next 100 results, which you should pass to the API to get the next set of 100 results.

For more information on using pagination with the CloudCheckr API please go here: https://support.cloudcheckr.com/cloudcheckr-api-userguide/#api_pagination


PREFERRED HTTP METHODS

When using libraries such as curl, you may need to indicate the HTTP method to use (POST or GET). The CloudCheckr API accepts both POST and GET in most API calls. However, we recommend you use the preferred HTTP method.

The preferred HTTP method for each call is GET unless specifically note in the API CALLS section.

For more information on HTTP methods, click here: http://www.w3schools.com/tags/ref_httpmethods.asp


OPTIONAL DATE PARAMETER FOR INVENTORY-RELATED API CALLS

For all inventory-related calls, you can use the option parameter “date”. By passing in “date” you can select the day for which to return the inventory. If date is not defined, the most recent inventory will be returned. If there is not a specific inventory for the date, CloudCheckr will attempt to use the last previous inventory to the date passed in.

XML call:

https://api.cloudcheckr.com/api/best_practice.xml/get_best_practices?access_key=[access_key]&date=2015-10-23

JSON call:

https://api.cloudcheckr.com/api/best_practice.json/get_best_practices?access_key=[access_key]&date=2015-10-23

The API response will include “DateOfResults”:”2015-11-23T20:13:03″ which will allow you to determine what specific date the inventory is for.


TROUBLESHOOTING

For help with troubleshooting common API issues, click here.


API CALLS

GET IMPROPERLY TAGGED RESOURCES

The API method, “get_improperly_tagged_resources”, is used to get the resources that were improperly tagged.

Note:

  • This call can only be made using the account-level access key.
  • The HTTP method for this call is GET.

INPUT PARAMETERS:

date_toDateTimeoptional; identities the date that the customer wants to end the search for improperly tagged resources

Parameter Type Description
access_key string required; account-level API key
cloud_provider string required; name of one of the following cloud providers: Amazon AWS and Windows Azure
date_from DateTime optional; identities the date that the customer wants to begin the search for improperly tagged resources
aws_account_id string optional; the 12-digit AWS account ID (must be payer account)

Note: This parameter is only needed for AWS accounts.

rule_name string optional; the name of the rule on which to filter in the search
resource_type string optional; the name of the resource on which to filter in the search
resource_state string optional; the state of the resource on which to filter in the search
subscription_id string optional; the ID of the Azure subscription

Note: This parameter is only needed for Azure accounts.

API CALL URL:

https://api.cloudcheckr.com/api/account.[json|xml]/get_improperly_tagged_resources

REQUEST EXAMPLE:

curl -X GET \
       -- https://api.cloudcheckr.com/api/account.[json|xml]/get_improperly_tagged_resources?access_key=your_account_access_key\
       -- header 'cache-control: no-cache' \
       -- header 'content-type: application/[json|xml]' \

RESPONSE EXAMPLE:
XML:

<GetImproperlyTaggedResourcesResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance>
     <results>
       <resource_id>null</resource_id>
       <aws_account_id>null</aws_account_id>
       <region_name>East US</region name>
       <creator_IAM_user>null</creator_IAM_user>
       <created_time>3/6/2018</created_time>
       <subcription>4dc76947-2789-4149-bc29-3b7bd45ce4a8 - Microsoft Azure</subscription>
       <consumed_service>Operation Insights</consumed_service>
       <exceptions>[]</exceptions>
    </results>
</GetImproperlyTaggedResourcesResponse>

Note: The parameter, “aws_account_id” is only needed for AWS accounts. The paramters, “subscription”, and “consumed_service” are only needed for Azure accounts.

JSON:

{
    "Results": [
        {
            "ResourceId": null,
            "AwsAccountId": null,
            "RegionName": "East US",
            "CreatorIamUser": null,
            "CreatedTime": "3/6/2018",
            "Subscription": "4dc76947-2789-4149-bc29-3b7bd45ce4a8 - Microsoft Azure",
            "ConsumedService": "Operation Insights",
            "Exceptions": []
        }
    ]
}

Note: The parameter, “aws_account_id” is only needed for AWS accounts. The paramters, “subscription”, and “consumed_service” are only needed for Azure accounts.


GET ALL API ENDPOINTS

The API method “get_all_api_endpoints” is used to return a complete list of all available CloudCheckr API calls and their parameters.

The preferred HTTP method for this call is GET.

XML call:

https://api.cloudcheckr.com/api/help.xml/get_all_api_endpoints?access_key=[access_key]

JSON call:

https://api.cloudcheckr.com/api/help.json/get_all_api_endpoints?access_key=[access_key]

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – Either a General or Admin-Level Access Key is required for this call.

OUTPUT

XML Example:

<ArrayOfControllerContainer
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <ControllerContainer>
        <controller_name>best_practice</controller_name>
        <api_calls>
            <ApiCall>
                <method_name>get_best_practices</method_name>
                <param_names>
                    <string>(admin level)access_key</string>
                    <string>date</string>
                    <string>aws_account_ids</string>
                    <string>all_result</string>
                    <string>importance</string>
                    <string>category</string>
                </param_names>
            </ApiCall>
        </api_calls>
    </ControllerContainer>
    <ControllerContainer>
        <controller_name>help</controller_name>
        <api_calls>
            <ApiCall>
                <method_name>get_resources_cloudformation_details</method_name>
                <param_names>
                    <string>date</string>
                    <string>aws_account_ids</string>
                    <string>max_results</string>
                </param_names>
            </ApiCall>
        </api_calls>
    </ControllerContainer>
</ArrayOfControllerContainer>

JSON Example:

[
  {
    "controller_name": "best_practice",
    "api_calls": [
      {
        "method_name": "get_best_practices",
        "param_names": [
          "(admin level)access_key",
          "date",
          "aws_account_ids",
          "all_result",
          "importance",
          "category"
        ]
      }
    ]
  },
  {
    "controller_name": "inventory",
    "api_calls": [
      {
        "method_name": "get_resources_cloudformation_details",
        "param_names": [
          "date",
          "aws_account_ids",
          "max_results"
        ]
      }
    ]
  }
]

 


GET BEST PRACTICES V2

The API method “best_practice/get_best_practices_v2” is used to:

  • pull the list of best practice results from a CloudCheckr account
  • show ignored checks and the reasons for those ignored items
  • report back the CIS benchmark information associated with the BPC

INPUT PARAMETERS:

Parameter Type Description
access_key string required; account-level API key
include_compliance_checks boolean optional; will report back the CIS benchmark information associated with the BPC; accepts true or false
date DateTime optional; date to pull the list of Best Practice results; used to access historical data
category string optional; the category of the Best Practice report to pull; accepts Security, Cost, Availability, and/or Usage
importance string optional; the importance level of the Best Practice checks to pull; accepts ShowAll, High, Medium, Low, Informational, InformationAndHigher, LowAndHigher, and MediumAndHigher
all_result boolean optional; allows you to pull all results from the best practice report, even those with no issues; accepts true or false
aws_accounts_id string optional/multi-account view (MAV) only; return statistics from these accounts
bpc_id string optional; the state of the resource on which to filter in the search

API CALL URL:

https://api.cloudcheckr.com/api/best_practice.json/get_best_practices_v2?access_key=your access key&include_compliance_checks=1

REQUEST EXAMPLE:

curl -X GET \
       -- https://api.cloudcheckr.com/api/best_practice.json/get_best_practices_v2?access_key=your access key&include_compliance_checks=1'\
     -- header 'cache-control: no-cache' \
     -- header 'content-type: application/[json|xml]' \
        }

RESPONSE EXAMPLE:

XML:

<GetBestPracticesResponse
  xmlns:xsd='http://www.w3.org/2001/XMLSchema'
  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
  <BestPracticeChecks>
    <BestPracticeCheckV2>
      <CheckId>441</CheckId>
      <Name>Contact Details on AWS Accounts Are Not Up-To-Date</Name>
      <Category>Security</Category>
      <Importance>High</Importance>
      <CountOfResults>1</CountOfResults>
      <ScanResultId>423</ScanResultId>
      <Results>
        <Result>Contact Details: Not Updated</Result>
      </Results>
      <Ignored>false</Ignored>
      <IgnoredReason></IgnoredReason>
      <ComplianceFrameworks>
        <ComplianceFramework>
          <Name>CIS Benchmark</Name>
          <ComplianceChecks>
            <ComplianceCheck>
              <ControlNumber>1.19</ControlNumber>
              <ControlName>Maintain current contact details</ControlName>
            </ComplianceCheck>
          </ComplianceChecks>
        </ComplianceFramework>
      </ComplianceFrameworks>...
    </BestPracticeCheckV2>
  </BestPracticeChecks>
</GetBestPracticesResponse>

JSON:

{
   "BestPracticeChecks": {
      "BestPracticeCheckV2": {
         "CheckId": "441",
         "Name": "Contact Details on AWS Accounts Are Not Up-To-Date",
         "Category": "Security",
         "Importance": "High",
         "CountOfResults": "1",
         "ScanResultId": "423",
         "Results": {
            "Result": "Contact Details: Not Updated"
         },
         "Ignored": "false",
         "IgnoredReason": "",
         "ComplianceFrameworks": {
            "ComplianceFramework": {
               "Name": "CIS Benchmark",
               "ComplianceChecks": {
                  "ComplianceCheck": {
                     "ControlNumber": "1.19",
                     "ControlName": "Maintain current contact details"
                  }
               }
            }
         },
         "__text": "..."
      }
   }
}

LIST OF CHANGES FROM CHANGE MONITORING

The API method “change_monitoring/get_changes” is used to pull the list of changes in your AWS account.

XML call:

https://api.cloudcheckr.com/api/change_monitoring.xml/get_changes?access_key=[access_key]&start=2013-11-08&end=2013-11-15&resource_id=i-123456

JSON call:

https://api.cloudcheckr.com/api/change_monitoring.json/get_changes?access_key=[access_key]&start=2013-11-08&end=2013-11-15&resource_id=i-123456

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard Access Key required for all API calls.
  • start (optional) – return changes from after this date.
  • end (optional) – return changes from before this date.
  • NOTE: if start and end are not defined, the last 30 days will be returned.
  • resource_id (optional) – filter the list of changes to a specific resource, such as an instance ID or S3 bucket.

OUTPUT

XML Example:

<GetChangesResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<Changes>
		<Change>
			<ChangeType>Modified</ChangeType>
			<EntityType>CloudTrailTrail</EntityType>
			<Identifier>Default</Identifier>
			<ServiceType>CloudTrail</ServiceType>
			<ChangeFound>2013-12-10T23:17:29</ChangeFound>
			<Region>us-west-2</Region>
			<OldState>[{"Key":"SnsTopicName","Value":""}]</OldState>
			<NewState>[{"Key":"SnsTopicName","Value":"CloudTrailOregon"}]</NewState>
		</Change>
		<Change>
			<ChangeType>Modified</ChangeType>
			<EntityType>CloudTrailTrail</EntityType>
			<Identifier>Default</Identifier>
			<ServiceType>CloudTrail</ServiceType>
			<ChangeFound>2013-12-16T23:16:01</ChangeFound>
			<Region>us-east-1</Region>
			<OldState>[{"Key":"TimeLoggingStarted","Value":"12\/6\/2013 6:27:57 PM"},{"Key":"TimeLoggingStopped","Value":"12\/5\/2013 12:03:27 AM"}]</OldState>
			<NewState>[{"Key":"TimeLoggingStarted","Value":"12\/16\/2013 4:53:53 PM"},{"Key":"TimeLoggingStopped","Value":"12\/16\/2013 4:53:51 PM"}]</NewState>
		</Change>
	</Changes>
	<FromDate>2013-11-17T00:00:00</FromDate>
	<ToDate>2013-12-17T23:59:59</ToDate>
</GetChangesResponse>

JSON Example:

{
   "Changes":[
      {
         "ChangeType":"Modified",
         "EntityType":"CloudTrailTrail",
         "Identifier":"Default",
         "ServiceType":"CloudTrail",
         "ChangeFound":"2013-12-10T23:17:29",
         "Region":"us-west-2",
         "OldState":"[{\"Key\":\"SnsTopicName\",\"Value\":\"\"}]",
         "NewState":"[{\"Key\":\"SnsTopicName\",\"Value\":\"CloudTrailOregon\"}]"
      },
      {
         "ChangeType":"Modified",
         "EntityType":"CloudTrailTrail",
         "Identifier":"Default",
         "ServiceType":"CloudTrail",
         "ChangeFound":"2013-12-16T23:16:01",
         "Region":"us-east-1",
         "OldState":"[{\"Key\":\"TimeLoggingStarted\",\"Value\":\"12\\/6\\/2013 6:27:57 PM\"},{\"Key\":\"TimeLoggingStopped\",\"Value\":\"12\\/5\\/2013 12:03:27 AM\"}]",
         "NewState":"[{\"Key\":\"TimeLoggingStarted\",\"Value\":\"12\\/16\\/2013 4:53:53 PM\"},{\"Key\":\"TimeLoggingStopped\",\"Value\":\"12\\/16\\/2013 4:53:51 PM\"}]"
      },
   ],
   "FromDate":"2013-11-17T00:00:00",
   "ToDate":"2013-12-17T23:59:59"
}

LIST RESULTS FROM AN ADVANCED FILTERING (W/TAGS) SAVED FILTER

The API method “billing/get_detailed_billing_analysis” is used to pull the results from a Saved Filter in the Advanced Filtering (w/ Tags) report.

XML call:

https://api.cloudcheckr.com/api/billing.xml/get_detailed_billing_analysis?access_key=[access_key]&start=2013-11-08&end=2013-11-15&saved_filter_name=aaronsfilter

JSON call:

https://api.cloudcheckr.com/api/billing.json/get_detailed_billing_analysis?access_key=[access_key]&start=2013-11-08&end=2013-11-15&saved_filter_name=aaronsfilter

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard Access Key required for all API calls.
  • saved_filter_name (required) – The name of the Saved Filter from which to pull the results.
  • start (optional) – return costs from after this date.
  • end (optional) – return costs from before this date.
  • NOTE: if start and end are not defined, the last 14 days will be returned.

OUTPUT

XML Example:

<GetDetailedBillingAnalysisResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<Groupings>
		<Grouping>
			<Name>All</Name>
			<Costs>
				<Cost>
					<Date>2013-12-03T00:00:00</Date>
					<Amount>1.0541985900</Amount>
				</Cost>
				<Cost>
					<Date>2013-12-03T01:00:00</Date>
					<Amount>0.8642166300</Amount>
				</Cost>
				<Cost>
					<Date>2013-12-03T02:00:00</Date>
					<Amount>0.8251885500</Amount>
				</Cost>
				<Cost>
					<Date>2013-12-03T03:00:00</Date>
					<Amount>0.8248988300</Amount>
				</Cost>
				...snip...
				<Cost>
					<Date>2013-12-17T23:00:00</Date>
					<Amount>0.9257002500</Amount>
				</Cost>
			</Costs>
		</Grouping>
	</Groupings>
</GetDetailedBillingAnalysisResponse>

JSON Example:

{
	"Groupings":[
	{
		"Name":"All",
		"Costs":[
			{"Date":"2013-12-03T00:00:00","Amount":1.0541985900},
			{"Date":"2013-12-03T01:00:00","Amount":0.8642166300},
			{"Date":"2013-12-03T02:00:00","Amount":0.8251885500},
			{"Date":"2013-12-03T03:00:00","Amount":0.8248988300},
			...snip...
			{"Date":"2013-12-17T16:00:00","Amount":0.9264072500},
			{"Date":"2013-12-17T17:00:00","Amount":0.9240584100}
		]
	}]
}

LIST RESULTS FROM AN ADVANCED GROUPING (W/TAGS) SAVED FILTER

The API method “billing/get_detailed_billing_with_grouping_v2” is used to pull the results from a Saved Filter in the Advanced Grouping (w/ Tags) report. Version 2 of the call includes two additional parameters.

XML call:

https://api.cloudcheckr.com/api/billing.xml/get_detailed_billing_with_grouping_v2?access_key=[access_key]&start=2013-11-08&end=2013-11-15&saved_filter_name=aaronsfilter

JSON call:

https://api.cloudcheckr.com/api/billing.json/get_detailed_billing_with_grouping_v2?access_key=[access_key]&start=2013-11-08&end=2013-11-15&saved_filter_name=aaronsfilter

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard Access Key required for all API calls.
  • saved_filter_name (required) – The name of the Saved Filter from which to pull the results.
  • use_account (required) – The name of the account you are making the call for, where the name is the name of the account added in CloudCheckr.
  • use_cc_account_id (required — either use this or ‘use_account’) – The CloudCheckr ID of the account you are making the call for.
  • with_costs_by_group (optional – defaults to true if not specified) – Retrieves costs per group. Accepts true/false.
  • with_costs_by_time (optional – defaults to true if not specified) – Retrieves costs per time period. Accepts true/false.
  • start (optional) – return costs from after this date.
  • end (optional) – return costs from before this date.
  • NOTE: if start and end are not defined, the last 14 days will be returned.

OUTPUT

XML Example:

<GetDetailedBillingWithGroupingResponseV2 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Total>30.7983416200</Total>
    <Max>30.7983416200</Max>
    <Min>30.7983416200</Min>
    <Average>30.798698086413034906518967198</Average>
    <CostsByGroup>
        <GroupingLevel>
            <GroupName>Service</GroupName>
            <GroupValue>AmazonS3</GroupValue>
            <FriendlyName>S3</FriendlyName>
            <Cost>0.1099985400</Cost>
            <NextLevel>
                <GroupingLevel>
                    <GroupName>aws:createdBy</GroupName>
                    <GroupValue>IAMUser:AIDAI5X7LBFKDHYABCDE:mikeb</GroupValue>
                    <FriendlyName />
                    <Cost>0.1083478400</Cost>
                    <NextLevel />
                </GroupingLevel>
            </NextLevel>
        </GroupingLevel>
        <GroupingLevel>
            <GroupName>Service</GroupName>
            <GroupValue>AmazonEC2</GroupValue>
            <FriendlyName>EC2</FriendlyName>
            <Cost>22.6078574000</Cost>
            <NextLevel>
                <GroupingLevel>
                    <GroupName>aws:createdBy</GroupName>
                    <GroupValue>IAMUser:AIDAI4NZVQK6IW45ABCDE:paul.vanw</GroupValue>
                    <FriendlyName />
                    <Cost>0.0750056100</Cost>
                    <NextLevel />
                </GroupingLevel>
            </NextLevel>
        </GroupingLevel>
    </CostsByGroup>
    <CostsByTime>
        <GroupingByTime>
            <Groups>
                <Grouping>
                    <GroupName>Service</GroupName>
                    <GroupValue>AmazonEC2</GroupValue>
                    <FriendlyName>EC2</FriendlyName>
                </Grouping>
                <Grouping>
                    <GroupName>aws:createdBy</GroupName>
                    <GroupValue>IAMUser:AIDAI4NZVQK6IW45ABCDE:paul.vanw</GroupValue>
                    <FriendlyName />
                </Grouping>
            </Groups>
            <CostDates>
                <GroupCostDate>
                    <Date>1/20/2017 12:00:00 AM</Date>
                    <Cost>0.0750056100</Cost>
                    <UsageQuantity>24.0000619600</UsageQuantity>
                </GroupCostDate>
            </CostDates>
        </GroupingByTime>
        <GroupingByTime>
            <Groups>
                <Grouping>
                    <GroupName>Service</GroupName>
                    <GroupValue>AmazonS3</GroupValue>
                    <FriendlyName>S3</FriendlyName>
                </Grouping>
                <Grouping>
                    <GroupName>aws:createdBy</GroupName>
                    <GroupValue>IAMUser:AIDAI5X7LBFKDHYFABCDE:mikeb</GroupValue>
                    <FriendlyName />
                </Grouping>
            </Groups>
            <CostDates>
                <GroupCostDate>
                    <Date>1/20/2017 12:00:00 AM</Date>
                    <Cost>0.1083478400</Cost>
                    <UsageQuantity>418.5352970600</UsageQuantity>
                </GroupCostDate>
            </CostDates>
        </GroupingByTime>
    </CostsByTime>
</GetDetailedBillingWithGroupingResponseV2>

JSON Example:

{
  "Total": 30.79834162,
  "Max": 30.79834162,
  "Min": 30.79834162,
  "Average": 30.798698086413037,
  "CostsByGroup": [
    {
      "GroupName": "Service",
      "GroupValue": "AmazonS3",
      "FriendlyName": "S3",
      "Cost": "0.1099985400",
      "NextLevel": [
        {
          "GroupName": "aws:createdBy",
          "GroupValue": "IAMUser:AIDAI5X7LBFKDHYFABCDE:mikeb",
          "FriendlyName": "",
          "Cost": "0.1083478400",
          "NextLevel": []
        }
      ]
    },
    {
      "GroupName": "Service",
      "GroupValue": "AmazonEC2",
      "FriendlyName": "EC2",
      "Cost": "22.6078574000",
      "NextLevel": [
        {
          "GroupName": "aws:createdBy",
          "GroupValue": "IAMUser:AIDAI4NZVQK6IW45ABCDE:paul.vanw",
          "FriendlyName": "",
          "Cost": "0.0750056100",
          "NextLevel": []
        }
      ]
    }
  ],
  "CostsByTime": [
    {
      "Groups": [
        {
          "GroupName": "Service",
          "GroupValue": "AmazonEC2",
          "FriendlyName": "EC2"
        },
        {
          "GroupName": "aws:createdBy",
          "GroupValue": "IAMUser:AIDAI4NZVQK6IW45ABCDE:paul.vanw",
          "FriendlyName": ""
        }
      ],
      "CostDates": [
        {
          "Date": "1/20/2017 12:00:00 AM",
          "Cost": "0.0750056100",
          "UsageQuantity": "24.0000619600"
        }
      ]
    },
    {
      "Groups": [
        {
          "GroupName": "Service",
          "GroupValue": "AmazonS3",
          "FriendlyName": "S3"
        },
        {
          "GroupName": "aws:createdBy",
          "GroupValue": "IAMUser:AIDAI5X7LBFKDHYFABCDE:mikeb",
          "FriendlyName": ""
        }
      ],
      "CostDates": [
        {
          "Date": "1/20/2017 12:00:00 AM",
          "Cost": "0.1083478400",
          "UsageQuantity": "418.5352970600"
        }
      ]
    }
  ]
}

EXPORT DETAILED BILLING FILE

The API method “get_detailed_billing_file” is used to export the RAW DBR file.

XML call:

https://api.cloudcheckr.com/api/billing.xml/get_detailed_billing_file?access_key=[access_key]&start=[Start Date]&end=[End Date]&cost_type=[Cost Type]

JSON call:

https://api.cloudcheckr.com/api/billing.json/get_detailed_billing_file?access_key=[access_key]&start=[Start Date]&end=[End Date]&cost_type=[Cost Type]

This call accepts these parameters:

  • access_key (required) – standard access key required for all API calls.
  • start (required) – datetime
  • end (required) – datetime
  • cost_type (required) – List, Blended or Unblended

OUTPUT

{"Message":"Sucessfully created customer.","Code":200}

RI UPFRONT COST AMORTIZATION

The API method “get_ri_upfront_cost_amortization” is used to gather information regarding amortization of the upfront costs of your purchased Reserved Instances.

XML call:

https://api.cloudcheckr.com/api/billing.xml/get_ri_upfront_cost_amortization?access_key[access_key]&account_name=MyAccountName

JSON call:

https://api.cloudcheckr.com/api/billing.json/get_ri_upfront_cost_amortization?access_key[access_key]&account_name=MyAccountName

This call accepts 5 parameters:

  • access_key (required) – standard access key required for all API calls.
  • start (optional) – Start Date.
  • end (optional) – End Date.
  • service (optional) – The specific service you wish to query.
  • use_account (required for admin API key) – The specific account you wish to query.

OUTPUT

XML Output:

<GetRIUpfrontCostAmortizationResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <start>2014-12-23T13:07:07.2988635Z</start>
    <end>2016-06-23T13:07:07.2988635Z</end>
    <service>EC2,RDS,ElastiCache,Redshift</service>
    <RiItems>
        <ReservedInstanceAmortizationItem>
            <Month>2014-12-01T00:00:00</Month>
            <TotalUpfrontCosts>811.00</TotalUpfrontCosts>
            <TotalAmortizedCosts>139.95</TotalAmortizedCosts>
            <PurchasedRis>...</PurchasedRis>
            <AmortizedRis>
                <ReservedInstanceAmortizationItemDetail>...</ReservedInstanceAmortizationItemDetail>
                <ReservedInstanceAmortizationItemDetail>...</ReservedInstanceAmortizationItemDetail>
                <ReservedInstanceAmortizationItemDetail>...</ReservedInstanceAmortizationItemDetail>
                <ReservedInstanceAmortizationItemDetail>
                    <UnqiueId>040354a6-e547-4116-939c-ea7693b33cb8</UnqiueId>
                    <Month>2014-12-01T00:00:00</Month>
                    <Service>EC2</Service>
                    <InstanceType>t1.micro</InstanceType>
                    <AvailabilityZone>us-east-1b</AvailabilityZone>
                    <Platform>WindowsVpc</Platform>
                    <Term>1 Year</Term>
                    <Cost>4.9660515644977168949771689655</Cost>
                    <AccountName>949195593353</AccountName>
                </ReservedInstanceAmortizationItemDetail>
            </AmortizedRis>
        </ReservedInstanceAmortizationItem>
    </RiItems>
</GetRIUpfrontCostAmortizationResponse>

JSON Output:

{  
   "start":"2014-12-23T14:23:43.1871277Z",
   "end":"2016-06-23T14:23:43.1871277Z",
   "service":"EC2,RDS,ElastiCache,Redshift",
   "RiItems":[  
      {  
         "Month":"2014-12-01T00:00:00",
         "TotalUpfrontCosts":811.00,
         "TotalAmortizedCosts":139.95,
         "PurchasedRis":[  
            {  
               "UnqiueId":"byaaron",
               "Month":"2014-12-01T00:00:00",
               "Service":"RDS",
               "InstanceType":"db.m3.medium",
               "AvailabilityZone":"us-east-1",
               "Platform":"sqlserver-se(byol)",
               "Term":"1 Year",
               "Cost":0.0,
               "AccountName":"949195593353"
            },
            {  
               "UnqiueId":"376d19e5-8aed-4942-a72e-5dcdfed3ce54",
               "Month":"2014-12-01T00:00:00",
               "Service":"EC2",
               "InstanceType":"m3.medium",
               "AvailabilityZone":"us-east-1b",
               "Platform":"WindowsVpc",
               "Term":"1 Year",
               "Cost":749.000,
               "AccountName":"949195593353"
            },
            {  
               "UnqiueId":"142453e2-b296-4e37-a707-dc65d7bda4a3",
               "Month":"2014-12-01T00:00:00",
               "Service":"EC2",
               "InstanceType":"t1.micro",
               "AvailabilityZone":"us-west-2b",
               "Platform":"WindowsVpc",
               "Term":"1 Year",
               "Cost":0.000,
               "AccountName":"949195593353"
            },
            {  
               "UnqiueId":"040354a6-e547-4116-939c-ea7693b33cb8",
               "Month":"2014-12-01T00:00:00",
               "Service":"EC2",
               "InstanceType":"t1.micro",
               "AvailabilityZone":"us-east-1b",
               "Platform":"WindowsVpc",
               "Term":"1 Year",
               "Cost":62.000,
               "AccountName":"9491553353"
            }
         ],
         "AmortizedRis":[  
            {  
               "UnqiueId":"byaaron",
               "Month":"2014-12-01T00:00:00",
               "Service":"RDS",
               "InstanceType":"db.m3.medium",
               "AvailabilityZone":"us-east-1",
               "Platform":"sqlserver-se(byol)",
               "Term":"1 Year",
               "Cost":75.000,
               "AccountName":"9491953353"
            },
            {  
               "UnqiueId":"376d19e5-8aed-4942-a72e-5dcdfed3ce54",
               "Month":"2014-12-01T00:00:00",
               "Service":"EC2",
               "InstanceType":"m3.medium",
               "AvailabilityZone":"us-east-1b",
               "Platform":"WindowsVpc",
               "Term":"1 Year",
               "Cost":59.977241379724721004566210044,
               "AccountName":"94915593353"
            },
            {  
               "UnqiueId":"142453e2-b296-4e37-a707-dc65d7bda4a3",
               "Month":"2014-12-01T00:00:00",
               "Service":"EC2",
               "InstanceType":"t1.micro",
               "AvailablityZone":"us-west-2b",
               "Platform":"Windowspc",
               "Term":"1 Year",
               "Cost":0.0,
               "AccountName":"94919593353"
            },
            {  
               "UnqiueId":"040354a6-e547-4116-939c-ea7693b33cb8",
               "Month":"2014-12-01T00:00:00",
               "Service":"EC2",
               "InstanceType":"t1.micro",
               "AvailabilityZone":"us-east-1b",
               "Platform":"WindowsVpc",
               "Term":"1 Year",
               "Cost":4.9660515644977168949771689655,
               "AccountName":"949195593353"
            }
         ]
      },
   ]
} 


GET INVOICE DATA FROM INVOICE GENERATOR

The API method “get_invoice” is used to retrieve the invoice data from the CloudCheckr Invoice Generator.

XML call:

https://api.cloudcheckr.com/api/billing.xml/get_invoice?access_key=[access_key]&customer_names=[customer]&start_date=07/01/2015&end_date=07/31/2015&format=summary&group_by=awsservice&cost_type=list

JSON call:

https://api.cloudcheckr.com/api/billing.json/get_invoice?access_key=[access_key]&customer_names=[customer]&start_date=07/01/2015&end_date=07/31/2015&format=summary&group_by=awsservice&cost_type=list

This call accepts these parameters:

  • access_key (required) – standard access key required for all API calls.
  • customer_names (required) – The name of the customer for the invoice you want to retrieve.
  • start_date (required) – The beginning date to pull cost data for the invoice.
  • end_date (required) – The end date to pull cost data for the invoice.
  • format (required) – The report format for the invoice. Accepts Summary, Detailed, SavedFilter.
  • group_by (required) – The group_by to be used based on the value of the format parameter.
    • When format – Summary group_by accepts values of region, awsservice or awsserviceandregion.
    • When format – Detailed group_by  accepts values of bydescription, byoperation or byusagetypeanddescription.
    • When format – SavedFilter  replace group_by with saved_filter_name and you must provided the the name of the SavedFilter being used
  • cost_type (required) – The cost type to use for the invoice data. Accepts: List, Unblended, or Blended.
  • currency_denomination (optional) – The type of currency to display if converting from US $.
  • currency_conversion (optional) – What to use to convert the currency from US $.
  • show_credits (optional) – Choose whether to apply the AWS credits to the account or not. Accepts yes or no.
  • tag_key (optional) – The name of the tag key you would like to filter the costs to.
  • tag_value (optional) – The name of the tag value you would like to filter the costs to.
  • use_account (required for admin API key) – The specific account you wish to query.

OUTPUT

XML Output:

<GetInvoic0eResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <CustomerInvoices>
   <CustomerInvoice>
    <CustomerName>[CustomerName]</CustomerName>
    <CustomerAddress/>
    <CustomerEmail>qacheckr@gmail.com</CustomerEmail>
    <AWSServiceTotal>$1.92</AWSServiceTotal>
    <CustomChargeTotal>$0.00</CustomChargeTotal>
    <InvoiceSummary>
     <ServiceInvoice>
      <ServiceName>EC2</ServiceName>
      <Cost>$1.68</Cost>
      <Regions/>
    </ServiceInvoice>
    <ServiceInvoice>
      <ServiceName>Support Business</ServiceName>
      <Cost>$0.17</Cost>
      <Regions/>
    </ServiceInvoice>
      <ServiceInvoice>
       <ServiceName>S3</ServiceName>
       <Cost>$0.05</Cost>
       <Regions/>
    </ServiceInvoice>
    <ServiceInvoice>
     <ServiceName>Custom Charge</ServiceName>
     <Cost>$0.02</Cost>
     <Regions/>
    </ServiceInvoice>
    <ServiceInvoice>
     <ServiceName>SimpleDB</ServiceName>
     <Cost>< $0.01</Cost>
     <Regions/>
    </ServiceInvoice>
    <ServiceInvoice>
     <ServiceName>Glacier</ServiceName>
     <Cost>< $0.01</Cost>
     <Regions/>
    </ServiceInvoice>
    <ServiceInvoice>
     <ServiceName>DynamoDB</ServiceName>
     <Cost>< $0.01</Cost>
     <Regions/>
    </ServiceInvoice>
    <ServiceInvoice>
     <ServiceName>SWF</ServiceName>
     <Cost>< $0.01</Cost>
     <Regions/>
    </ServiceInvoice>
   </InvoiceSummary>
   <InvoiceDetail/>
   <HasData>true</HasData>
  </CustomerInvoice>
 </CustomerInvoices>
</GetInvoiceResponse>

JSON Output:

{"CustomerInvoices":[{"CustomerName":"[CustomerName]",
                      "CustomerAddress":"",
                      "CustomerEmail":"qacheckr@gmail.com",
                      "AWSServiceTotal":"$1.16",
                      "CustomChargeTotal":"$0.00",
                      "CreditTotal":null,
                      "InvoiceSummary":[{"ServiceName":"EC2","Cost":"$1.11","Regions":[]},
                                        {"ServiceName":"S3","Cost":"$0.04","Regions":[]},
                                        {"ServiceName":"Custom Charge","Cost":"$0.01","Regions":[]},
                                        {"ServiceName":"SimpleDB","Cost":"< $0.01","Regions":[]},
                                        {"ServiceName":"Glacier","Cost":"< $0.01","Regions":[]},
                                        {"ServiceName":"DynamoDB","Cost":"< $0.01","Regions":[]},
                                        {"ServiceName":"SWF","Cost":"< $0.01","Regions":[]}],
                                         "InvoiceDetail":[],"HasData":true}]}

GET LIST OF CUSTOMERS SETUP IN INVOICE GENERATOR

The API method “get_invoice_customers” is used to retrieve the list of customers that are configured within the CloudCheckr Invoice Generator.

XML call:

https://api.cloudcheckr.com/api/billing.xml/get_invoice?access_key=[access_key]&customer_names=[customer]&start_date=07/01/2015&end_date=07/31/2015&format=summary&cost_type=list

JSON call:

https://api.cloudcheckr.com/api/billing.json/get_invoice?access_key=[access_key]&customer_names=[customer]&start_date=07/01/2015&end_date=07/31/2015&format=summary&cost_type=list

This call accepts these parameters:

  • access_key (required) – standard access key required for all API calls.
  • use_account (required — either this field or ‘use_cc_account_id’) – The specific account you wish to query.
  • use_cc_account_id (required — either this field or ‘use_account’) – The CloudCheckr ID number for the AWS account within the application.

OUTPUT

XML Output:

<GetInvoiceCustomersResponse
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Customers>
        <BillingInvoiceCustomer>
            <Name>Acount 1</Name>
            <Email>elvis@presley.com</Email>
            <Address>123 Elvis Presley Blvd Memphis, TN 12345</Address>
            <Accounts/>
        </BillingInvoiceCustomer>
        <BillingInvoiceCustomer>
            <Name>Account 2 </Name>
            <Email>user@domain.com</Email>
            <Address>1 Pleasant Street, Awesomeville, NY 123456</Address>
            <Accounts/>
    </Customers>
</GetInvoiceCustomersResponse>

CREATE CUSTOMERS FOR THE INVOICE GENERATOR

The API method “create_customer” is used to create customers for use in the CloudCheckr Invoice Generator.

XML call:

https://api.cloudcheckr.com/api/billing.xml/create_customer?access_key=[access_key]&name=[name]&email=[email_address]&address=[address]&aws_accounts=[accounts]

JSON call:

https://api.cloudcheckr.com/api/billing.json/create_customer?access_key=[access_key]&name=[name]&email=[email_address]&address=[address]&aws_accounts=[accounts]

This call accepts these parameters:

“(required)name”, “(required)email”, “(required)address”, “(required)aws_accounts”]

  • access_key (required) – standard access key required for all API calls.
  • name (required) – the name of the customer to be used in the invoice generator.
  • email (required) – the email address to be associated with the customer.
  • address (required) – the mailing address to be associated with the customer.
  • aws_accounts (required) – the name(s) of the AWS Account(s) that you will like to use to create the customer. Will accept multiple accounts.

OUTPUT

{"Message":"Sucessfully created customer.","Code":200}

GET BILLING DETAILED GROUPED PDF

The API method, get_billing_detailed_grouped_pdf, is used to provide a PDF version of an Advanced Grouping report.

To access the Advanced Grouping report, go to the left navigation pane and choose Cost > AWS Billing > Custom Reporting > Advanced Grouping.

INPUT PARAMETERS:

Parameter Type Description
access_key (required) string standard access key required for all API calls
saved_filter_name string required; name of the saved filter
start DateTime required; date that you want to start to pull cost data
end DateTime required; date that you want to stop pulling cost data

ENDPOINT URL:

https://api.cloudcheckr.com/api/ReportPdfDownload.[json|xml]/get_billing_detailed_grouped_pdf

JSON/XML CALL EXAMPLE:

curl --request GET \
  --'https://api.cloudcheckr.com/api/ReportPdfDownload.[json|xml]/get_billing_detailed_grouped_pdf?access_key=[project_api_access_key]&saved_filter_name=[saved_filter_name]&start=11/22/2017&end=12/06/2017'\
  --header 'cache-control: no-cache' \
  --header 'content-type: application/[json|xml]' 
  

SUCCESSFUL JSON/XML RESPONSE:

{
    "Code": 200,
    "Message": "OK"
}

EDIT PAYEE SUPPORT CHARGES

This API endpoint ONLY responds to POST requests.

edit_payee_support_charges is used to adjust payee support charges as seen from the Cost > AWS Partner Tools > Configure > Payee Support Charges page.
INPUT PARAMETERS:

Parameter Type Description
access_key string required, account-level API key. must be specified in header
aws_account_id string * required/optional. The 12 digit AWS account ID to modify
account_family string * required/optional. The name of the account family to modify
supress_aws_support string optional. valid values are: true/false, yes/no, y/n, and 1/0
recalculate_support string optional. valid values are: true/false, yes/no, y/n, and 1/0
apply_by_account string optional. valid values are: true/false, yes/no, y/n, and 1/0
ignore_100_minimum string optional. valid values are: true/false, yes/no, y/n, and 1/0
displayed_by_account string optional. valid values are: true/false, yes/no, y/n, and 1/0

* = one of these parameters must be defined

Endpoint URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/edit_payee_support_charges

Example Call:

curl --request POST \
--url 'https://api.cloudcheckr.com/api/billing.[json|xml]/edit_payee_support_charges
--header'access_key=your_access_key' \
--header 'content-type: application/json' \
--data '{ "suppress_aws_support": "true", "recalculate_support":
"true", "apply_by_account": "true", "ignore_100_minimum": "true",
"displayed_by_account": "true", "aws_account_id": "0123456789" }'

Successful Response:

{
"Code": 200,
"Message": "OK"}

 


CLOUDWATCH STATISTICS

The API method “get_history” is used to pull CloudWatch metrics from your AWS account.

XML call:

https://api.cloudcheckr.com/api/Cloudwatch.xml/get_history?access_key=[access_key]&service=EC2:CPUUtilization

JSON call:

https://api.cloudcheckr.com/api/Cloudwatch.json/get_history?access_key=[access_key]&service=EC2:CPUUtilization

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard Access Key required for all API calls.
  • service (required) – the CloudWatch metric from which to pull the results.
  • start (optional) – return statistics from after this date.
  • end (optional) – return statistics from before this date.
  • NOTE: if start and end are not defined, the last 7 days will be returned.

OUTPUT

XML Example:

<CloudWatchHistory xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Service>EC2</Service>
  <MetricType>CPUUtilization</MetricType>
  <CloudWatch>
    <CloudWatchDetail>
       <ResourceId>i-3cf3f56f</ResourceId>
       <Region>US East (Northern Virginia)</Region>
       <Value>4.76</Value>
       <Time>2014-06-06T15:00:00</Time>
    </CloudWatchDetail>
  </CloudWatch>
  <FromDate>2014-08-12T00:00:00</FromDate>
  <ToDate>2014-08-19T00:00:00</ToDate>
</CloudWatchHistory>

JSON Example:

{
    "Service": "EC2",
    "MetricType": "CPUUtilization",
    "CloudWatch": [{
        "ResourceId": "i-05c10a2e",
        "Region": "US East (Northern Virginia)",
        "MetricType": null,
        "Value": "0.167",
        "Time": "2014-08-15T16:00:00"
    }, {
        "ResourceId": "i-05c10a2e",
        "Region": "US East (Northern Virginia)",
        "MetricType": null,
        "Value": "1.226",
        "Time": "2014-08-15T15:00:00"
    }, {
        "ResourceId": "i-05c10a2e",
        "Region": "US East (Northern Virginia)",
        "MetricType": null,
        "Value": "0.2225",
        "Time": "2014-08-15T14:00:00"
    }, {
        "ResourceId": "i-05c10a2e",
        "Region": "US East (Northern Virginia)",
        "MetricType": null,
        "Value": "0.194166666666667",
        "Time": "2014-08-15T13:00:00"
    }],
    "FromDate": "2014-08-12T00:00:00",
    "ToDate": "2014-08-19T23:59:59"
}

ADD COST ALERT

The API method “add_cost_alert” is used to programmatically create new cost alert within CloudCheckr.

The preferred HTTP method for this call is POST.

XML call:

https://api.cloudcheckr.com/api/alert.xml/add_cost_alert?access_key=[access_key]&alert_name=Alert&budget=10000&percent_of_budget=75&only_send_once=true&budget_period=monthly&emails=user@domain.com

JSON call:

https://api.cloudcheckr.com/api/alert.json/add_cost_alert?access_key=[access_key]&alert_name=Alert&budget=10000&percent_of_budget=75&only_send_once=true&budget_period=monthly&emails=user@domain.com

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard Access Key required for all API calls.
  • alert_name (required) – the name of the new alert.
  • emails (optional) – the email addresses that will receive the alert email. Separate multiple addresses using commas.
  • sns_topics (optional) – the ARN for the SNS topic that you would like the alert delivered.
  • pagerduty_service_key (optional) – the Key for the PagerDuty alert you would like the CloudCheckr alert to be delivered to.
  • budget (required) – the dollar amount for the budget.
  • percent_of_budget (required) – the percentage of costs versus budget that will trigger the alert.
  • send_every_days (optional) – dictates how frequently the alert is sent.
  • only_send_once (optional) – set to true to only receive one alert when the percent of budget is met.
  • budget_period (optional) – enter daily to set a daily budget or monthly to have the budget align with the AWS month-to-date costs.
  • budget_custom_start_date (optional) – the month/day/year you would like the budget to start comparing against.
  • budget_custom_end_date (optional) – the month/day/year you would like the budget to stop comparing against.
  • saved_filters (optional) – the name of the Advanced Filtering saved filter you would like to create the alert against.
  • account_to_filter (optional) – the AWS Account ID you would like to compare create the alert against. If parameter is not used, budget will compare against all accounts.

OUTPUT

XML & JSON Example:

{"Code":200,"Message":"OK"}

DELETE COST ALERT

The API method “delete_cost_alert” is used to programmatically delete an already-created cost alert within CloudCheckr.

The preferred HTTP method for this call is POST.

XML call:

https://api.cloudcheckr.com/api/alert.xml/delete_cost_alert?access_key=[access_key]&alert_name=Alert

JSON call:

https://api.cloudcheckr.com/api/alert.json/delete_cost_alert?access_key=[access_key]&alert_name=Alert

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard Access Key required for all API calls.
  • alert_name (required) – the name of the alert that you would like to delete.

OUTPUT

XML & JSON Example:

{"Code":200,"Message":"OK"}

GET COST ALERT RESULTS

The API method “get_cost_alert_results” is used to programmatically retrieve the results of configured Cost alerts within an account.

XML call:

https://api.cloudcheckr.com/api/alert.xml/get_cost_alert_results?access_key=[access_key]

JSON call:

https://api.cloudcheckr.com/api/alert.json/get_cost_alert_results?access_key=[access_key]

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard access key required for all API calls.
  • from (optional) – return report from this date. The date format is MM/DD/YYYY.
  • to (optional) – return report to this date. The date format is MM/DD/YYYY.
  • alert_name (optional) – the name of the alert.
  • max_results (optional) – the max number of results to return before paginating the results.
  • enabled (optional) – retrieve all the alerts that are currently enabled for the project. Accepts true/false.
  • use_account (required for admin API key) – The specific account you wish to query.
  • use_cc_account_id (required when using Admin API Access Key) – The CloudCheckr ID of the account you are making the call for. The ID is returned when using the method ‘account/add_accountv2′ to register the account in CloudCheckr.
  • use_aws_account_id (optional) – The ID of the AWS account in question.

OUTPUT

XML Example:

<AlertResults>
	<AlertResultItemModel>
		<Id>59321</Id>
		<CanIgnore>false</CanIgnore>
		<Triggered>10/26/2016 3:00 PM</Triggered>
		<Text>
			Cost:$2,4631.90|Reserved Instance Upfront Cost:$100.00|TriggerPercent:100.00%
		</Text>
		<AlertType>AWS Costs</AlertType>
		<TriggeredBy>alert_test</TriggeredBy>
	</AlertResultItemModel>
</AlertResults>

JSON Example:

{
  "AlertResults": {
    "AlertResultItemModel": {
      "Id": "59321",
      "CanIgnore": "false",
      "Triggered": "10/26/2016 3:00 PM",
      "Text": "Cost:$2,4631.90|Reserved Instance Upfront Cost:$100.00|TriggerPercent:100.00%",
      "AlertType": "AWS Costs",
      "TriggeredBy": "alert_test"
    }
  }
}

GET UTILIZATION ALERT RESULTS

The API method “get_utilization_alert_results” is used to programmatically retrieve the list of configured utilization alerts within an account.

XML call:

https://api.cloudcheckr.com/api/alert.xml/get_utilization_alert_results?access_key=[access_key]

JSON call:

https://api.cloudcheckr.com/api/alert.json/get_utilization_alert_results?access_key=[access_key]

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard access key required for all API calls.
  • from (optional) – return report from this date. The date format is MM/DD/YYYY.
  • to (optional) – return report to this date. The date format is MM/DD/YYYY.
  • alert_name (optional) – the name of the alert.
  • max_results (optional) – the max number of results to return before paginating the results.
  • enabled (optional) – retrieve all the alerts that are currently enabled for the project. Accepts true/false.
  • use_account (required for admin API key) – The specific account you wish to query.
  • use_cc_account_id (required when using Admin API Access Key) – The CloudCheckr ID of the account you are making the call for. The ID is returned when using the method ‘account/add_accountv2′ to register the account in CloudCheckr.
  • use_aws_account_id (optional) – The ID of the AWS account in question.

OUTPUT

XML Example:

<AlertResults>
	<AlertResultItemModel>
		<Id>59368</Id>
		<CanIgnore>false</CanIgnore>
		<Triggered>10/26/2016 1:23 PM</Triggered>
		<Text>InstanceCount:16</Text>
		<AlertType>EC2 Number of Instances</AlertType>
		<TriggeredBy>Test1</TriggeredBy>
	</AlertResultItemModel>
	<AlertResultItemModel>
		<Id>5296</Id>
		<CanIgnore>false</CanIgnore>
		<Triggered>7/21/2016 10:17 PM</Triggered>
		<Text>InstanceCount:8</Text>
		<AlertType>EC2 Number of Instances</AlertType>
		<TriggeredBy>Test1</TriggeredBy>
	</AlertResultItemModel>
	<AlertResultItemModel>
		<Id>5219</Id>
		<UiId>
			Instance: i-42c89df7 (ECS Instance - EC2ContainerService-default-367f5c36-273e-4735-8009-ebf34c8fb46c)
		</UiId>
		<CanIgnore>true</CanIgnore>
		<Triggered>7/9/2016 4:18 PM</Triggered>
		<Text>
			Resource:CPUUtilization|Instance:i-42c89df7 (ECS Instance - EC2ContainerService-default-367f5c36-273e-4735-8009-ebf34c8fb46c)|Average:26.21%
		</Text>
		<AlertType>EC2 Resource Utilization</AlertType>
		<TriggeredBy>Testing 201</TriggeredBy>
	</AlertResultItemModel>
</AlertResults>

JSON Example:

{
  "AlertResults": {
    "AlertResultItemModel": [
      {
        "Id": "59368",
        "CanIgnore": "false",
        "Triggered": "10/26/2016 1:23 PM",
        "Text": "InstanceCount:16",
        "AlertType": "EC2 Number of Instances",
        "TriggeredBy": "Test1"
      },
      {
        "Id": "5296",
        "CanIgnore": "false",
        "Triggered": "7/21/2016 10:17 PM",
        "Text": "InstanceCount:8",
        "AlertType": "EC2 Number of Instances",
        "TriggeredBy": "Test1"
      },
      {
        "Id": "5219",
        "UiId": "Instance: i-42c89df7 (ECS Instance - EC2ContainerService-default-367f5c36-273e-4735-8009-ebf34c8fb46c)",
        "CanIgnore": "true",
        "Triggered": "7/9/2016 4:18 PM",
        "Text": "Resource:CPUUtilization|Instance:i-42c89df7 (ECS Instance - EC2ContainerService-default-367f5c36-273e-4735-8009-ebf34c8fb46c)|Average:26.21%",
        "AlertType": "EC2 Resource Utilization",
        "TriggeredBy": "Testing 201"
      }
    ]
  }
}

GET RESOURCES ALERT RESULTS

The API method “get_resources_alert_results” is used to programmatically retrieve the list of configured alerts related to resources within an account.

XML call:

https://api.cloudcheckr.com/api/alert.xml/get_resources_alert_results?access_key=[access_key]

JSON call:

https://api.cloudcheckr.com/api/alert.json/get_resources_alert_results?access_key=[access_key]

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard access key required for all API calls.
  • from (optional) – return report from this date. The date format is MM/DD/YYYY.
  • to (optional) – return report to this date. The date format is MM/DD/YYYY.
  • alert_name (optional) – the name of the alert.
  • max_results (optional) – the max number of results to return before paginating the results.
  • enabled (optional) – retrieve all the alerts that are currently enabled for the project. Accepts true/false.
  • use_account (required for admin API key) – The specific account you wish to query.
  • use_cc_account_id (required when using Admin API Access Key) – The CloudCheckr ID of the account you are making the call for. The ID is returned when using the method ‘account/add_accountv2′ to register the account in CloudCheckr.
  • use_aws_account_id (optional) – The ID of the AWS account in question.

OUTPUT

XML Example:

<AlertResults>
	<AlertResultItemModel>
		<Id>63146</Id>
		<CanIgnore>false</CanIgnore>
		<Triggered>11/8/2016 7:52 PM</Triggered>
		<Text>
			ChangeType:Added|Service:EC2|Region:US East (Northern Virginia)|Identifier:launch-wizard-00|OldValue:[]|NewValue:[{"Key":"GroupDescription","Value":"launch-wizard-00 created 2016-05-02T08:55:32.509-04:00"},{"Key":"GroupId","Value":"sg-6a0f1XXd"},{"Key":"GroupName","Value":"launch-wizard-00"}]
		</Text>
		<AlertType>Security Group Changes</AlertType>
		<TriggeredBy>TEST_Sec_Grp_Changes</TriggeredBy>
	</AlertResultItemModel>
</AlertResults>

JSON Example:

{
  "AlertResults": {
    "AlertResultItemModel": {
      "Id": "63146",
      "CanIgnore": "false",
      "Triggered": "11/8/2016 7:52 PM",
      "Text": "ChangeType:Added|Service:EC2|Region:US East (Northern Virginia)|Identifier:launch-wizard-00|OldValue:[]|NewValue:[{\"Key\":\"GroupDescription\",\"Value\":\"launch-wizard-00 created 2016-05-02T08:55:32.509-04:00\"},{\"Key\":\"GroupId\",\"Value\":\"sg-6a0f1XXd\"},{\"Key\":\"GroupName\",\"Value\":\"launch-wizard-00\"}]",
      "AlertType": "Security Group Changes",
      "TriggeredBy": "TEST_Sec_Grp_Changes"
    }
  }
}

GET PUBLICLY ACCESSIBLE RESOURCES

The API method “get_publicly_accessible_resources” is used to show you the publicly accessible resources for any given account within CloudChecker.

XML call:

https://api.cloudcheckr.com/api/security.xml/get_publicly_accessible_resources?access_key=[ACCESS KEY]

JSON call:

https://api.cloudcheckr.com/api/security.json/get_publicly_accessible_resources?access_key=[ACCESS KEY]

This call accepts these parameters:

  • access_key (required) – standard Access Key required for all API calls.

Note: If using an admin API key, use_account is required

OUTPUT

XML Example:

<PubliclyAccessibleResourcesResponse>
    <PubliclyAccessibleEc2Instances>
        <PubliclyAccessibleEc2Instance>
            <Region>US East (Northern Virginia)</Region>
            <AvailabilityZone>us-east-1d</AvailabilityZone>
            <VpcId>vpc-24343948</VpcId>
            <SubnetId>subnet-38343954</SubnetId>
            <Instance>i-ecbca690 (VPCTest)</Instance>
            <IpAddress>54.208.129.79</IpAddress>
        </PubliclyAccessibleEc2Instance>
        <PubliclyAccessibleEc2Instance>
            <Region>US East (Northern Virginia)</Region>
            <AvailabilityZone>us-east-1d</AvailabilityZone>
            <VpcId>vpc-24343948</VpcId>
            <SubnetId>subnet-b116b3c6</SubnetId>
            <Instance>i-f2c28109</Instance>
            <IpAddress>54.86.207.128</IpAddress>
        </PubliclyAccessibleEc2Instance>
        <PubliclyAccessibleEc2Instance>
            <Region>EU (Frankfurt)</Region>
            <AvailabilityZone>eu-central-1a</AvailabilityZone>
            <VpcId>vpc-4c08ec25</VpcId>
            <SubnetId>subnet-ecef0885</SubnetId>
            <Instance>i-945d3d5a (Frankfurt)</Instance>
            <IpAddress>54.93.171.200</IpAddress>
        </PubliclyAccessibleEc2Instance>
    </PubliclyAccessibleEc2Instances>
    <PubliclyAccessibleRdsInstances/>
    <PubliclyAccessibleRedshiftClusters/>
    <PubliclyAccessibleS3Buckets></PubliclyAccessibleS3Buckets>
</PubliclyAccessibleResourcesResponse>

JSON Example:

{
    "PubliclyAccessibleEc2Instances":[
        {
            "Instance":"i-932ce7c1 (Default-Environment)",
            "IpAddress":"54.211.156.217",
            "Region":"US East (Northern Virginia)",
            "AvailabilityZone":null,
            "VpcId":null,
            "SubnetId":null
        },
        {
            "Instance":"i-0c1ad1e3",
            "IpAddress":"23.20.180.34",
            "Region":"US East (Northern Virginia)",
            "AvailabilityZone":null,
            "VpcId":null,
            "SubnetId":null
        },
        {
            "Instance":"i-1cca06e6 (testingvpc1-env)",
            "IpAddress":"52.0.169.238",
            "Region":"US East (Northern Virginia)",
            "AvailabilityZone":"us-east-1d",
            "VpcId":"vpc-24343948",
            "SubnetId":"subnet-38343954"		
        },
        {
            "Instance":"i-ecbca690 (VPCTest)",
            "IpAddress":"54.208.129.79",
            "Region":"US East (Northern Virginia)",
            "AvailabilityZone":"us-east-1d",
            "VpcId":"vpc-24343948",
            "SubnetId":"subnet-38343954"
        }
    ],
    "PubliclyAccessibleRdsInstances":[
    ],
    "PubliclyAccessibleRedshiftClusters":[
    ],
    "PubliclyAccessibleS3Buckets":[
        {
            "Name":"examplebucket",
            "Endpoint":"https://s3.amazonaws.com/examplebucket/",
            "Region":"South America (São Paulo)",
            "Permissions":" 	
                "Bucket: examplebucket | Grantee: Everyone | Permission: List (Read)"
                "Bucket: examplebucket | Grantee: Everyone | Permission: View Permissions (Read_Acp)"
            }
	]
}

INVENTORY SUMMARY

The API method “get_resources” is used to pull the data for the Inventory Summary report from CloudCheckr. This will provide the total number of resources being run across each AWS Service.

XML call:

https://api.cloudcheckr.com/api/inventory.xml/get_resources?access_key=[access_key]&date=01/01/2014

JSON call:

https://api.cloudcheckr.com/api/inventory.json/get_resources?access_key=[access_key]&date=01/01/2014

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard Access Key required for all API calls.
  • date (optional) – return report from this date. If date is not defined, the most recent report will be returned.
  • use_account (optional; required if using an Admin API key) – return report for this account.

OUTPUT

XML Example:

<GetResourcesResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <DateOfResults>2014-08-01T22:43:06</DateOfResults>
    <Services>
      <Service>
          <Name>EC2</Name>
       <Metrics>
          <Metric>
             <Name>Running Instances</Name>
             <Value>7</Value>
             <Description>Across 8 Regions</Description>
       </Metric>
          <Metric>
             <Name>EBS Volumes</Name>
             <Value>37</Value>
          </Metric>
       </Metrics>
    </Service>

JSON Example:

{
    "DateOfResults": "2014-08-18T20:31:21",
    "Services": [{
        "Name": "EC2",
        "Metrics": [{
        "Name": "Running Instances",
        "Value": "4",
        "Description": "Across 8 Regions"
        }, {
        "Name": "EBS Volumes",
        "Value": "37",
        "Description": null
        }]
    }, {
        "Name": "Reserved Instances",
        "Metrics": [{
        "Name": "Active Reservations",
        "Value": "4",
        "Description": "For 4 instances"
        }, {
        "Name": "Retired Reservations",
        "Value": "12",
        "Description": null
        }]
    }, {
        "Name": "S3",
        "Metrics": [{
        "Name": "Buckets",
        "Value": "34",
        "Description": null
        }, {
        "Name": "Objects",
        "Value": "434,623",
        "Description": "Storage used: 116.10 GB"
        }]
    }, {
        "Name": "CloudFront",
        "Metrics": [{
        "Name": "Web Distributions",
        "Value": "4",
        "Description": "3 Enabled"
        }, {
        "Name": "RTMP Distributions",
        "Value": "1",
        "Description": "1 Enabled"
        }]
    }]
}

GET COST SAVINGS REPORT RESULTS

The API method “get_cost_saving” is used to export results from the Cost Savings Report.

XML call:

https://api.cloudcheckr.com/api/billing.xml/get_cost_saving?access_key=[access_key]

JSON call:

https://api.cloudcheckr.com/api/billing.json/get_cost_saving?access_key=[access_key]

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – Standard Access Key required for all API calls
  • date (optional) – Return report from this date. If date is not defined, the most recent report will be returned.
  • groupby (optional) – Accepts values ‘ByCheck’ or ‘ByAccount’. Groups Results by Check or Account.
  • use_account (required when using Admin API Access Key) – The name of the account you are making the call for, where the name is the name of the account added in CloudCheckr.
  • use_cc_account_id (required when using Admin API Access Key) – The CloudCheckr ID of the account you are making the call for. The ID is returned when using the method ‘account/add_accountv2′ to register the account in CloudCheckr.

OUTPUT

XML Example:

<GetCostSavingResponse
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <TotalSaving>337.68083333333333333333333333</TotalSaving>
    <TotalIdleResourcesSaving>104.08</TotalIdleResourcesSaving>
    <TotalUnusedResourcesSaving>124.40</TotalUnusedResourcesSaving>
    <TotalMisProvisionedResourcesSaving>38.80</TotalMisProvisionedResourcesSaving>
    <TotalPreviousGenerationResourcesSaving>35.28</TotalPreviousGenerationResourcesSaving>
    <TotalRIPurchaseRecommendationResourcesSaving>35.120833333333333333333333333</TotalRIPurchaseRecommendationResourcesSaving>
    <TotalMiscellaneousResourcesSaving>0</TotalMiscellaneousResourcesSaving>
    <IdleResources>
        <Resources>
            <Name>Idle EC2 Instances</Name>
            <TotalCount>8</TotalCount>
            <TotalSaving>103.96</TotalSaving>
            <Detail>
                <string>
Instance: i-0234039a (TestingRIRec - Magnus) | CPU Util: 0.02% | Network In (Bytes): 124 | Network Out (Bytes): 122 | Predicted Monthly Cost: $5.36 | Region: US East (Northern Virginia)
</string>
                <string>
Instance: i-05057cb7 (ECS Instance - EC2ContainerService-default-de0d31f9-78d0-48da-9c29-e65de700a7d9) | CPU Util: 0.47% | Network In (Bytes): 147 | Network Out (Bytes): 90 | Predicted Monthly Cost: $15.52 | Region: US West (Northern California)
</string>

JSON Example:

{
    "GetCostSavingResponse": {
        "TotalSaving": "337.68083333333333333333333333",
        "TotalIdleResourcesSaving": "104.08",
        "TotalUnusedResourcesSaving": "124.40",
        "TotalMisProvisionedResourcesSaving": "38.80",
        "TotalPreviousGenerationResourcesSaving": "35.28",
        "TotalRIPurchaseRecommendationResourcesSaving": "35.120833333333333333333333333",
        "TotalMiscellaneousResourcesSaving": "0",
        "IdleResources": {
            "Resources": [
                {
                    "Name": "Idle EC2 Instances",
                    "TotalCount": "8",
                    "TotalSaving": "103.96",
                    "Detail": {
                        "string": [
                            "\nInstance: i-0234039a (TestingRIRec - Magnus) | CPU Util: 0.02% | Network In (Bytes): 124 | Network Out (Bytes): 122 | Predicted Monthly Cost: $5.36 | Region: US East (Northern Virginia)\n",
                            "\nInstance: i-05057cb7 (ECS Instance - EC2ContainerService-default-de0d31f9-78d0-48da-9c29-e65de700a7d9) | CPU Util: 0.47% | Network In (Bytes): 147 | Network Out (Bytes): 90 | Predicted Monthly Cost: $15.52 | Region: US West (Northern California)\n",
                            "\nInstance: i-10bc0ab7 (Seoul) | CPU Util: 0.03% | Network In (Bytes): 706 | Network Out (Bytes): 1,102 | Predicted Monthly Cost: $7.92 | Region: Asia Pacific (Seoul)\n",
                            "\nInstance: i-5082b990 (ECS Instance - EC2ContainerService-default-367f5c36-273e-4735-8009-ebf34c8fb46c) | CPU Util: 0.49% | Network In (Bytes): 146 | Network Out (Bytes): 98 | Predicted Monthly Cost: $15.52 | Region: US West (Northern California)\n",
                            "\nInstance: i-681292f3 (CWLogs_Test) | CPU Util: 0.17% | Network In (Bytes): 2,025 | Network Out (Bytes): 1,813 | Predicted Monthly Cost: $31.49 | Region: US East (Northern Virginia)\n",
                            "\nInstance: i-945d3d5a (Frankfurt) | CPU Util: 0.04% | Network In (Bytes): 2,430 | Network Out (Bytes): 5,405 | Predicted Monthly Cost: $10.99 | Region: EU (Frankfurt)\n",
                            "\nInstance: i-9e13195e (ECS Instance - EC2ContainerService-default-fa0353c5-b32c-4c5c-9fbd-3df92d3551d9) | CPU Util: 0.74% | Network In (Bytes): 1,975 | Network Out (Bytes): 6,970 | Predicted Monthly Cost: $15.52 | Region: US West (Northern California)\n",
                            "\nInstance: i-a920192d (BriceLinuxTest) | CPU Util: 0.02% | Network In (Bytes): 97 | Network Out (Bytes): 63 | Predicted Monthly Cost: $1.64 | Region: US East (Northern Virginia)\n"
                        ]
                    }
                },
                {
                    "Name": "Idle DynamoDB Tables",
                    "TotalCount": "6",
                    "TotalSaving": "0.12",
                    "Detail": {
                        "string": [
                            "\nTable: ProductCatallog | Average Read Capacity Consumed: 0.00 | Provisioned Reads: 10.00 | Read Percent Utilized: 0.00% | Monthly Provisioned Reads Cost: $0.01 | Average Write Capacity Consumed: 0.00 | Provisioned Writes: 5.00 | Write Percent Utilized: 0.00% | Monthly Provisioned Writes Cost: $0.01 | Region: US East (Northern Virginia) | Timeframe: Previous 24 hours\n",
                            "\nTable: aarontestdynamo | Average Read Capacity Consumed: 0.00 | Provisioned Reads: 1.00 | Read Percent Utilized: 0.00% | Monthly Provisioned Reads Cost: $0.01 | Average Write Capacity Consumed: 0.00 | Provisioned Writes: 2.00 | Write Percent Utilized: 0.00% | Monthly Provisioned Writes Cost: $0.01 | Region: US East (Northern Virginia) | Timeframe: Previous 24 hours\n",
                            "\nTable: testagain | Average Read Capacity Consumed: 0.00 | Provisioned Reads: 1.00 | Read Percent Utilized: 0.00% | Monthly Provisioned Reads Cost: $0.01 | Average Write Capacity Consumed: 0.00 | Provisioned Writes: 1.00 | Write Percent Utilized: 0.00% | Monthly Provisioned Writes Cost: $0.01 | Region: US East (Northern Virginia) | Timeframe: Previous 24 hours\n",
                            "\nTable: SimpleLookupTable | Average Read Capacity Consumed: 0.00 | Provisioned Reads: 1.00 | Read Percent Utilized: 0.00% | Monthly Provisioned Reads Cost: $0.01 | Average Write Capacity Consumed: 0.00 | Provisioned Writes: 1.00 | Write Percent Utilized: 0.00% | Monthly Provisioned Writes Cost: $0.01 | Region: US West (Oregon) | Timeframe: Previous 24 hours\n",
                            "\nTable: TestFromAWSExplorer | Average Read Capacity Consumed: 0.00 | Provisioned Reads: 5.00 | Read Percent Utilized: 0.00% | Monthly Provisioned Reads Cost: $0.01 | Average Write Capacity Consumed: 0.00 | Provisioned Writes: 10.00 | Write Percent Utilized: 0.00% | Monthly Provisioned Writes Cost: $0.01 | Region: US West (Oregon) | Timeframe: Previous 24 hours\n",
                            "\nTable: cm-test-1 | Average Read Capacity Consumed: 0.00 | Provisioned Reads: 3.00 | Read Percent Utilized: 0.00% | Monthly Provisioned Reads Cost: $0.01 | Average Write Capacity Consumed: 0.00 | Provisioned Writes: 1.00 | Write Percent Utilized: 0.00% | Monthly Provisioned Writes Cost: $0.01 | Region: Asia Pacific (Singapore) | Timeframe: Previous 24 hours\n"
                        ]
                    }
                }
            ]
        },
        "UnusedResources": {
            "Resources": [
                {
                    "Name": "Unattached EBS Volumes",
                    "TotalCount": "9",
                    "TotalSaving": "120.80",
                    "Detail": {
                        "string": [
                            "\nVolume ID: vol-0fcac9cc | Size: 100 GiB | Predicted Monthly Cost: $11.00 | EC2 Instance: None | Region: EU (Ireland)\n",
                            "\nVolume ID: vol-288874cc | Size: 100 GiB | Predicted Monthly Cost: $12.00 | EC2 Instance: None | Region: US West (Northern California)\n",
                            "\nVolume ID: vol-4665bc03 | Size: 2 GiB | Predicted Monthly Cost: $0.20 | EC2 Instance: None | Region: US East (Northern Virginia)\n",
                            "\nVolume ID: vol-4a11cbbd | Size: 100 GiB | Predicted Monthly Cost: $19.00 | EC2 Instance: None | Region: US West (Oregon)\n",
                            "\nVolume ID: vol-6acac9a9 | Size: 100 GiB | Predicted Monthly Cost: $21.00 | EC2 Instance: None | Region: EU (Ireland)\n",
                            "\nVolume ID: vol-8aa0e353 | Size: 100 GiB | Predicted Monthly Cost: $22.70 | EC2 Instance: None | Region: EU (Frankfurt)\n",
                            "\nVolume ID: vol-b6a0e36f | Size: 100 GiB | Predicted Monthly Cost: $5.90 | EC2 Instance: None | Region: EU (Frankfurt)\n",
                            "\nVolume ID: vol-cdefb40a | Size: 100 GiB | Predicted Monthly Cost: $8.00 | EC2 Instance: None | Region: Asia Pacific (Singapore)\n",
                            "\nVolume ID: vol-e7efb420 | Size: 100 GiB | Predicted Monthly Cost: $21.00 | EC2 Instance: None | Region: Asia Pacific (Singapore)\n"
                        ]
                    }
                },
                {
                    "Name": "Unused Elastic IP Addresses",
                    "TotalCount": "1",
                    "TotalSaving": "3.60",
                    "Detail": {
                        "string": "\nIP: 177.71.178.126 | Associated with: No instance | Predicted Monthly Cost: $3.60 | Region: South America (S?o Paulo)\n"
                    }
                },
                {
                    "Name": "Unused DynamoDB Tables",
                    "TotalCount": "4",
                    "TotalSaving": "0.00",
                    "Detail": {
                        "string": [
                            "\nTable: testagain | Status: ACTIVE | Created: 6/26/2013 8:09:40 PM UTC | Item Count: 0 | Region: US East (Northern Virginia) | MTD Read Cost: $0.00 | MTD Write Cost: $0.00\n",
                            "\nTable: SimpleLookupTable | Status: ACTIVE | Created: 7/9/2015 1:23:50 PM UTC | Item Count: 0 | Region: US West (Oregon) | MTD Read Cost: $0.00 | MTD Write Cost: $0.00\n",
                            "\nTable: TestFromAWSExplorer | Status: ACTIVE | Created: 6/24/2014 6:09:47 PM UTC | Item Count: 0 | Region: US West (Oregon) | MTD Read Cost: $0.00 | MTD Write Cost: $0.00\n",
                            "\nTable: cm-test-1 | Status: ACTIVE | Created: 10/7/2013 6:25:20 PM UTC | Item Count: 0 | Region: Asia Pacific (Singapore) | MTD Read Cost: $0.00 | MTD Write Cost: $0.00\n"
                        ]
                    }
                }
            ]
        },
        "MisProvisionedResources": {
            "Resources": {
                "Name": "\nEBS PIOPS Volumes Should Be Converted To General Purpose SSD\n",
                "TotalCount": "4",
                "TotalSaving": "38.80",
                "Detail": {
                    "string": [
                        "\nEBS Volume Id: vol-4a11cbbd | Region: US West (Oregon) | Recommendation: convert from Provisioned IOPS to General Purpose (SSD) Storage Type | Current Disk Size: 100GB | Current IOPS: 100 | Convert Disk to SSD of size: 100GB | IOPS from new SSD: 300 | Monthly Cost for Provisioned IOPS: $19.00 | Monthly Cost for recommended General Purpose (SSD): $10.00 | Monthly Saving: $9.00\n",
                        "\nEBS Volume Id: vol-6acac9a9 | Region: EU (Ireland) | Recommendation: convert from Provisioned IOPS to General Purpose (SSD) Storage Type | Current Disk Size: 100GB | Current IOPS: 100 | Convert Disk to SSD of size: 100GB | IOPS from new SSD: 300 | Monthly Cost for Provisioned IOPS: $21.00 | Monthly Cost for recommended General Purpose (SSD): $11.00 | Monthly Saving: $10.00\n",
                        "\nEBS Volume Id: vol-8aa0e353 | Region: EU (Frankfurt) | Recommendation: convert from Provisioned IOPS to General Purpose (SSD) Storage Type | Current Disk Size: 100GB | Current IOPS: 100 | Convert Disk to SSD of size: 100GB | IOPS from new SSD: 300 | Monthly Cost for Provisioned IOPS: $22.70 | Monthly Cost for recommended General Purpose (SSD): $11.90 | Monthly Saving: $10.80\n",
                        "\nEBS Volume Id: vol-e7efb420 | Region: Asia Pacific (Singapore) | Recommendation: convert from Provisioned IOPS to General Purpose (SSD) Storage Type | Current Disk Size: 100GB | Current IOPS: 100 | Convert Disk to SSD of size: 100GB | IOPS from new SSD: 300 | Monthly Cost for Provisioned IOPS: $21.00 | Monthly Cost for recommended General Purpose (SSD): $12.00 | Monthly Saving: $9.00\n"
                    ]
                }
            }
        },
        "PreviousGenerationResources": {
            "Resources": {
                "Name": "\nPrevious Generation EC2 Instances Should Be Migrated\n",
                "TotalCount": "6",
                "TotalSaving": "35.28",
                "Detail": {
                    "string": [
                        "\nInstance: i-5560c207 (MediumRI) | Region: US East (Northern Virginia) | Recommendation: Migrate from m1.small to t2.small | On-Demand Current Monthly Cost: $31.68 | Cost for Recommended: $18.72 | Yearly Savings: $155.52 | Platform: Linux | Virtualization Type: paravirtual | vCPU for current: 1 | vCPU for next gen: 1 | Memory for current: 1.7 GB | Memory for next gen: 2 GB\n",
                        "\nInstance: i-a21a9dee | Region: EU (Ireland) | Recommendation: Migrate from t1.micro to t2.micro | On-Demand Current Monthly Cost: $14.40 | Cost for Recommended: $13.68 | Yearly Savings: $8.64 | Platform: Windows | Virtualization Type: hvm | vCPU for current: 1 | vCPU for next gen: 1 | Memory for current: 0.615 GB | Memory for next gen: 1 GB\n",
                        "\nInstance: i-188ddd36 (NewRelic) | Region: US East (Northern Virginia) | Recommendation: Migrate from t1.micro to t2.micro | On-Demand Current Monthly Cost: $14.40 | Cost for Recommended: $9.36 | Yearly Savings: $60.48 | Platform: Linux | Virtualization Type: paravirtual | vCPU for current: 1 | vCPU for next gen: 1 | Memory for current: 0.615 GB | Memory for next gen: 1 GB\n",
                        "\nInstance: i-ecbca690 (VPCTest) | Region: US East (Northern Virginia) | Recommendation: Migrate from t1.micro to t2.micro | On-Demand Current Monthly Cost: $14.40 | Cost for Recommended: $9.36 | Yearly Savings: $60.48 | Platform: LinuxVpc | Virtualization Type: paravirtual | vCPU for current: 1 | vCPU for next gen: 1 | Memory for current: 0.615 GB | Memory for next gen: 1 GB\n",
                        "\nInstance: i-daba0280 | Region: US West (Northern California) | Recommendation: Migrate from t1.micro to t2.micro | On-Demand Current Monthly Cost: $25.20 | Cost for Recommended: $19.44 | Yearly Savings: $69.12 | Platform: LinuxSuse | Virtualization Type: paravirtual | vCPU for current: 1 | vCPU for next gen: 1 | Memory for current: 0.615 GB | Memory for next gen: 1 GB\n",
                        "\nInstance: i-2895fd72 (OpenSuseCali) | Region: US West (Northern California) | Recommendation: Migrate from t1.micro to t2.micro | On-Demand Current Monthly Cost: $18.00 | Cost for Recommended: $12.24 | Yearly Savings: $69.12 | Platform: Linux | Virtualization Type: paravirtual | vCPU for current: 1 | vCPU for next gen: 1 | Memory for current: 0.615 GB | Memory for next gen: 1 GB\n"
                    ]
                }
            }
        },
        "RIPurchaseRecommendationResources": {
            "Resources": [
                {
                    "Name": "EC2 Reserved Instance Purchase Recommendations",
                    "TotalCount": "7",
                    "TotalSaving": "28.767500000000000000000000000",
                    "Detail": {
                        "string": [
                            "\nNumber: 1 | Instance Type: t2.micro | AZ: eu-central-1a | Platform: LinuxVpc | Commitment Type: 1 Year Partial Upfront | Tenancy: Default | Upfront RI Cost: $55.00 | Reserved Monthly Cost: $2.92 | On-Demand Monthly Cost: $10.66 | Total Savings: $37.89\n",
                            "\nNumber: 2 | Instance Type: t2.micro | AZ: us-west-1a | Platform: LinuxVpc | Commitment Type: 1 Year Partial Upfront | Tenancy: Default | Upfront RI Cost: $136.00 | Reserved Monthly Cost: $5.84 | On-Demand Monthly Cost: $24.17 | Total Savings: $83.90\n",
                            "\nNumber: 1 | Instance Type: t2.micro | AZ: us-west-1c | Platform: LinuxVpc | Commitment Type: 1 Year Partial Upfront | Tenancy: Default | Upfront RI Cost: $68.00 | Reserved Monthly Cost: $2.92 | On-Demand Monthly Cost: $12.08 | Total Savings: $41.95\n",
                            "\nNumber: 1 | Instance Type: t2.nano | AZ: ap-northeast-2a | Platform: LinuxVpc | Commitment Type: 1 Year Partial Upfront | Tenancy: Default | Upfront RI Cost: $32.00 | Reserved Monthly Cost: $2.92 | On-Demand Monthly Cost: $7.11 | Total Savings: $18.25\n",
                            "\nNumber: 1 | Instance Type: t1.micro | AZ: us-west-1b | Platform: Linux | Commitment Type: 1 Year Partial Upfront | Tenancy: Default | Upfront RI Cost: $62.00 | Reserved Monthly Cost: $5.84 | On-Demand Monthly Cost: $17.77 | Total Savings: $81.14\n",
                            "\nNumber: 1 | Instance Type: t1.micro | AZ: us-west-2b | Platform: Linux | Commitment Type: 1 Year Partial Upfront | Tenancy: Default | Upfront RI Cost: $62.00 | Reserved Monthly Cost: $3.65 | On-Demand Monthly Cost: $14.21 | Total Savings: $64.78\n",
                            "\nNumber: 1 | Instance Type: t2.nano | AZ: us-east-1a | Platform: LinuxVpc | Commitment Type: 1 Year Partial Upfront | Tenancy: Default | Upfront RI Cost: $25.00 | Reserved Monthly Cost: $1.10 | On-Demand Monthly Cost: $4.62 | Total Savings: $17.30\n"
                        ]
                    }
                },
                {
                    "Name": "ElastiCache Reserved Node Purchase Recommendations",
                    "TotalCount": "1",
                    "TotalSaving": "6.3533333333333333333333333333",
                    "Detail": {
                        "string": "\nNumber: 1 | Cache Node Type: cache.t1.micro | Engine: memcached | Region: US East (Northern Virginia) | Upfront RI Cost: $62.00 | Reserved Monthly Cost: $4.32 | On-Demand Monthly Cost: $15.84 | Total Savings: $76.24\n"
                    }
                }
            ]
        },
        "_xmlns:xsd": "http://www.w3.org/2001/XMLSchema",
        "_xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance"
    }
}

BILLING & COST MANAGEMENT DASHBOARD

The API method “get_dashboard” is used to export the Billing Dashboard.

XML call:

https://api.cloudcheckr.com/api/billing.xml/get_dashboard?access_key=[access_key]

JSON call:

https://api.cloudcheckr.com/api/billing.json/get_dashboard?access_key=[access_key]

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – Standard Access Key required for all API calls
  • use_account (required when using Admin API Access Key) – The name of the account you are making the call for, where the name is the name of the account added in CloudCheckr.
  • use_cc_account_id (required when using Admin API Access Key) – The CloudCheckr ID of the account you are making the call for. The ID is returned when using the method ‘account/add_accountv2′ to register the account in CloudCheckr.

OUTPUT

XML Example:

<GetDashboardResponse 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Summary>
        <DashboardSummary>
            <AccountName>2150 AWS</AccountName>
            <LastMonth>$3,817.33</LastMonth>
            <MonthToDate>$1,400.29</MonthToDate>
            <Forecast>$3,354.74</Forecast>
            <SpendByService>
                <BillingDashboardService>
                    <ServiceCost>1073.0788971200</ServiceCost>
                    <Service>AmazonEC2</Service>
                </BillingDashboardService>
                <BillingDashboardService>
                    <ServiceCost>138.5757164400</ServiceCost>
                    <Service>AmazonRDS</Service>
                </BillingDashboardService>
                <BillingDashboardService>
                    <ServiceCost>111.3280377255</ServiceCost>
                    <Service>AWSSupportBusiness</Service>
                </BillingDashboardService>
                <BillingDashboardService>
                    <ServiceCost>37.5842575500</ServiceCost>
                    <Service>AmazonS3</Service>
                </BillingDashboardService>
                <BillingDashboardService>
                    <ServiceCost>12.2500025100</ServiceCost>
                    <Service>AmazonVPC</Service>
                </BillingDashboardService>
                <BillingDashboardService>
                    <ServiceCost>11.0580385245</ServiceCost>
                    <Service>Others</Service>
                </BillingDashboardService>
                <BillingDashboardService>
                    <ServiceCost>11.0250000000</ServiceCost>
                    <Service>AmazonKinesis</Service>
                </BillingDashboardService>
                <BillingDashboardService>
                    <ServiceCost>5.3900000000</ServiceCost>
                    <Service>AmazonElastiCache</Service>
                </BillingDashboardService>
            </SpendByService>
        </DashboardSummary>
    </Summary>
</GetDashboardResponse>

JSON Example:

{
  "Summary": [
    {
      "AccountName": "2150 AWS",
      "LastMonth": "$3,817.33",
      "MonthToDate": "$1,400.29",
      "Forecast": "$3,354.74",
      "SpendByService": [
        {
          "ServiceCost": 1073.07889712,
          "Service": "AmazonEC2"
        },
        {
          "ServiceCost": 138.57571644,
          "Service": "AmazonRDS"
        },
        {
          "ServiceCost": 111.3280377255,
          "Service": "AWSSupportBusiness"
        },
        {
          "ServiceCost": 37.58425755,
          "Service": "AmazonS3"
        },
        {
          "ServiceCost": 12.25000251,
          "Service": "AmazonVPC"
        },
        {
          "ServiceCost": 11.0580385245,
          "Service": "Others"
        },
        {
          "ServiceCost": 11.025,
          "Service": "AmazonKinesis"
        },
        {
          "ServiceCost": 5.39,
          "Service": "AmazonElastiCache"
        }
      ]
    }
  ]
}

GET MONTHLY BILL

The API method “get_monthly_bill” is used to export the Single Month Billing Summary.

XML call:

https://api.cloudcheckr.com/api/billing.xml/get_monthly_bill?access_key=[access_key]

JSON call:

https://api.cloudcheckr.com/api/billing.json/get_monthly_bill?access_key=[access_key]

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – Standard Access Key required for all API calls
  • use_account (required when using Admin API Access Key) – The name of the account you are making the call for, where the name is the name of the account added in CloudCheckr.
  • use_cc_account_id (required when using Admin API Access Key) – The CloudCheckr ID of the account you are making the call for. The ID is returned when using the method ‘account/add_accountv2′ to register the account in CloudCheckr.
  • aws_account_id (optional) – return statistics from specific AWS accounts. Enter the full AWS Account Id.  Defaults to ALL accounts when looking at a payer account.
  • include_services (optional) – comma separated list of services such as amazons3, amazonec2.
  • for_date (optional) – date of bill to analyze, defaults to current month. The format for the value of this parameter is MM-DD-YYYY
  • amortize_cost (optional) -This accepts values of yes/no. This is equivalent to selecting the box Amortize Reserved Instance Cost within the Single Month Billing Summary.
  • cost_type (optional) – List, Blended or Unblended. This defaults to List Cost.

OUTPUT

XML call:

<Summary>
  <MonthlyToDateCost>$722.78</MonthlyToDateCost>
  <MonthlyToDateCredit>$50.00</MonthlyToDateCredit>
  <MonthlyToDateBill>$672.78</MonthlyToDateBill>
  <AverageDailyNetBill>$25.51</AverageDailyNetBill>
  <HighestCost>
    <ServiceName>EC2</ServiceName>
    <Cost>$527.06</Cost>
  </HighestCost>
  <HighestDaily>
    <Date>5/23/2016</Date>
    <Bill>$232.35</Bill>
  </HighestDaily>
  <LowestDaily>
    <Date>5/2/2016</Date>
    <Bill>$7.48</Bill>
  </LowestDaily>
  <HighestChange>
    <StartDate>5/23/2016</StartDate>
    <EndDate>5/24/2016</EndDate>
    <ChangeAmount>$223.25</ChangeAmount>
    <ChangePercent>96.09%</ChangePercent>
  </HighestChange>
</Summary>
<BillByDay>
  <DailyBill>
    <Day>5/1/2016</Day>
    <Cost>$25.28</Cost>
    <Credits>$12.29</Credits>
    <Bill>$12.99</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/2/2016</Day>
    <Cost>$18.53</Cost>
    <Credits>$11.05</Credits>
    <Bill>$7.48</Bill>
  </DailyBill>
    <DailyBill>
    <Day>5/3/2016</Day>
    <Cost>$18.95</Cost>
    <Credits>$10.79</Credits>
    <Bill>$8.16</Bill>
  </DailyBill>
    <DailyBill>
    <Day>5/4/2016</Day>
    <Cost>$18.69</Cost>
    <Credits>$10.46</Credits>
    <Bill>$8.23</Bill>
  </DailyBill>
    <DailyBill>
    <Day>5/5/2016</Day>
    <Cost>$17.78</Cost>
    <Credits>$5.40</Credits>
    <Bill>$12.37</Bill>
  </DailyBill>
    <DailyBill>
    <Day>5/6/2016</Day>
    <Cost>$17.74</Cost>
    <Credits>$0.00</Credits>
    <Bill>$17.74</Bill>
  </DailyBill>
    <DailyBill>
    <Day>5/7/2016</Day>
    <Cost>$15.98</Cost>
    <Credits>$0.00</Credits>
    <Bill>$15.98</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/8/2016</Day>
    <Cost>$17.34</Cost>
    <Credits>$0.00</Credits>
    <Bill>$17.34</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/9/2016</Day>
    <Cost>$17.11</Cost>
    <Credits>$0.00</Credits>
    <Bill>$17.11</Bill>
  </DailyBill>
    <DailyBill>
    <Day>5/10/2016</Day>
    <Cost>$16.43</Cost>
    <Credits>$0.00</Credits>
    <Bill>$16.43</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/11/2016</Day>
    <Cost>$16.47</Cost>
    <Credits>$0.00</Credits>
    <Bill>$16.47</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/12/2016</Day>
    <Cost>$16.53</Cost>
    <Credits>$0.00</Credits>
    <Bill>$16.53</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/13/2016</Day>
    <Cost>$17.69</Cost>
    <Credits>$0.00</Credits>
    <Bill>$17.69</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/14/2016</Day>
    <Cost>$16.85</Cost>
    <Credits>$0.00</Credits>
    <Bill>$16.85</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/15/2016</Day>
    <Cost>$18.65</Cost>
    <Credits>$0.00</Credits>
    <Bill>$18.65</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/16/2016</Day>
    <Cost>$18.87</Cost>
    <Credits>$0.00</Credits>
    <Bill>$18.87</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/17/2016</Day>
    <Cost>$18.17</Cost>
    <Credits>$0.00</Credits>
    <Bill>$18.17</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/18/2016</Day>
    <Cost>$18.00</Cost>
    <Credits>$0.00</Credits>
    <Bill>$18.00</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/19/2016</Day>
    <Cost>$19.10</Cost>
    <Credits>$0.00</Credits>
    <Bill>$19.10</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/20/2016</Day>
    <Cost>$21.00</Cost>
    <Credits>$0.00</Credits>
    <Bill>$21.00</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/21/2016</Day>
    <Cost>$26.66</Cost>
    <Credits>$0.00</Credits>
    <Bill>$26.66</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/22/2016</Day>
    <Cost>$28.96</Cost>
    <Credits>$0.00</Credits>
    <Bill>$28.96</Bill>
  </DailyBill>
    <DailyBill>
    <Day>5/23/2016</Day>
    <Cost>$232.35</Cost>
    <Credits>$0.00</Credits>
  <Bill>$232.35</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/24/2016</Day>
    <Cost>$9.10</Cost>
    <Credits>$0.00</Credits>
    <Bill>$9.10</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/31/2016</Day>
    <Cost>$60.59</Cost>
    <Credits>$0.00</Credits>
    <Bill>$60.59</Bill>
  </DailyBill>
</BillByDay>
<BillByAccount>
  <AccountBill>
    <Account>1234567789</Account>
    <MonthlyToDateBill>$9.82</MonthlyToDateBill>
    <MonthlyToDateCost>$9.82</MonthlyToDateCost>
    <MonthlyToDateCredits>$0.00</MonthlyToDateCredits>
  </AccountBill>
  <AccountBill>
    <Account>9876543210</Account>
    <MonthlyToDateBill>$2.00</MonthlyToDateBill>
    <MonthlyToDateCost>$2.00</MonthlyToDateCost>
    <MonthlyToDateCredits>$0.00</MonthlyToDateCredits>
  </AccountBill>
 </BillByAccount>  

JSON call:

{"Summary":
  {"MonthlyToDateCost":"$722.78",
   "MonthlyToDateCredit":"$50.00", 
   "MonthlyToDateBill":"$672.78", 
   "AverageDailyNetBill":"$25.51",
   "HighestCost":
      {"ServiceName":"EC2","Cost":"$527.06"},  
        "HighestDaily":{"Date":"5/23/2016","Bill":"$232.35"},
        "LowestDaily":{"Date":"5/2/2016","Bill":"$7.48"},
        "HighestChange":{"StartDate":"5/24/2016","EndDate":"5/23/2016","ChangeAmount":"$223.25","ChangePercent":"96.09%"}},
        "BillByDay":[
                    {"Day":"5/1/2016","Cost":"$25.28","Credits":"$12.29","Bill":"$12.99"},
                    {"Day":"5/2/2016","Cost":"$18.53","Credits":"$11.05","Bill":"$7.48"},
                    {"Day":"5/3/2016","Cost":"$18.95","Credits":"$10.79","Bill":"$8.16"},
                    {"Day":"5/4/2016","Cost":"$18.69","Credits":"$10.46","Bill":"$8.23"},
                    {"Day":"5/5/2016","Cost":"$17.78","Credits":"$5.40","Bill":"$12.37"},
                    {"Day":"5/6/2016","Cost":"$17.74","Credits":"$0.00","Bill":"$17.74"},
                    {"Day":"5/7/2016","Cost":"$15.98","Credits":"$0.00","Bill":"$15.98"},
                    {"Day":"5/8/2016","Cost":"$17.34","Credits":"$0.00","Bill":"$17.34"},
                    {"Day":"5/9/2016","Cost":"$17.11","Credits":"$0.00","Bill":"$17.11"},
                    {"Day":"5/10/2016","Cost":"$16.43","Credits":"$0.00","Bill":"$16.43"},
                    {"Day":"5/11/2016","Cost":"$16.47","Credits":"$0.00","Bill":"$16.47"},
                    {"Day":"5/12/2016","Cost":"$16.53","Credits":"$0.00","Bill":"$16.53"},
                    {"Day":"5/13/2016","Cost":"$17.69","Credits":"$0.00","Bill":"$17.69"},
                    {"Day":"5/14/2016","Cost":"$16.85","Credits":"$0.00","Bill":"$16.85"},
                    {"Day":"5/15/2016","Cost":"$18.65","Credits":"$0.00","Bill":"$18.65"},
                    {"Day":"5/16/2016","Cost":"$18.87","Credits":"$0.00","Bill":"$18.87"},
                    {"Day":"5/17/2016","Cost":"$18.17","Credits":"$0.00","Bill":"$18.17"},
                    {"Day":"5/18/2016","Cost":"$18.00","Credits":"$0.00","Bill":"$18.00"},
                    {"Day":"5/19/2016","Cost":"$19.10","Credits":"$0.00","Bill":"$19.10"},
                    {"Day":"5/20/2016","Cost":"$21.00","Credits":"$0.00","Bill":"$21.00"},
                    {"Day":"5/21/2016","Cost":"$26.66","Credits":"$0.00","Bill":"$26.66"},
                    {"Day":"5/22/2016","Cost":"$28.96","Credits":"$0.00","Bill":"$28.96"},
                    {"Day":"5/23/2016","Cost":"$232.35","Credits":"$0.00","Bill":"$232.35"},
                    {"Day":"5/24/2016","Cost":"$9.10","Credits":"$0.00","Bill":"$9.10"},
                    {"Day":"5/31/2016","Cost":"$60.59","Credits":"$0.00","Bill":"$60.59"}],
  "BillByAccount":[
                    {"Account":"1234567890 ","MonthlyToDateBill":"$9.82","MonthlyToDateCost":"$9.82","MonthlyToDateCredits":"$0.00"},
                    {"Account":"9876543210 ","MonthlyToDateBill":"$2.00","MonthlyToDateCost":"$2.00","MonthlyToDateCredits":"$0.00"}]}

GET CLOUDTRAIL CUSTOM METRICS

The API method “get_cloudtrail_custom_metrics” is used to export to CSV a list of AMIs and every instance launched. This is based on the Ec2AmiWorkload custom metric.

XML Call:

https://api.cloudcheckr.com/api/security.xml/get_cloudtrail_custom_metrics?access_key=[ACCESS KEY]

JSON Call:

https://api.cloudcheckr.com/api/security.json/get_cloudtrail_custom_metrics?access_key=[ACCESS KEY]

This call accepts these parameters:

  • access_key (required) – standard Access Key required for all API calls.
  • type (required) – Ec2AmiWorkload (Currnently the only acceptable value is Ec2AmiWorkload)
  • from (optional) – return results from after this date.
  • to (optional) – return results from before this date.
  • use_account (required for admin API key) – The specific account you wish to query.
  • use_cc_account_id (required when using Admin API Access Key) – The CloudCheckr ID of the account you are making the call for. The ID is returned when using the method ‘account/add_accountv2′ to register the account in CloudCheckr.

Note: If using an admin API key, use_account or use_cc_account_id is required

OUTPUT

This call will only export the results to a compressed CSV file and it will contain the following data.(Note: If no results are returned it will generate a blank file)

AMI ID EC2 Instance ID Event Date Region AWS Account ID User Identity ARN IP Address User Agent
ami-f1f12345 i-1ab2a345 5/20/2016 15:47 US East (Northern Virginia) 123456789012 arn:aws:iam::123456789012:user/cloudcheckr 192.168.10.10 signin.amazonaws.com
ami-f1f12345 i-1ab2a350 5/15/2016 10:47 US East (Northern Virginia) 123456789012 arn:aws:iam::123456789012:user/cloudcheckr 192.168.10.10 signin.amazonaws.com
ami-f1f12345 i-1ab2a355 5/12/2016 5:47 US East (Northern Virginia) 123456789012 arn:aws:iam::123456789012:user/cloudcheckr 192.168.10.10 signin.amazonaws.com
ami-f2f65432 i-1ab2a360 5/10/2016 1:47 US East (Northern Virginia) 012345678998 arn:aws:iam::123456789012:user/cloudcheckr 192.168.10.100 signin.amazonaws.com
ami-f2f65432 i-1ab2a365 5/5/2016 12:47 US East (Northern Virginia) 012345678998 arn:aws:iam::123456789012:user/cloudcheckr 192.168.10.100 signin.amazonaws.com
ami-f2f65432 i-1ab2a370 5/2/2016 23:47 US East (Northern Virginia) 012345678998 arn:aws:iam::123456789012:user/cloudcheckr 192.168.10.100 signin.amazonaws.com

GET CLOUDTRAIL ALERT RESULTS V2

The API method “get_cloudtrail_alert_results_v2” is used to pull the data for the CloudTrail Results report from CloudCheckr. This method is similar to the original API call for “get_cloudtrail_alert_results” except the v2 method also includes <RequestParams> in the response.

XML call:

https://api.cloudcheckr.com/api/alert.xml/get_cloudtrail_alert_results_v2?access_key=[access_key]&max_results=5

JSON call:

https://api.cloudcheckr.com/api/alert.json/get_cloudtrail_alert_results_v2?access_key=[access_key]&max_results=5

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard Access Key required for all API calls.
  • from (optional) – return report from this date. The date format is MM/DD/YYYY
  • to (optional) – return report to this date. The date format is MM/DD/YYYY
  • alert_name (optional) – the name of the alert
  • enabled (optional) – only return results for alerts that are enabled
  • max_results (optional) – the max number of results to return before paginating the results.
  • use_account (optional; required if using an Admin API key) – return report for this account.
  • use_cc_account_id (required when using Admin API Access Key) – The CloudCheckr ID of the account you are making the call for. The ID is returned when using the method ‘account/add_accountv2′ to register the account in CloudCheckr.

OUTPUT

XML Example:

<GetCloudTrailAlertResultsResponse 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <HasNext>true</HasNext>
    <NextToken>H4sIAAAAAAAEAK2QQQ</NextToken>
    <DateOfResults>2017-01-11T19:22:13</DateOfResults>
    <CloudTrailAlertResults>
        <CloudTrailAlertResult>
            <Created>2017-01-11T20:25:48</Created>
            <EventDate>2017-01-11T19:22:13</EventDate>
            <EventName>GetBucketLifecycle</EventName>
            <AccountId>215011123456</AccountId>
            <IdenityArn>arn:aws:iam::215011123456:user/CloudCheckr_jtest</IdenityArn>
            <IpAddress>54.164.64.123</IpAddress>
            <Service>AmazonS3</Service>
            <Region>US East (Northern Virginia)</Region>
            <ResponseType>Error</ResponseType>
            <AlertName>S3 Bucket access test</AlertName>
            <IsThresholdResult>false</IsThresholdResult>
            <IpRisk>false</IpRisk>
            <AlertStatus>Enabled</AlertStatus>
            <RequestParams>{"lifecycle":[""],"bucketName":"mtedones3"}</RequestParams>
        </CloudTrailAlertResult>
    </CloudTrailAlertResults>
</GetCloudTrailAlertResultsResponse>

JSON Example:

{
  "CloudTrailAlertResults": [
    {
      "Created": "2017-01-11T20:25:48",
      "EventDate": "2017-01-11T19:22:13",
      "EventName": "GetBucketLifecycle",
      "AccountId": "215011123456",
      "IdenityArn": "arn:aws:iam::215011123456:user/CloudCheckr_jtest",
      "IpAddress": "54.164.64.123",
      "Service": "AmazonS3",
      "Region": "US East (Northern Virginia)",
      "ResponseType": "Error",
      "AlertName": "S3 Bucket access test",
      "IsThresholdResult": false,
      "IpRisk": false,
      "AlertStatus": "Enabled",
      "RequestParams": "{\"lifecycle\":[\"\"],\"bucketName\":\"mtedones3\"}"
    }
  ],
  "DateOfResults": "2017-01-11T19:22:13",
  "HasNext": true,
  "NextToken": "H4sIAAAAAAAEAK2QQQ"
}

GET EC2 RESERVED INSTANCE REBALANCER EC2 INSTANCES_v2

The API method “get_ec2_reserved_instance_rebalancer_ec2_instances_v2” is used to pull a list of EC2 instances, updated hourly. Version 2 of this call adds the following properties to the output: PublicIpAddress, PrivateIpAddress, PrivateDnsName, PublicDnsName and Status.

XML call:

https://api.cloudcheckr.com/api/billing.xml/get_ec2_reserved_instance_rebalancer_ec2_instances_v2?access_key=[access_key]

JSON call:

https://api.cloudcheckr.com/api/billing.json/get_ec2_reserved_instance_rebalancer_ec2_instances_v2?access_key=[access_key]

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – Admin or Standard Access Key required for all API calls.
  • aws_account_Id (multi-account view only) – return statistics from these accounts.
  • use_account (optional) – return report for this account.
  • use_cc_account_id – the Id of the account you are making the call for. The Id is returned when using the method ‘account/add_accountv2′ to register the account in CloudCheckr.
  • use_aws_account_id (optional) – The ID of the AWS account in question.

OUTPUT

XML Example:

<GetEc2ReservedInstanceRebalancerEc2InstancesResponseV2 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Ec2ReservedInstanceRebalancerEc2Instances>
        <Ec2ReservedInstanceRebalancerEc2InstanceV2>
            <InstanceId>i-188dde99</InstanceId>
            <AwsAccountId>21501123456</AwsAccountId>
            <InstanceType>t1.micro</InstanceType>
            <Platform>Linux</Platform>
            <AvailabilityZone>us-east-1d</AvailabilityZone>
            <Region>us-east-1</Region>
            <MatchedReservedInstance>
                <MatchedReservedInstanceId>f69a841f-55ea-1234-985b-4c45521b0dac</MatchedReservedInstanceId>
                <AwsAccountId>21501123456</AwsAccountId>
                <Tenancy>Default</Tenancy>
                <Platform>Linux</Platform>
                <OfferingClass>Standard</OfferingClass>
                <InstanceType>t1.micro</InstanceType>
                <InstanceCount>1</InstanceCount>
            </MatchedReservedInstance>
            <PublicIpAddress>54.22.111.123</PublicIpAddress>
            <PrivateIpAddress>10.123.144.456</PrivateIpAddress>
            <PrivateDnsName>ip-10.123.144.456.ec2.internal</PrivateDnsName>
            <PublicDnsName>ec2-54.22.111.123.compute-1.amazonaws.com</PublicDnsName>
            <Status>running</Status>
        </Ec2ReservedInstanceRebalancerEc2InstanceV2>
    </Ec2ReservedInstanceRebalancerEc2Instances>
</GetEc2ReservedInstanceRebalancerEc2InstancesResponseV2>

JSON Example:

{
  "Ec2ReservedInstanceRebalancerEc2Instances": [
    {
      "PublicIpAddress": "54.22.111.123",
      "PrivateIpAddress": "10.123.144.456",
      "PrivateDnsName": "ip-10.123.144.456.ec2.internal",
      "PublicDnsName": "ec2-54.22.111.123.compute-1.amazonaws.com",
      "Status": "running",
      "InstanceId": "i-188dde99",
      "AwsAccountId": "21501123456",
      "InstanceType": "t1.micro",
      "Platform": "Linux",
      "AvailabilityZone": "us-east-1d",
      "Region": "us-east-1",
      "MatchedReservedInstance": {
        "MatchedReservedInstanceId": "f69a841f-55ea-1234-985b-4c45521b0dac",
        "AwsAccountId": "21501123456",
        "Tenancy": "Default",
        "Platform": "Linux",
        "OfferingClass": "Standard",
        "Scope": null,
        "AvailabilityZone": null,
        "InstanceType": "t1.micro",
        "InstanceCount": 1
      }
    }
  ]
}

CREATE DETAILED BILLING GROUPED FILTER

The API method, “create_detailed_billing_grouped_filter”, is used to create a saved filter for Advanced Grouping reports.

Within the application, go to the left navigation pane, choose Cost > AWS Billing > Custom Reporting> Advanced Grouping.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; account-level API key
report_name string required; name of the filter
email_on_build boolean optional; indicates if saved email will be sent to customer; defaults to “false”
emails list optional; comma-separated list of valid email addresses where the saved filter report will be sent to upon completion
group_by list<string> required; comma-separated list of attributes that the cost data may be grouped by
include_untagged boolean optional; indicates if customer included untagged attributes if they chose to group by tags; defaults to “false”
aggregate string optional; indicates the time increment upon which your exported data will be aggregated; on-screen total will remain the same
cost_type string optional; indicates which cost type will be applied to the saved filter
chart_type string optional; chart type used to display the data from the saved filter
resource_id string optional; ID designated by a customer to identify a project resource
include_usage_quantity boolean optional; creates an additional column in the results that displays the usage quantity for the advanced grouping

(This attribute is helpful when grouping by resource ID or EC2 Instance ID. Defaults to “false”.)

include_zero_costs boolean optional; allows customer to include any rows with zero cost totals in their results; defaults to “false”
excludes_credits boolean optional; removes any credits from the results; defaults to “false”
tags list<string> optional; comma-separated list of tag key/tag value pairs; defaults to all
filter_tag_type string optional; identifies how the customer chooses to filter their selected tag key/tag value pairs
account_type list optional; identifies if the cost data is filtered by account or account family
accounts list<string> optional; comma-separated list of AWS account IDs upon which the customer will filter the cost data
account_families list<string> comma-separated list of account family names upon which the customer will filter the cost data
invert_accounts boolean optional; applies the NOT logical operator to selected accounts in the previous parameter; defaults to “false”
invert_account_families boolean optional; applies the NOT logical operator to selected account families in the previous parameter; defaults to “false”
regions list<string> optional; comma-separated list of regions upon which the customer can filter the cost data; defaults to all; accepts region IDs as valid values
invert_regions boolean optional; applies the NOT logical operator to selected regions in the previous parameter; defaults to “false”
services list<string> optional; comma-separated list of AWS services upon which the customer can filter the cost data; defaults to all
invert_services boolean optional; applies the NOT logical operator to selected AWS services in the previous parameter; defaults to “false”
operations list<string> optional; comma-separated list of AWS operations upon which the customer can filter the cost data; defaults to all
invert_operations boolean optional; applies the NOT logical operator to selected AWS operations in the previous parameter; defaults to “false”
usage_types list<string> optional; comma-separated list of AWS usage types upon which the customer can filter the cost data; defaults to all
invert_usage_types boolean optional; applies the NOT logical operator to selected AWS usage types in the previous parameter; defaults to “false”
use_account string *optional/required; friendly name of the account
use_cc_account_id string *optional/required; account ID of the account
use_aws_account_id string *optional/required; optional/required; the 12-digit AWS account ID

* = one of these parameters must be defined

ENDPOINT URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/create_detailed_billing_grouped_filter

JSON/XML CALL EXAMPLE:

curl-- request POST \
    'https://api.cloudcheckr.com/api/billing.[json|xml]/create_detailed_billing_grouped_filter?access_key=[access_key]&use_account=[account ID]' \
    --header 'cache-control: no-cache'\
    --header 'content-type: application/[json|xml]'\
    --data '{
	"report_name": "api_99",
	"email_on_build": "true",
	"emails": ["j@m.com","g@p.com"],
        "group_by": ["Account","ProductName","t:TagKey"],
	"include_untagged": "false",
	"aggregate": "Hour",
        "cost_type": "List",
        "chart_type": "Pie",
        "resource_id": ["customer resource ID"],
        "include_usage_quantity": "false",
        "include_zero_costs": "false",
        "excludes_credits": "false",
        "tags": ["TagKey | TagValue"],
        "filter_tag_type": "RequireAny",
        "account_type": ["Account"],
        "accounts": ["AWS account ID"],
        "invert_accounts": "true",
        "account_families": ["Account Family Name"],
        "invert_account_families": "true", 
        "regions": ["ap-northeast-1"],
        "invert_regions": "true",
        "services":["AmazonSimpleDB","AmazonEC2","AmazonSQS"],
        "invert_services": "true",
        "operations": ["SetQueueAttributes","RunInstances:0002:SV012","PutObject"],
        "invert_operations": "true",
        "usage_types": [""CAN1-EUC1-AWS-Out-Bytes","HeavyUsage:m4.large","UGW1-TimedStorage-RRS-ByteHrs"],
        "invert_usage_types": "true"
	}

SUCCESSFUL JSON/XML RESPONSE:

{
    "Code": 200,
    "Message":"Successfully saved search. An email will be sent to the following addresses upon building completion: bob@cloudcheckr.com, tom@cloudchekr.com."
}

SCHEDULE REPORT EMAIL ADVANCED GROUPING

The API method, “schedule_report_email_advanced_grouping”, is used to create a number of scheduled reports based on costs for individual tags.

Within the application, go to the left navigation pane, and choose Cost > AWS Billing > Custom Reporting> Advanced Grouping. Select a filter from the drop-down menu and click Email. The Email Report dialog box opens.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; account- or admin-level API key
filter_name string required; name of the saved filter that contains the tag and property options , which the customer wants to reuse when scheduling reports
include_csv boolean optional; adds comma-separated values (CSV) to the report; defaults to “false”
email_daily_list list optional/required; optional if the parameter, “use_same_email”, isn’t “true”; if the parameter is “true”, the user must put the selected emails into this list

Note: This parameter is required if the parameter, “email_daily” is “true”.

email_weekly_list list optional/required; optional if the parameter, “use_same_email”, isn’t “true”; if the parameter is “true”, the user must put the selected emails into this list

Note: This parameter is required if the parameter, “email_weekly” is “true”.

email_monthly_list list optional/required; optional if the parameter, “use_same_email”, isn’t “true”; if the parameter is “true”, the user must put the selected emails into this list

Note: This parameter is required if the parameter, “email_monthly” is “true”.

email_daily boolean optional/required; customer must select at least one of the parameters, “email_daily”, “email_weekly”, or “email_monthly” and provide email addresses in the corresponding list
email_weekly boolean optional/required; customer must select at least one of the parameters, “email_daily”, “email_weekly”, or “email_monthly” and provide email addresses in the corresponding list
email_monthly boolean optional/required; customer must select at least one of the parameters, “email_daily”, “email_weekly”, or “email_monthly” and provide email addresses in the corresponding list
use_same_email boolean optional; allows the customer to specify that daily, weekly, and monthly reports will be sent to the same email address(es)
description string optional; defines the purpose or subject of the email report
use_account string *optional/required; friendly name of the account
use_cc_account_id string *optional/required; account ID of the account
use_aws_account_id string *optional/required; optional/required; the 12-digit AWS account ID

* = one of these parameters must be defined if an admin-level API access key is used

ENDPOINT URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/schedule_report_email_advanced_grouping

JSON/XML CALL EXAMPLE (SINGLE ACCOUNT):

curl-- request POST \
    'https://api.cloudcheckr.com/api/billing.[json|xml]/schedule_report_email_advanced_grouping?access_key=[access_key]&use_account=[account ID]' \
    --header 'cache-control: no-cache'\
    --header 'content-type: application/[json|xml]'\
    --data '{
	"filter_name": "test",
	"email_daily_list": ["ccheckr@gmail.com"],
	"email_weekly_list" : ["ccheckr@gmail.com"],
	"email_monthly_list":[ "ccheckr@gmail.com"],
	"email_daily": "true",
	"email_weekly": "true",
	"email_monthly": "true",
	"include_csv":"true",
	"description":["Standard Test"],
	"use_same_email":"true"
	}

JSON/XML CALL EXAMPLE [Multi-Account View (MAV) ACCOUNT]:

curl-- request POST \
    'https://api.cloudcheckr.com/api/billing.[json|xml]/schedule_report_email_advanced_grouping?access_key=[access_key]&use_account=[account ID]' \
    --header 'cache-control: no-cache'\
    --header 'content-type: application/[json|xml]'\
    --data '{
	"email_daily_list": ["ccheckr@gmail.com"],
	"email_daily": "true",
	"include_csv":"true",
	"description":["MAV Test"],
	}

SUCCESSFUL JSON/XML RESPONSE (SINGLE AND MAV ACCOUNTS):

{
    "Code": 200,
    "Message": "OK"
}

GET TAG RULES

The API method, “get_tag_rules”, is used to retrieve a list of cost tag rules.

The preferred HTTP method for this call is GET.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; standard access key

API CALL URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/get_tag_rules

REQUEST EXAMPLE:

curl -X GET \
     -- https://api.cloudcheckr.com/api/billing.[json|xml]/get_tag_rules?access_key=your_admin_access_key
     -- header 'cache-control: no-cache' \
     -- header 'content-type: application/[json|xml]' \

RESPONSE EXAMPLE:
XML:

<TagRulesResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <tag_rules>
        <TagRuleDto>
            <tag_rule_id>79</tag_rule_id>
            <name>Cost Center</name>
        </TagRuleDto>
        <TagRuleDto>
            <tag_rule_id>80</tag_rule_id>
            <name>Services</name>
        </TagRuleDto>
    </tag_rules>
</TagRulesResponse>

JSON:

{
    "tag_rules": [
        {
            "tag_rule_id": 79,
            "name": "Cost Center"
        },
        {
            "tag_rule_id": 80,
            "name": "Services"
        }
    ]
}

ADD TAG RULE

The API method, “add_tag_rule”, is used to add a cost tag rule.

The preferred HTTP method for this call is POST.

To add a tag rule in the user interface, follow one of the following paths:

  • AWS: Cost > Tags (from Detailed Billing) > Tagging Rules
  • Azure: Cost > Tagging > Tagging Rules

Once in the Tagging Rules report, click New Rule.

INPUT PARAMETERS:

Parameter Type Description
access_key string required, standard access key
name string required; name of the tag rule
tags string required for tag_key and tag_value
tag_value string required; the tag value
region string required; list of region(s) where the tag rule will be applied
awsresourcetype string *optional/required for AWS tags, the AWS resources
awsaccounts string *optional/required for AWS tags, the 12-digit AWS account ID
azure_consumed_service string *optional/required for Azure tags, the Azure resource(s)
azure_subscriptions string *optional/required for Azure tags, the Azure subscription(s)

API CALL URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/add_tag_rule

REQUEST EXAMPLE:

AWS:

curl -X POST \
     -- https://api.cloudcheckr.com/api/billing.[json|xml]/add_tag_rule?access_key=your_standard_access_key
     -- header 'cache-control: no-cache' \
     -- header 'content-type: application/[json|xml]' \
     -- data '{
        "name": "AWS Tag Rule",
        "tags": {
          "TagKey": "TagValue",
          "TagKey2": "*"
        },
        "regions": [
          "US East (Northern Virginia)",
          "US East (Ohio)",
          "US West (Oregon)",
          "EU (Frankfurt)"
                ],
       "awsresourcetypes": [
          "AMI",
          "EBS Snapshot",
          "EBS Volume",
          "EC2 Instance",
          "S3 Bucket"
               ],
      "awsaccounts": "123456789123"
}

AZURE:

curl -X POST \
     -- https://api.cloudcheckr.com/api/billing.[json|xml]/add_tag_rule?access_key=your_admin_access_key
     -- header 'cache-control: no-cache' \
     -- header 'content-type: application/[json|xml]' \
     -- data '{
        "name": "Azure Tag Rule",
        "tags": {
          "TagKey": "TagValue",
          "TagKey2": "*"
        },
          "region": "US East",
          "azure_consumed_service": "*",
          "azure_subscriptions": [
               "4dc76947-2789-4149-bc29-3b7bd45ce4a8",
               "b9e7ac32-fcba-4090-a249-d8a240d356ac"
    ]
}

RESPONSE EXAMPLE:
XML:

<AddTagRuleResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <tag_rule>
        <status>
            <code>200</code>
            <message>Successfully created Tag Rule.</message>
            <tag_rule_id>94</tag_rule_id>
        </status>
    </tag_rule>
</AddTagRuleResponse>

JSON:

{
    "code": 200,
    "message": "Successfully created Tag Rule.",
    "tag_rule_id": "94"
}


DELETE TAG RULE

The API method, “delete_tag_rule”, is used to delete a cost tag rule.

The preferred HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required, standard access key
tag_rule_id string required; tag ID

API CALL URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/delete_tag_rule

REQUEST EXAMPLE:

curl -X POST \
     -- https://api.cloudcheckr.com/api/billing.[json|xml]/delete_tag_rule?access_key=your_standard_access_key&tag_rule_id=78
     -- header 'cache-control: no-cache' \
     -- header 'content-type: application/[json|xml]' \
     -- data '{
        "tag_rule_id": 78,
        }

RESPONSE EXAMPLE:
XML:

<DeleteTagRuleResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <tag_rule>
        <status>
            <code>200</code>
            <message>Successfully deleted Tag Rule.</message>
            <tag_rule_id>78</tag_rule_id>
        </status>
    </tag_rule>
</DeleteTagRuleResponse>

JSON:

{
    "code": 200,
    "message": "Successfully deleted Tag Rule.",
    "tag_rule_id": "78"
}

SCHEDULE INVOICE

The API method, “schedule_invoice”, is used to create an invoice for AWS and Azure accounts.

Note:

  • The HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required, standard access key
day_of_month integer required; the day of the month an invoice will be scheduled to send
report_format string required; select one of the following report formats: detailed, summary, or saved filter
group_by string required; the categories by which the customer can group the invoices
cost_type string required; select List, Unblended, or Blended

Note: Azure does not support the blended option.

export_type string required; customers can choose to convert the invoice to a CSV or PDF file type
billing_family_name string required; name of the account family or subscription family for who the invoice is for
due_date valid date string optional; the due date applied to the header of the invoice
convert_to_value decimal optional; if converting to another currency, the conversion factor applied to the account’s normal currency
convert_to_currency string optional; if converting to another currency, the abbreviation of the currency’s name (USD, GBP, etc).
cc_email string optional; the email address that will be the CC recipient of the invoice
saved_filter_name string optional; if using a saved filter to generate the invoice, the name of that saved filter (case-sensitive)
subject string optional; the subject line of the email to be sent
description string optional; a description of the scheduled invoice that will display in the UI
invoice_header string optional; the text that is displayed in the invoice header
bucket string optional; the S3 bucket to which the invoice will get saved (if provided)
email_unfinalized_bill boolean optional; allows customer to send an invoice with incomplete data for the month; defaults to “false”
suppress_due_date boolean optional; indicates if the customer wants to display the due date in the invoice; defaults to “false”
eu_compliant boolean optional; forces the invoice style to be compliant with EU regulations; defaults to “false”
tag_name string optional; indicates the tag name if the customer chooses to filter by a tag name and tag value; case-sensitive
tag_value string optional; indicates the tag value if the customer chooses to filter by a tag name and tag value; case-sensitive

API CALL URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/schedule_invoice

REQUEST EXAMPLE:

curl -X POST \
      -- https://api.cloudcheckr.com/api/billing.[json|xml]/schedule_invoice?access_key=your_account_standard_access_key\
      -- header 'cache-control: no-cache' \
      -- header 'content-type: application/[json|xml]' \
      -- data '{
        "day_of_month": 5,
        "report_format": "Summary",
        "group_by": "Region",
        "cost_type": "List",
        "export_type": "PDF",
        "billing_family_name": "CSP L2 Subscription Family",
        "due_date": "2018-04-05",
        "cc_email": "carbon.copy@example.com",
        "subject": "Azure Invoice Generator via API"
}

RESPONSE EXAMPLE:
XML:

<ScheduleInvoiceResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance>
     <status>
       <code>200</code>
       <message>Saved scheduled invoice for CSP L2 Subscription Family</message>
     </status>
</ScheduleInvoice>

JSON:

{
    "code": 200,
    "message": "Saved scheduled invoice for CSP L2 Subscription Family",
   }

ADD COST ALERT PERCENT

The API method, “add_cost_alert_percent”, is used to programatically create the cost alert, AWS Costs (percent), which notifies customers about cost fluctuations over a period of time.

Note:

  • This call can only be made using the account-level access key.
  • The preferred HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; account-level API key
alert_name string required; name of the new alert
send_frequency_days integer required; how frequently alerts will be sent in terms of days
threshold_days integer optional; the number of days before CloudCheckr will alert you to cost changes
threshold_dollar_spike decimal optional; dollar amount of a spike
threshold_percent_spike decimal optional; percent value of a spike
spike_days integer optional; the number of days before CloudCheckr will alert you to a cost spike
use_dollar_spike boolean optional; indicates if you want the threshold set at a dollar value
use_percent_spike boolean optional; indicates if you want the threshold set at a percent value
monitoring_type string optional; indicates if you want to monitor costs by account, service, or a specific tag
selected_tag_key string required; the name of the specific tag on which you want to configure your alert

API CALL URL:


https://api.cloudcheckr.com/api/alert.[json|xml]/add_cost_alert_percent

REQUEST EXAMPLE:

curl -X POST \
      -- https://api.cloudcheckr.com/api/alert.[json|xml]/add_cost_alert_percent?access_key=your_access_key'\
      -- header 'cache-control: no-cache' \
      -- header 'content-type: application/[json|xml]' \
      -- data ' {
                "alert_name": "testing1",
                "send_frequency_days": 1,
                "thresholds": [
                  "threshold_days": 1,
                  "threshold_dollar_spike": 15.0,
                  "threshold_percent_spike": 3.2,
                  "spike_days": 2,
                  "use_dollar_spike": true,
                  "use_percent_spike": true
                 }
              ],
               "monitoring_type": "Accounts",
               "selected_tag_key": "test"
}

RESPONSE EXAMPLE:
XML:

<AddCostAlertPercentResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Status>
      <AlertId>4</AlertId>
      <Code>200</Code>
      <Message>OK</Message>
    </Status>
</AddCostAlertPercentResponse>

JSON:

{
        "AlertId": "4",
        "Code": "200",
        "Message": "OK"
}

DELETE COST ALERT PERCENT

The API method, “delete_cost_alert_percent”, is used to programmatically delete the cost alert, AWS Costs (percent), which notifies customers about cost fluctuations over a period of time.

Note:

  • This call can only be made using the account-level access key.
  • The preferred HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; account-level API key
alert_id integer required; ID of the alert

API CALL URL:


https://api.cloudcheckr.com/api/alert.[json|xml]/delete_cost_alert_percent

REQUEST EXAMPLE:

curl -X POST \
      -- https://api.cloudcheckr.com/api/alert.[json|xml]/delete_cost_alert_percent?access_key=your_access_key'\
      -- header 'cache-control: no-cache' \
      -- header 'content-type: application/[json|xml]' \
      -- data ' {
                "alert_id": "4",
                }

RESPONSE EXAMPLE:
XML:

<DeleteCostAlertPercentResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Status>
       <Code>200</Code>
      <Message>OK</Message>
    </Status>
</DeleteCostAlertPercentResponse>

JSON:

{
        "Code": "200",
        "Message": "OK"
}

EDIT COST ALERT PERCENT

The API method, “edit_cost_alert_percent”, is used to programatically edit the cost alert, AWS Costs (percent), which notifies customers about cost fluctuations over a period of time.

Note:

  • This call can only be made using the account-level access key.
  • The preferred HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; account-level API key
alert_id string required; ID of the alert
alert_name string optional; name of the new alert
send_frequency_days integer required; how frequently alerts will be sent in terms of days
threshold_days integer optional; the number of days before CloudCheckr will alert you to cost changes
threshold_dollar_spike decimal optional; dollar amount of a spike
threshold_percent_spike decimal optional; percent value of a spike
spike_days integer optional; the number of days before CloudCheckr will alert you to a cost spike
use_dollar_spike boolean optional; indicates if you want the threshold set at a dollar value
use_percent_spike boolean optional; indicates if you want the threshold set at a percent value
monitoring_type string optional; indicates if you want to monitor costs by account, service, or a specific tag
selected_tag_key string required; the name of the specific tag on which you want to configure your alert

API CALL URL:


https://api.cloudcheckr.com/api/alert.[json|xml]/edit_cost_alert_percent

REQUEST EXAMPLE:

curl -X POST \
      -- https://api.cloudcheckr.com/api/alert.[json|xml]/edit_cost_alert_percent?access_key=your_access_key'\
      -- header 'cache-control: no-cache' \
      -- header 'content-type: application/[json|xml]' \
      -- data ' {
                "alert_id": 6,                
                "alert_name": "testing1",
                "send_frequency_days": 1,
                "thresholds": [
                  "threshold_days": 1,
                  "threshold_dollar_spike": 15.0,
                  "threshold_percent_spike": 3.2,
                  "spike_days": 2,
                  "use_dollar_spike": true,
                  "use_percent_spike": true
                 }
              ],
               "monitoring_type": "Accounts",
               "selected_tag_key": "test"
}

RESPONSE EXAMPLE:
XML:

<EditCostAlertPercentResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Status>
      <Code>200</Code>
      <Message>OK</Message>
    </Status>
</EditCostAlertPercentResponse>

JSON:

{
         "Code": "200",
        "Message": "OK"
}

GET COST ALERT PERCENT

The API method, “get_cost_alert_percent”, is used to programmatically get the cost alert, AWS Costs (percent), which notifies customers about cost fluctuations over a period of time.

Note:

  • This call can only be made using the account-level access key.
  • The preferred HTTP method for this call is GET.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; account-level API key

API CALL URL:


https://api.cloudcheckr.com/api/alert.[json|xml]/get_cost_alert_percent

REQUEST EXAMPLE:

curl -X GET \
      -- https://api.cloudcheckr.com/api/alert.[json|xml]/get_cost_alert_percent?access_key=your_access_key'\
      -- header 'cache-control: no-cache' \
      -- header 'content-type: application/[json|xml]' \
     

RESPONSE EXAMPLE:
XML:

<GetCostAlertPercentResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <alerts>
    <AlertId>13</AlertId>
    <Name>TestAlertPercent1</Name>
    <Created>2018-04-05T17:45:48</Created>
    <ParamValues>
      <Name>Days</Name>
      <Value>3</Value>
      <Comparer>Equal</Comparer>
      <GroupId>0</GroupId>
    </ParamValues>
    <ParamValues>
      <Name>SpikeDays</Name>
      <Value>4</Value>
      <Comparer>Equal</Comparer>
      <GroupId>0</GroupId>
    </ParamValues>
    <ParamValues>
      <Name>SpikeDollar</Name>
      <Value>2</Value>
      <Comparer>Equal</Comparer>
      <GroupId>0</GroupId>
    </ParamValues>
    <ParamValues>
      <Name>SpikePercent</Name>
      <Value>15</Value>
      <Comparer>Equal</Comparer>
      <GroupId>0</GroupId>
    </ParamValues>
    <ParamValues>
      <Name>MonitoringType</Name>
      <Value>Accounts</Value>
      <Comparer>Equal</Comparer>
      <GroupId/>
    </ParamValues>
  </alerts>
 }
</GetCostAlertPercentResponse>

JSON:

{ 
   "alerts":[ 
      { 
         "AlertId":13,
         "Name":"TestAlertPercent1",
         "Created":"2018-04-05T17:45:48",
         "ParamValues":[ 
            { 
               "Name":"Days",
               "Value":"3",
               "Comparer":"Equal",
               "GroupId":"0"
            },
            { 
               "Name":"SpikeDays",
               "Value":"4",
               "Comparer":"Equal",
               "GroupId":"0"
            },
            { 
               "Name":"SpikeDollar",
               "Value":"2",
               "Comparer":"Equal",
               "GroupId":"0"
            },
            { 
               "Name":"SpikePercent",
               "Value":"15",
               "Comparer":"Equal",
               "GroupId":"0"
            },
            { 
               "Name":"MonitoringType",
               "Value":"Accounts",
               "Comparer":"Equal",
               "GroupId":null
            }
         ]
      }
   ]
}

DELETE DETAILED BILLING GROUPED FILTER

The API method, “delete_detailed_billing_grouped_filter”, is used to delete a saved filter used in the Advanced Grouping reports.

Note:

  • This call can only be made using the account-level access key.
  • The preferred HTTP method for this call is GET.

Within the application, go to the left navigation pane, choose Cost > AWS Billing > Custom Reporting> Advanced Grouping.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; account-level API key
report_name string required; name of the saved filter

API CALL URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/delete_detailed_billing_grouped_filter

REQUEST EXAMPLE:

curl -X GET \
     -- https://api.cloudcheckr.com/api/billing.[json|xml]/delete_detailed_billing_grouped_filter?access_key=your_access_key'\
     -- header 'cache-control: no-cache' \
     -- header 'content-type: application/[json|xml]' \
     -- data '{
             ""report_name": "report123",
              }

RESPONSE EXAMPLE:
XML:

<DeleteDetailedBillingGroupedFilterResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Status>
      <Code>200</Code>
      <Message>Filter was removed successfully</Message>
    </Status>
</DeleteDetailedBillingGroupedFilterResponse>

JSON:

{
    "Code": 200,
    "Message": "Filter was removed successfully"
}