Deprecated API calls

Below is the list of 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.

* 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.

IMPORTANT: 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: http://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 when possible.

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

LIST BEST PRACTICE RESULTS

This API is deprecated and is maintained for historical reasons only. Please use get_best_practices_v2 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"
}

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

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"
          }
        }
      ]
    },
  }
}

CLOUDTRAIL GET 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"
}