Deprecated Account-Level Calls

Below is the list of Account-level (non-Admin) API calls in CloudCheckr that have been deprecated and replaced with a newer version. These calls continued to be accessible so that any current user functionality is not interrupted. However, CloudCheckr encourages the use of the most current API calls here: API Reference guide.

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 Best Practices

This API is deprecated and is maintained for historical reasons only. Please use get_best_practices_v3 instead.
The API method "best_practice/get_best_practices" is used to pull the list of best practice results from a CloudCheckr account.

XML call:
https://api.cloudcheckr.com/api/best_practice.xml/get_best_practices?access_key=[access_key]
JSON call:
https://api.cloudcheckr.com/api/best_practice.json/get_best_practices?access_key=[access_key]
INPUT PARAMETERS
This call accepts these parameters:
  • access_key (required) - Standard Access Key required for all API calls
  • date (optional) - Date to pull the list of Best Practice results. Used to access historical data.
  • category (optional) - The category of the Best Practice report to pull. Accepts Security, Cost, Availability, and/or Usage.
  • importance (optional) - The importance level of the Best Practice checks to pull. Accepts ShowAll, High, Medium, Low, Informational, InformationAndHigher, LowAndHigher, MediumAndHigher
  • all_result (optional) - This will allow you to pull ALL results from the best practice report, even those with no issues. Accepts true or false.
  • aws_account_ids (optional; multi-account view only) – return statistics from these accounts.
  • bpc_id (optional) - This will allow you to pull results for a specific Best Practice ID number. Note: To get a list of available ID numbers, pull a list of results without specifying an ID.
OUTPUT
XML Example:
<GetBestPracticesResponse
              xmlns:xsd="http://www.w3.org/2001/XMLSchema"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
              <BestPracticeChecks>
                  <BestPracticeCheck>
                      <CheckId>42</CheckId>
                      <Name>Auto Scaling Groups Not Using Cooldown Period</Name>
                      <ShortDescription>
          Checks each Auto Scaling group to verify they are configured to utilize cooldown periods. Lists each group that does not.
          </ShortDescription>
                      <LongDescription>
                          <p>When enabled, Auto Scaling will automatically scale EC2 capacity up or down, according to pre-defined conditions. During period of high-demand, the number of EC2 instances will increase to meet that demand. When there is little or no demand, the number of instances decreases to help minimize costs. </p>
                          <p>Cooldown periods help to prevent Auto Scaling from initiating additional scaling activities before the effects of previous activities are visible. Because scaling activities are suspended when an Auto Scaling group is in cooldown, an adequate cooldown period helps to prevent a trigger from firing based on stale metrics. If a cool-down period is not configured, the scaling policy may scale up and down too quickly. </p>
                          <p>
                              <a href="http://docs.amazonwebservices.com/AutoScaling/latest/DeveloperGuide/scaling_plan.html#scaling_policies" target="_blank">Go here to learn more.</a>
                          </p>
                      </LongDescription>
                      <Category>Usage</Category>
                      <Importance>Low</Importance>
                      <CountOfResults>2</CountOfResults>
                      <Results>
                          <Result>
          Auto Scaling Group: agcmgroup | Cooldown: 1 second(s) | Region: US East (Northern Virginia)
          </Result>
                          <Result>
          Auto Scaling Group: changemon | Cooldown: 1 second(s) | Region: US East (Northern Virginia)
          </Result>
                      </Results>
                  </BestPracticeCheck>
              </BestPracticeChecks>
              <DateOfResults>2016-01-29T15:47:56</DateOfResults>
          </GetBestPracticesResponse>
JSON Example:
{
            "BestPracticeChecks": [
              {
                "CheckId": 42,
                "Name": "Auto Scaling Groups Not Using Cooldown Period",
                "ShortDescription": "Checks each Auto Scaling group to verify they are configured to utilize cooldown periods. Lists each group that does not.",
                "LongDescription": "<p>When enabled, Auto Scaling will automatically scale EC2 capacity up or down, according to pre-defined conditions. During period of high-demand, the number of EC2 instances will increase to meet that demand. When there is little or no demand, the number of instances decreases to help minimize costs. </p><p>Cooldown periods help to prevent Auto Scaling from initiating additional scaling activities before the effects of previous activities are visible. Because scaling activities are suspended when an Auto Scaling group is in cooldown, an adequate cooldown period helps to prevent a trigger from firing based on stale metrics. If a cool-down period is not configured, the scaling policy may scale up and down too quickly. </p><p><a href=\"http://docs.amazonwebservices.com/AutoScaling/latest/DeveloperGuide/scaling_plan.html#scaling_policies\" target=\"_blank\">Go here to learn more.</a></p>",
                "Category": "Usage",
                "Importance": "Low",
                "CountOfResults": 2,
                "Results": [
                  "Auto Scaling Group: agcmgroup | Cooldown: 1 second(s) | Region: US East (Northern Virginia)",
                  "Auto Scaling Group: changemon | Cooldown: 1 second(s) | Region: US East (Northern Virginia)"
                ]
              }
            ],
            "DateOfResults": "2016-01-29T15:47:56"
          }
          

Get Best Practices V2

This API is deprecated and is maintained for historical reasons only. Please use get_best_practices_v3 instead.
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
include_advisor_bpcs boolean optional; will report back the Trusted Advisor 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_account_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
filter_by_compliance_controls string optional; enter any text to use for filtering compliance control search results
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": "..."
                }
             }
          }

Create Detailed Billing Grouped Filter

This API call is deprecated and is maintained for historical reasons only. Please use create_detailed_billing_grouped_filter_v2 instead. 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
Attribute
Account
Description
Ec2InstanceId
Month
Operation
AvailabilityZone
ProductName
Region
Resource
UsageType
t:TagKey
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
Time Increment
Day
Hour
Month
optional; indicates the time increment upon which your exported data will be aggregated; on-screen total will remain the same
cost_type
Parameter Description
Blended Average cost for the AWS resource across the entire consolidated bill
Unblended The cost as specified in the bill/invoice
ListCost The custom/list cost after applying custom usage rates and charges
optional; indicates which cost type will be applied to the saved filter
chart_type
Type
Area
Bar
Column
Pie
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
Type Description
RequireAll show costs that contain all of the selected tags
RequireAny shows costs that contain any of the selected tags
ExcludeAny exclude any costs that contain the selected tags
optional; identifies how the customer chooses to filter their selected tag key/tag value pairs
account_type
Type
Account
AccountFamily
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
ID Name Location
1 us-east-1 US East
2 us-west-2 US West
3 us-west-1 US West
4 eu-west-1 EU
5 ap-southeast-1 Asia Pacific
6 ap-northeast-1 Asia Pacific
7 sa-east-1 South America
8 ap-southeast-2 Asia Pacific
9 us-gov-west-1 GovCloud
10 eu-central-1 EU
11 cn-north-1 China
12 ap-northeast-2 Asia Pacific
13 ap-south-1 Asia Pacific
14 us-east-2 US East
15 ca-central-1 Canada
16 eu-west-2 EU
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."
          }

List Results From An Advanced Grouping Saved Filter V2

This API is deprecated and is maintained for historical reasons only. Please use get_detailed_billing_with_grouping_v2 instead. The API method "billing/get_detailed_billing_with_grouping" is used to pull the results from a Saved Filter in the Advanced Grouping (w/ Tags) report.

XML call:
https://api.cloudcheckr.com/api/billing.xml/get_detailed_billing_with_grouping?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?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.
  • 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:
<GetDetailedBillingWithGroupingResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          	<Groupings>
          		<Grouping>
          			<Name>Description $0.13 per 1 million I/O requests</Name>
          			<SumCost>0.2351915800</SumCost>
          			<SumUsageQuantity>0</SumUsageQuantity>
          			<Costs>
          				<Cost>
          					<Date>2013-12-14T11:00:00</Date>
          					<Amount>0.0003816800</Amount>
          					<UsageQuantity xsi:nil="true"/>
          				</Cost>
          				<Cost>
          					<Date>2013-12-09T00:00:00</Date>
          					<Amount>0.0003419000</Amount>
          					<UsageQuantity xsi:nil="true"/>
          				</Cost>
          				...snip...
          				<Cost>
          					<Date>2013-12-08T22:00:00</Date>
          					<Amount>0.0003881800</Amount>
          					<UsageQuantity xsi:nil="true"/>
          				</Cost>
          				<Cost>
          					<Date>2013-12-17T23:00:00</Date>
          					<Amount>0.0003016000</Amount>
          					<UsageQuantity xsi:nil="true"/>
          				</Cost>
          			</Costs>
          		</Grouping>
          	</Groupings>
          </GetDetailedBillingWithGroupingResponse>
          
JSON Example:
{
          	"Groupings":[
          	{
          		"Name":"Description $0.13 per 1 million I/O requests",
          		"Costs":[
          			{"Date":"2013-12-14T11:00:00","Amount":0.0003816800,"UsageQuantity":null},
          			{"Date":"2013-12-09T00:00:00","Amount":0.0003419000,"UsageQuantity":null},
          			{"Date":"2013-12-08T22:00:00","Amount":0.0003881800,"UsageQuantity":null},
          			...snip...
          			{"Date":"2013-12-14T06:00:00",	"Amount":0.0000000000,	"UsageQuantity":null}
          		]
          	}]
          }
          

Get EC2 Reserved Instance Rebalancer EC2 Instances

This API is deprecated and is maintained for historical reasons only. Please use get_ec2_reserved_instance_rebalancer_ec2_instances_v2 instead. The API method “get_ec2_reserved_instance_rebalancer_ec2_instances” is used to pull a list of EC2 instances, updated hourly.

XML call:
https://api.cloudcheckr.com/api/billing.xml/get_ec2_reserved_instance_rebalancer_ec2_instances?access_key=[access_key]
JSON call:
https://api.cloudcheckr.com/api/billing.json/get_ec2_reserved_instance_rebalancer_ec2_instances?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:
<GetEc2ReservedInstanceRebalancerEc2InstancesResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
              <Ec2ReservedInstanceRebalancerEc2Instances>
                  <Ec2ReservedInstanceRebalancerEc2Instance>
                      <InstanceId>i-97195924</InstanceId>
                      <AwsAccountId>215011050627</AwsAccountId>
                      <InstanceType>t2.micro</InstanceType>
                      <Platform>Linux</Platform>
                      <AvailabilityZone>us-east-1a</AvailabilityZone>
                      <Region>us-east-1</Region>
                      <MatchedReservedInstance>
                          <MatchedReservedInstanceId>45cd3a0a-1789-4f86-967d-bc02abfead06</MatchedReservedInstanceId>
                          <AwsAccountId>215011050627</AwsAccountId>
                          <Tenancy>Default</Tenancy>
                          <Platform>Linux</Platform>
                          <OfferingClass>Standard</OfferingClass>
                          <InstanceType>t2.micro</InstanceType>
                          <InstanceCount>1</InstanceCount>
                      </MatchedReservedInstance>
                  </Ec2ReservedInstanceRebalancerEc2Instance>
                  <Ec2ReservedInstanceRebalancerEc2Instance>
                      <InstanceId>i-188ddd36</InstanceId>
                      <AwsAccountId>215011050627</AwsAccountId>
                      <InstanceType>t1.micro</InstanceType>
                      <Platform>Linux</Platform>
                      <AvailabilityZone>us-east-1d</AvailabilityZone>
                      <Region>us-east-1</Region>
                      <MatchedReservedInstance>
                          <MatchedReservedInstanceId>f69a841f-55ea-4995-985a-4c45521b0dac</MatchedReservedInstanceId>
                          <AwsAccountId>215011050627</AwsAccountId>
                          <Tenancy>Default</Tenancy>
                          <Platform>Linux</Platform>
                          <OfferingClass>Standard</OfferingClass>
                          <InstanceType>t1.micro</InstanceType>
                          <InstanceCount>1</InstanceCount>
                      </MatchedReservedInstance>
                  </Ec2ReservedInstanceRebalancerEc2Instance>
              </Ec2ReservedInstanceRebalancerEc2Instances>
          </GetEc2ReservedInstanceRebalancerEc2InstancesResponse>
JSON Example:
{
            "GetEc2ReservedInstanceRebalancerEc2InstancesResponse": {
              "Ec2ReservedInstanceRebalancerEc2Instances": {
                "Ec2ReservedInstanceRebalancerEc2Instance": [
                  {
                    "InstanceId": "i-97195924",
                    "AwsAccountId": "215011050627",
                    "InstanceType": "t2.micro",
                    "Platform": "Linux",
                    "AvailabilityZone": "us-east-1a",
                    "Region": "us-east-1",
                    "MatchedReservedInstance": {
                      "MatchedReservedInstanceId": "45cd3a0a-1789-4f86-967d-bc02abfead06",
                      "AwsAccountId": "215011050627",
                      "Tenancy": "Default",
                      "Platform": "Linux",
                      "OfferingClass": "Standard",
                      "InstanceType": "t2.micro",
                      "InstanceCount": "1"
                    }
                  },
                  {
                    "InstanceId": "i-188ddd36",
                    "AwsAccountId": "215011050627",
                    "InstanceType": "t1.micro",
                    "Platform": "Linux",
                    "AvailabilityZone": "us-east-1d",
                    "Region": "us-east-1",
                    "MatchedReservedInstance": {
                      "MatchedReservedInstanceId": "f69a841f-55ea-4995-985a-4c45521b0dac",
                      "AwsAccountId": "215011050627",
                      "Tenancy": "Default",
                      "Platform": "Linux",
                      "OfferingClass": "Standard",
                      "InstanceType": "t1.micro",
                      "InstanceCount": "1"
                    }
                  }
                ]
              },
            }
          }

Get Invoice Data From Invoice Generator

This API is deprecated and is maintained for historical reasons only. Please use get_invoice_data_from_invoice_generator_v2 instead.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 CloudTrail Alert Results

This API is deprecated and is maintained for historical reasons only. Please use get_cloudtrail_alert_results_v2 instead. The API method “get_cloudtrail_alert_results” is used to pull the data for the CloudTrail Results report from CloudCheckr.

XML call:
https://api.cloudcheckr.com/api/alert.xml/get_cloudtrail_alert_results?access_key=[access_key]&max_results=5
JSON call:
https://api.cloudcheckr.com/api/alert.json/get_cloudtrail_alert_results?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>H4sIAAAAAAAEAnUpUOA0</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>
                  </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": null
              }
            ],
            "DateOfResults": "2017-01-11T19:22:13",
            "HasNext": true,
            "NextToken": "H4sIAAAAAAAEAnUpUOA0"
          }
          

EC2 Details

The API method, “get_resources_ec2_details”, pulls the data for the list of EC2 Instances report from CloudCheckr.

Sample XML Call:

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

Sample JSON Call:

https://api.cloudcheckr.com/api/inventory.json/get_resources_ec2_details?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.
  • aws_account_ids (optional; multi-account view only) – return report for these accounts.
  • instance_ids (optional) – return statistics for specific EC2 instances (comma-separated for multiple instances).
  • resource_tags (optional) – returns statistics from EC2 instances containing specific tags (can be just tag key, or key/value pairs formatted as key:value; comma-separated for multiple tags).
  • use_account (*optional; required) – return report for this account.
  • use_cc_account_id (*optional/required) – return report for this account.
  • use_aws_account_id (*optional/required) – return report for this account.

* = one of these parameters must be defined

OUTPUT

XML Example:

<GetResourcesEc2DetailsResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <HasNext>false</HasNext>
          <NextToken />
          <DateOfResults>2017-01-25T16:28:59</DateOfResults>
          <Count>1</Count>
          <Ec2Instances>
          <Ec2Instance>
          <Instance>i-02319c256b2b9b7e6 (EM_Testing)</Instance>
          <InstanceId>i-02319c256b2b9b7e6</InstanceId>
          <InstanceName>EM_Testing</InstanceName>
          <Status>running</Status>
          <Cost>676.68</Cost>
          <Region>US East (Northern Virginia)</Region>
          <PricingType>OnDemand</PricingType>
          <Platform>Windows</Platform>
          <PricingPlatform>WindowsSqlStandardVpc</PricingPlatform>
          <InstanceType>m4.large</InstanceType>
          <AvailabilityZone>us-east-1e</AvailabilityZone>
          <AttachmentCount>2</AttachmentCount>
          <TotalVolumeSizeGiB>550</TotalVolumeSizeGiB>
          <AMI>ami-097f522e</AMI>
          <LaunchTime>2017-01-12T13:47:43</LaunchTime>
          <MonitoringState>disabled</MonitoringState>
          <PrivateDnsName>ip-11-0-0-123.ec2.internal</PrivateDnsName>
          <PrivateIpAddress>11.0.0.123</PrivateIpAddress>
          <PublicDnsName>ec2-50-91-136-123.compute-1.amazonaws.com</PublicDnsName>
          <PublicIpAddress>50.91.136.123</PublicIpAddress>
          <SourceDestinationCheck>true</SourceDestinationCheck>
          <SubnetId>subnet-679b123b</SubnetId>
          <VirtualizationType>hvm</VirtualizationType>
          <VpcId>vpc-a51235s2</VpcId>
          <Ec2Cost>621.6750000000</Ec2Cost>
          <EbsCost>55.0000000000</EbsCost>
          <AvgCpuforLast7Days>3.5525089285714273</AvgCpuforLast7Days>
          <AvgCpuforLast30Days>5.0092333057395217</AvgCpuforLast30Days>
          <AvgCpuforLast90Days>5.0092333057395217</AvgCpuforLast90Days>
          <AvgNetworkInLast30Days>1461071.6742595651</AvgNetworkInLast30Days>
          <AvgNetworkOutLast30Days>65294.203656181024</AvgNetworkOutLast30Days>
          <HighCpuPercent>90</HighCpuPercent>
          <LowCpuPercent>5</LowCpuPercent>
          <HoursCpuUtilAbove80>3</HoursCpuUtilAbove80>
          <HoursCpuUtilBelow80>2</HoursCpuUtilBelow80>
          <HoursCpuUtilBelow60>0</HoursCpuUtilBelow60>
          <HoursCpuUtilBelow40>2</HoursCpuUtilBelow40>
          <HoursCpuUtilBelow20>295</HoursCpuUtilBelow20>
          <HoursHighCpuLast7Days>0</HoursHighCpuLast7Days>
          <HoursHighCpuLast30Days>1</HoursHighCpuLast30Days>
          <HoursHighCpuLast90Days>1</HoursHighCpuLast90Days>
          <HoursLowCpuLast7Days>134</HoursLowCpuLast7Days>
          <HoursLowCpuLast30Days>237</HoursLowCpuLast30Days>
          <HoursLowCpuLast90Days>237</HoursLowCpuLast90Days>
          <HoursRunningLast7Days>168</HoursRunningLast7Days>
          <HoursRunningLast30Days>302</HoursRunningLast30Days>
          <HoursRunningLast90Days>302</HoursRunningLast90Days>
          <MinimumCpuUtilization>0.876</MinimumCpuUtilization>
          <MinimumCpuUtilizationDateTime>2017-01-13T10:00:00</MinimumCpuUtilizationDateTime>
          <PeakCpuUtilization>95.906666666666652</PeakCpuUtilization>
          <PeakCpuUtilizationDateTime>2017-01-11T21:00:00</PeakCpuUtilizationDateTime>
          <ResourceTags>
          <ResourceTag>
          <Key>Name</Key>
          <Value>EM_Testing</Value>
          </ResourceTag>
          </ResourceTags>
          </Ec2Instance>
          </Ec2Instances>
          </GetResourcesEc2DetailsResponse>
          

JSON Example:

{
          "Count": 1,
          "Ec2Instances": [
          {
          "Instance": "i-02319c256b2b9b7e6 (EM_Testing)",
          "InstanceId": "i-02319c256b2b9b7e6",
          "InstanceName": "EM_Testing",
          "Status": "running",
          "Cost": 676.68,
          "Region": "US East (Northern Virginia)",
          "PricingType": "OnDemand",
          "Platform": "Windows",
          "PricingPlatform": "WindowsSqlStandardVpc",
          "InstanceType": "m4.large",
          "AvailabilityZone": "us-east-1e",
          "AttachmentCount": 2,
          "TotalVolumeSizeGiB": 550,
          "AMI": "ami-097f522e",
          "LaunchTime": "2017-01-12T13:47:43",
          "MonitoringState": "disabled",
          "PrivateDnsName": "ip-11-0-0-123.ec2.internal",
          "PrivateIpAddress": "11.0.0.123",
          "PublicDnsName": "ec2-50-91-136-123.compute-1.amazonaws.com",
          "PublicIpAddress": "50.91.136.123",
          "RamDiskId": null,
          "SourceDestinationCheck": true,
          "StateReasonCode": null,
          "StateReasonMessage": null,
          "StateTransitionMessage": null,
          "SubnetId": "subnet-679b123b",
          "VirtualizationType": "hvm",
          "VpcId": "vpc-a58db5s2",
          "Ec2Cost": 621.675,
          "EbsCost": 55,
          "AvgCpuforLast7Days": 3.5525089285714273,
          "AvgCpuforLast30Days": 5.009233305739522,
          "AvgCpuforLast90Days": 5.009233305739522,
          "AvgNetworkInLast30Days": 1461071.674259565,
          "AvgNetworkOutLast30Days": 65294.203656181024,
          "HighCpuPercent": 90,
          "LowCpuPercent": 5,
          "HoursCpuUtilAbove80": 3,
          "HoursCpuUtilBelow80": 2,
          "HoursCpuUtilBelow60": 0,
          "HoursCpuUtilBelow40": 2,
          "HoursCpuUtilBelow20": 295,
          "HoursHighCpuLast7Days": 0,
          "HoursHighCpuLast30Days": 1,
          "HoursHighCpuLast90Days": 1,
          "HoursLowCpuLast7Days": 134,
          "HoursLowCpuLast30Days": 237,
          "HoursLowCpuLast90Days": 237,
          "HoursRunningLast7Days": 168,
          "HoursRunningLast30Days": 302,
          "HoursRunningLast90Days": 302,
          "MinimumCpuUtilization": 0.876,
          "MinimumCpuUtilizationDateTime": "2017-01-13T10:00:00",
          "PeakCpuUtilization": 95.90666666666665,
          "PeakCpuUtilizationDateTime": "2017-01-11T21:00:00",
          "ResourceTags": [
          {
          "Key": "Name",
          "Value": "EM_Testing"
          }
          ],
          "AccountName": null
          }
          ],
          "DateOfResults": "2017-01-25T16:28:59",
          "HasNext": false,
          "NextToken": ""
          }

EC2 Details V2

The API method, “get_resources_ec2_details_V2”, pulls the data for the list of EC2 Instances report from CloudCheckr. This call is identical to version 1 except the output now includes information about Security gGroups.

Sample XML Call:

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

Sample JSON Call:

https://api.cloudcheckr.com/api/inventory.json/get_resources_ec2_details?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.
  • aws_account_ids (optional; multi-account view only) – return report for these accounts.
  • instance_ids (optional) – return statistics for specific EC2 instances (comma-separated for multiple instances).
  • resource_tags (optional) – returns statistics from EC2 instances containing specific tags (can be just tag key, or key/value pairs formatted as key:value; comma-separated for multiple tags).
  • use_account (*optional; required) – return report for this account.
  • use_cc_account_id (*optional/required) – return report for this account.
  • use_aws_account_id (*optional/required) – return report for this account.

* = one of these parameters must be defined

OUTPUT
XML Example:

GetResourcesEc2DetailsResponseV2 xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <HasNext>false</HasNext>
          <NextToken />
          <DateOfResults>2017-01-25T20:43:28</DateOfResults>
          <Count>1</Count>
          <Ec2Instances>
          <Ec2InstanceV2>
          <Instance>i-00039c123b2b9b7e6 (EM_Testing)</Instance>
          <InstanceId>i-00039c123b2b9b7e6</InstanceId>
          <InstanceName>EM_Testing</InstanceName>
          <Status>running</Status>
          <Cost>669.31</Cost>
          <Region>US East (Northern Virginia)</Region>
          <PricingType>OnDemand</PricingType>
          <Platform>Windows</Platform>
          <PricingPlatform>WindowsSqlStandardVpc</PricingPlatform>
          <InstanceType>m4.large</InstanceType>
          <AvailabilityZone>us-east-1e</AvailabilityZone>
          <AttachmentCount>2</AttachmentCount>
          <TotalVolumeSizeGiB>550</TotalVolumeSizeGiB>
          <AMI>ami-097f522e</AMI>
          <LaunchTime>2017-01-12T13:47:43</LaunchTime>
          <MonitoringState>disabled</MonitoringState>
          <PrivateDnsName>ip-11-0-0-123.ec2.internal</PrivateDnsName>
          <PrivateIpAddress>11.0.0.123</PrivateIpAddress>
          <PublicDnsName>ec2-50-91-136-123.compute-1.amazonaws.com</PublicDnsName>
          <PublicIpAddress>50.91.136.123</PublicIpAddress>
          <SourceDestinationCheck>true</SourceDestinationCheck>
          <SubnetId>subnet-679a123b</SubnetId>
          <VirtualizationType>hvm</VirtualizationType>
          <VpcId>vpc-a58db1e3</VpcId>
          <Ec2Cost>614.3070000000</Ec2Cost>
          <EbsCost>55.0000000000</EbsCost>
          <AvgCpuforLast7Days>3.5525089285714273</AvgCpuforLast7Days>
          <AvgCpuforLast30Days>5.0092333057395209</AvgCpuforLast30Days>
          <AvgCpuforLast90Days>5.0092333057395209</AvgCpuforLast90Days>
          <AvgNetworkInLast30Days>1461071.6742595648</AvgNetworkInLast30Days>
          <AvgNetworkOutLast30Days>65294.203656181024</AvgNetworkOutLast30Days>
          <HighCpuPercent>90</HighCpuPercent>
          <LowCpuPercent>5</LowCpuPercent>
          <HoursCpuUtilAbove80>3</HoursCpuUtilAbove80>
          <HoursCpuUtilBelow80>2</HoursCpuUtilBelow80>
          <HoursCpuUtilBelow60>0</HoursCpuUtilBelow60>
          <HoursCpuUtilBelow40>2</HoursCpuUtilBelow40>
          <HoursCpuUtilBelow20>295</HoursCpuUtilBelow20>
          <HoursHighCpuLast7Days>0</HoursHighCpuLast7Days>
          <HoursHighCpuLast30Days>1</HoursHighCpuLast30Days>
          <HoursHighCpuLast90Days>1</HoursHighCpuLast90Days>
          <HoursLowCpuLast7Days>134</HoursLowCpuLast7Days>
          <HoursLowCpuLast30Days>237</HoursLowCpuLast30Days>
          <HoursLowCpuLast90Days>237</HoursLowCpuLast90Days>
          <HoursRunningLast7Days>168</HoursRunningLast7Days>
          <HoursRunningLast30Days>302</HoursRunningLast30Days>
          <HoursRunningLast90Days>302</HoursRunningLast90Days>
          <MinimumCpuUtilization>0.876</MinimumCpuUtilization>
          <MinimumCpuUtilizationDateTime>2017-01-13T10:00:00</MinimumCpuUtilizationDateTime>
          <PeakCpuUtilization>95.906666666666652</PeakCpuUtilization>
          <PeakCpuUtilizationDateTime>2017-01-11T21:00:00</PeakCpuUtilizationDateTime>
          <ResourceTags>
          <ResourceTag>
          <Key>Name</Key>
          <Value>EM_Testing</Value>
          </ResourceTag>
          </ResourceTags>
          <SecurityGroups>
          <SecurityGroup>
          <GroupId>sg-28ca9123</GroupId>
          <GroupName>StandAlone_AIO</GroupName>
          </SecurityGroup>
          </SecurityGroups>
          </Ec2InstanceV2>
          </Ec2Instances>
          </GetResourcesEc2DetailsResponseV2>
          

JSON Example:

{
          "Count": 1,
          "Ec2Instances": [
          {
          "Instance": "i-00039c123b2b9b7e6 (EM_Testing)",
          "InstanceId": "i-00039c123b2b9b7e6",
          "InstanceName": "EM_Testing",
          "Status": "running",
          "Cost": 669.31,
          "Region": "US East (Northern Virginia)",
          "PricingType": "OnDemand",
          "Platform": "Windows",
          "PricingPlatform": "WindowsSqlStandardVpc",
          "InstanceType": "m4.large",
          "AvailabilityZone": "us-east-1e",
          "AttachmentCount": 2,
          "TotalVolumeSizeGiB": 550,
          "AMI": "ami-097f522e",
          "LaunchTime": "2017-01-12T13:47:43",
          "MonitoringState": "disabled",
          "PrivateDnsName": "ip-11-0-0-123.ec2.internal",
          "PrivateIpAddress": "11.0.0.123",
          "PublicDnsName": "ec2-50-91-136-123.compute-1.amazonaws.com",
          "PublicIpAddress": "50.91.136.123",
          "RamDiskId": null,
          "SourceDestinationCheck": true,
          "StateReasonCode": null,
          "StateReasonMessage": null,
          "StateTransitionMessage": null,
          "SubnetId": "subnet-679a123b",
          "VirtualizationType": "hvm",
          "VpcId": "vpc-a581e3c2",
          "Ec2Cost": 614.307,
          "EbsCost": 55,
          "AvgCpuforLast7Days": 3.5525089285714273,
          "AvgCpuforLast30Days": 5.009233305739521,
          "AvgCpuforLast90Days": 5.009233305739521,
          "AvgNetworkInLast30Days": 1461071.6742595648,
          "AvgNetworkOutLast30Days": 65294.203656181024,
          "HighCpuPercent": 90,
          "LowCpuPercent": 5,
          "HoursCpuUtilAbove80": 3,
          "HoursCpuUtilBelow80": 2,
          "HoursCpuUtilBelow60": 0,
          "HoursCpuUtilBelow40": 2,
          "HoursCpuUtilBelow20": 295,
          "HoursHighCpuLast7Days": 0,
          "HoursHighCpuLast30Days": 1,
          "HoursHighCpuLast90Days": 1,
          "HoursLowCpuLast7Days": 134,
          "HoursLowCpuLast30Days": 237,
          "HoursLowCpuLast90Days": 237,
          "HoursRunningLast7Days": 168,
          "HoursRunningLast30Days": 302,
          "HoursRunningLast90Days": 302,
          "MinimumCpuUtilization": 0.876,
          "MinimumCpuUtilizationDateTime": "2017-01-13T10:00:00",
          "PeakCpuUtilization": 95.90666666666665,
          "PeakCpuUtilizationDateTime": "2017-01-11T21:00:00",
          "ResourceTags": [
          {
          "Key": "Name",
          "Value": "EM_Testing"
          }
          ],
          "SecurityGroups": [
          {
          "GroupId": "sg-28ca9123",
          "GroupName": "StandAlone_AIO"
          }
          ],
          "AccountName": null
          }
          ],
          "DateOfResults": "2017-01-25T20:43:28",
          "HasNext": false,
          "NextToken": ""
          }

EC2 Details V3

The API method, “get_resources_ec2_details_V3”, pulls the data for the list of EC2 Instances report from CloudCheckr. This call is identical to version 2 except the output now includes information about tenancy.

Sample XML Call:

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

Sample JSON Call:

https://api.cloudcheckr.com/api/inventory.json/get_resources_ec2_details?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.
  • aws_account_ids (optional; multi-account view only) – return report for these accounts.
  • instance_ids (optional) – return statistics for specific EC2 instances (comma-separated for multiple instances).
  • resource_tags (optional) – returns statistics from EC2 instances containing specific tags (can be just tag key, or key/value pairs formatted as key:value; comma-separated for multiple tags).
  • use_account (*optional; required) – return report for this account.
  • use_cc_account_id (*optional/required) – return report for this account.
  • use_aws_account_id (*optional/required) – return report for this account.

* = one of these parameters must be defined

OUTPUT

XML Example:

GetResourcesEc2DetailsResponseV3 xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <HasNext>false</HasNext>
          <NextToken />
          <DateOfResults>2017-01-25T20:43:28</DateOfResults>
          <Count>1</Count>
          <Ec2Instances>
          <Ec2InstanceV3>
          <Instance>i-00039c123b2b9b7e6 (EM_Testing)</Instance>
          <InstanceId>i-00039c123b2b9b7e6</InstanceId>
          <InstanceName>EM_Testing</InstanceName>
          <Status>running</Status>
          <Cost>669.31</Cost>
          <Region>US East (Northern Virginia)</Region>
          <PricingType>OnDemand</PricingType>
          <Platform>Windows</Platform>
          <PricingPlatform>WindowsSqlStandardVpc</PricingPlatform>
          <InstanceType>m4.large</InstanceType>
          <AvailabilityZone>us-east-1e</AvailabilityZone>
          <AttachmentCount>2</AttachmentCount>
          <TotalVolumeSizeGiB>550</TotalVolumeSizeGiB>
          <AMI>ami-097f522e</AMI>
          <LaunchTime>2017-01-12T13:47:43</LaunchTime>
          <MonitoringState>disabled</MonitoringState>
          <PrivateDnsName>ip-11-0-0-123.ec2.internal</PrivateDnsName>
          <PrivateIpAddress>11.0.0.123</PrivateIpAddress>
          <PublicDnsName>ec2-50-91-136-123.compute-1.amazonaws.com</PublicDnsName>
          <PublicIpAddress>50.91.136.123</PublicIpAddress>
          <SourceDestinationCheck>true</SourceDestinationCheck>
          <SubnetId>subnet-679a123b</SubnetId>
          <VirtualizationType>hvm</VirtualizationType>
          <VpcId>vpc-a69db5c2</VpcId>
          <Tenancy>Default</Tenancy>
          <Ec2Cost>614.3070000000</Ec2Cost>
          <EbsCost>55.0000000000</EbsCost>
          <AvgCpuforLast7Days>3.5525089285714273</AvgCpuforLast7Days>
          <AvgCpuforLast30Days>5.0092333057395209</AvgCpuforLast30Days>
          <AvgCpuforLast90Days>5.0092333057395209</AvgCpuforLast90Days>
          <AvgNetworkInLast30Days>1461071.6742595648</AvgNetworkInLast30Days>
          <AvgNetworkOutLast30Days>65294.203656181024</AvgNetworkOutLast30Days>
          <HighCpuPercent>90</HighCpuPercent>
          <LowCpuPercent>5</LowCpuPercent>
          <HoursCpuUtilAbove80>3</HoursCpuUtilAbove80>
          <HoursCpuUtilBelow80>2</HoursCpuUtilBelow80>
          <HoursCpuUtilBelow60>0</HoursCpuUtilBelow60>
          <HoursCpuUtilBelow40>2</HoursCpuUtilBelow40>
          <HoursCpuUtilBelow20>295</HoursCpuUtilBelow20>
          <HoursHighCpuLast7Days>0</HoursHighCpuLast7Days>
          <HoursHighCpuLast30Days>1</HoursHighCpuLast30Days>
          <HoursHighCpuLast90Days>1</HoursHighCpuLast90Days>
          <HoursLowCpuLast7Days>134</HoursLowCpuLast7Days>
          <HoursLowCpuLast30Days>237</HoursLowCpuLast30Days>
          <HoursLowCpuLast90Days>237</HoursLowCpuLast90Days>
          <HoursRunningLast7Days>168</HoursRunningLast7Days>
          <HoursRunningLast30Days>302</HoursRunningLast30Days>
          <HoursRunningLast90Days>302</HoursRunningLast90Days>
          <MinimumCpuUtilization>0.876</MinimumCpuUtilization>
          <MinimumCpuUtilizationDateTime>2017-01-13T10:00:00</MinimumCpuUtilizationDateTime>
          <PeakCpuUtilization>95.906666666666652</PeakCpuUtilization>
          <PeakCpuUtilizationDateTime>2017-01-11T21:00:00</PeakCpuUtilizationDateTime>
          <ResourceTags>
          <ResourceTag>
          <Key>Name</Key>
          <Value>EM_Testing</Value>
          </ResourceTag>
          </ResourceTags>
          <SecurityGroups>
          <SecurityGroup>
          <GroupId>sg-28ca9123</GroupId>
          <GroupName>StandAlone_AIO</GroupName>
          </SecurityGroup>
          </SecurityGroups>
          </Ec2InstanceV3>
          </Ec2Instances>
          </GetResourcesEc2DetailsResponseV3>
          

JSON Example

{
          "Count": 1,
          "Ec2Instances": [
          {
          "Instance": "i-00039c123b2b9b7e6 (EM_Testing)",
          "InstanceId": "i-00039c123b2b9b7e6",
          "InstanceName": "EM_Testing",
          "Status": "running",
          "Cost": 669.31,
          "Region": "US East (Northern Virginia)",
          "PricingType": "OnDemand",
          "Platform": "Windows",
          "PricingPlatform": "WindowsSqlStandardVpc",
          "InstanceType": "m4.large",
          "AvailabilityZone": "us-east-1e",
          "AttachmentCount": 2,
          "TotalVolumeSizeGiB": 550,
          "AMI": "ami-097f522e",
          "LaunchTime": "2017-01-12T13:47:43",
          "MonitoringState": "disabled",
          "PrivateDnsName": "ip-11-0-0-123.ec2.internal",
          "PrivateIpAddress": "11.0.0.123",
          "PublicDnsName": "ec2-50-91-136-123.compute-1.amazonaws.com",
          "PublicIpAddress": "50.91.136.123",
          "RamDiskId": null,
          "SourceDestinationCheck": true,
          "StateReasonCode": null,
          "StateReasonMessage": null,
          "StateTransitionMessage": null,
          "SubnetId": "subnet-679a623b",
          "VirtualizationType": "hvm",
          "VpcId": "vpc-a69db5c2",
          "Tenancy": "Default",
          "Ec2Cost": 614.307,
          "EbsCost": 55,
          "AvgCpuforLast7Days": 3.5525089285714273,
          "AvgCpuforLast30Days": 5.009233305739521,
          "AvgCpuforLast90Days": 5.009233305739521,
          "AvgNetworkInLast30Days": 1461071.6742595648,
          "AvgNetworkOutLast30Days": 65294.203656181024,
          "HighCpuPercent": 90,
          "LowCpuPercent": 5,
          "HoursCpuUtilAbove80": 3,
          "HoursCpuUtilBelow80": 2,
          "HoursCpuUtilBelow60": 0,
          "HoursCpuUtilBelow40": 2,
          "HoursCpuUtilBelow20": 295,
          "HoursHighCpuLast7Days": 0,
          "HoursHighCpuLast30Days": 1,
          "HoursHighCpuLast90Days": 1,
          "HoursLowCpuLast7Days": 134,
          "HoursLowCpuLast30Days": 237,
          "HoursLowCpuLast90Days": 237,
          "HoursRunningLast7Days": 168,
          "HoursRunningLast30Days": 302,
          "HoursRunningLast90Days": 302,
          "MinimumCpuUtilization": 0.876,
          "MinimumCpuUtilizationDateTime": "2017-01-13T10:00:00",
          "PeakCpuUtilization": 95.90666666666665,
          "PeakCpuUtilizationDateTime": "2017-01-11T21:00:00",
          "ResourceTags": [
          {
          "Key": "Name",
          "Value": "EM_Testing"
          }
          ],
          "SecurityGroups": [
          {
          "GroupId": "sg-28ca9123",
          "GroupName": "StandAlone_AIO"
          }
          ],
          "AccountName": null
          }
          ],
          "DateOfResults": "2017-01-25T20:43:28",
          "HasNext": false,
          "NextToken": ""
          }
          

How did we do?