API Reference Guide (AWS)

You can now use CloudCheckr CMx access tokens when running API calls in our legacy product. You can still use your existing API access keys in the legacy product, but access tokens will provide better security, more consistent authorization management, and the ability to access multiple projects and accounts.
Please use these URLs when accessing the API in the following platforms:
  • AU: https://au.cloudcheckr.com
  • EU: https://eu.cloudcheckr.com
  • GOV: https://gov.cloudcheckr.com
  • FED: https://fed.cloudcheckr.com

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.

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.

Using Access Keys

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

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]

Putting It All Together:

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

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.


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


API Calls

Add Cost Allocator

The API method, “add_cost_allocator”, is used to create Cost Allocator settings in CloudCheckr, so you can allocate usage costs and report on shared services more accurately.

CloudCheckr has rebranded its existing feature, Tag Mapping – Splitting, as Cost Allocator.

CloudCheckr’s Cost Allocator is a powerful tool that is designed to help Managed Service Providers (MSPs), resellers, and enterprises untangle and manage cost allocation in a multi-tenant implementation. Cost Allocator allows you to re-allocate costs from shared resources and services, by usage, across projects, customers, and departments. This helps ensure accurate invoicing and chargebacks each billing period.

Cost Allocator allows you to easily:

  • match shared resources or services from your billing reports
  • divide the costs from those resources or services based on usage
  • apply the split costs across multiple tag keys and values

The preferred HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level or account-level access key
name_for_cost_allocator string required; the unique name of the tagging structure for your selected Cost Allocator configuration
tag_conditions List <string>

required/optional; identifies the costs that match an attribute and a given value

EX: Your company uses an Environment tag key with a tag value of Development.

You must use the tag_conditions or property_conditions parameter when defining your tagging structure.
property_conditions List <string>

required/optional; identifies any additional characteristics that allow you to further limit what costs are included in your tagging structure

In AWS accounts, you can select one or more of the following properties:

  • Account
  • Availability Zone
  • Operation
  • Region
  • Resource
  • Service
  • Usage Type
You must use the tag_conditions or property_conditions parameter when defining your tagging structure.
all_conditions_met boolean required; indicates that the cost data must meet all the conditions before CloudCheckr will apply the divisions
divisions List <string>

required; indicates how you want CloudCheckr to allocate your costs, by percentage, across your tag mappings

CloudCheckr will only apply the divisions if your tagging structure meets the previous conditions.

Your cost allocations should add up to 100%.
use_aws_account_id string *optional/required; the 12-digit AWS account ID of the CloudCheckr account you are making the call for
use_account string *optional/required; the name of the CloudCheckr account you are making the call for
use_cc_account_id string *optional/required; the CloudCheckr ID of the account you are making the call for
*If you use an admin-level access key, you are required to add one of the following parameters to your request:
  • use_aws_account_id
  • use_account
  • use_cc_account_id

API CALL URL:

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

REQUEST EXAMPLE:

curl -- request POST \
-- 'https://api.cloudcheckr.com/api/billing.[json|xml]/add_cost_allocator' \
-- header 'cache-control: no-cache' \
-- header 'access_key: [access key]' \
-- header 'content-type: application/[json|xml]' \
-- data '{
"use_cc_account_id": "3",
"name_for_cost_allocator" : "sampleName",
"property_conditions" : [{"key_to_map" : "Region", "value_to_map" : "ap_east_1"}],
"divisions" : [{"map_percent_of_cost_to_tag" : "50", "map_to_tag_key" : "TagKey2", "map_to_tag_value" : "TagValue2"},
{"map_percent_of_cost_to_tag" : "50", "map_to_tag_key" : "TagKey3", "map_to_tag_value" : "TagValue3"}],
"all_conditions_met" : "true"
}'

RESPONSE EXAMPLES:

Result 200 OK (XML):

	<add_cost_allocatorgResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<status>
<Code>200</Code>
<Message>Success</Message>
</status>
</add_cost_allocatorResponse>

Result 200 OK (JSON):

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

Add Third Party Account

The API method, “add_third_party_account”, is used to configure a connection between CloudCheckr and an external service provider, so you can receive notifications daily or any time there is a change to a Best Practice Check or alert.

The preferred HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; account-level API key
account string required; the name of the third-party account

Account includes the following attributes: name, type, and settings.

Click Account Attributes for more details.

Account Attributes

ParameterTypeDescription
typestringrequired; the type of the third-party account

Click Settings to view the supported third-party applications.
namestringrequired; the name of the third-party account
settingsstringrequired; the configuration settings that will enable you to connect the third-party application with CloudCheckr

Click Settings to view the supported third-party applications.

Settings
Account TypeRequired ParametersOptional Parameters
ServiceNowInstance

ClientId

ClientSecret

Username

Password

AssignmentGroup
SlackWebhooknot applicable
PagerDutyServiceKeynot applicable
snsTargetArnnot applicable
SyslogHostName

Port

SendRawData




API CALL URL:

	
          https://api.cloudcheckr.com/api/account.[json|xml]/add_third_party_account?access_key=your_account_access_key

REQUEST EXAMPLE:

curl -X POST \
-- https://api.cloudcheckr.com/api/account.[json|xml]/add_third_party_account?access_key=your_account_access_key\
-- header 'cache-control: no-cache' \
-- header 'content-type: application/[json|xml]' \
-- data '{
"account":
{
"type": "Slack",
"name": "new account",
"settings": {
"Webhook": "https://hooks.slack.com/services/Y14WYJ858/DJMML874S/wzf4jfrHySUq93pFMpMDpmpi"
}
}
}

RESPONSE EXAMPLES:

Result 200 OK:

{
"UpdateStatuses": [
"Slack account for Account Id: 2 named: \"new account\" was created successfully."
]
}

If the name is not unique:

{
"UpdateStatuses": [
"Slack account for Account Id: 2 named: \"new account\": failed to be created. Please check your inputs."
]
}

Result 400 Bad Request:

{
"Message": "The request is invalid.",
"ModelState": {
"ErrorCode": [
"BadRequest"
],
"ErrorIdentity": [
"6366587284835855842b2b1d2f-4743-4e94-b819-abbafc212525"
],
"ErrorMessage": [
"Type not supported"
]
}
}

Add Third Party Accounts

The API method, “add_third_party_accounts”, is used to configure a connection between CloudCheckr and multiple external service providers, so you can receive notifications daily or any time there is a change to a Best Practice Check or alert.

The preferred HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; account-level API key
account string required; the name of the third-party account

Account includes the following attributes: name, type, and settings.

Click Account Attributes for more details.

Account Attributes

ParameterTypeDescription
typestringrequired; the type of the third-party account

Click Settings to view the supported third-party applications .
namestringrequired; the name of the third-party account
settingsstringrequired; the configuration settings that will enable you to connect the third-party application with CloudCheckr

Click Settings to view the supported third-party applications

Settings

Account TypeRequired Parameters Optional Parameters
ServiceNowInstance

ClientId

ClientSecret

Username

Password

AssignmentGroup
SlackWebhooknot applicable
PagerDutyServiceKeynot applicable
snsTargetArnnot applicable
SyslogHostName

Port

SendRawData


API CALL URL:

https://api.cloudcheckr.com/api/account.[json|xml]/add_third_party_accounts?access_key=your_account_access_key


REQUEST EXAMPLE:

curl -X POST \
-- https://api.cloudcheckr.com/api/account.[json|xml]/add_third_party_accounts?access_key=your_account_access_key\
-- header 'cache-control: no-cache' \
-- header 'content-type: application/[json|xml]' \
-- data '{
"account": [
{
"type": "Slack",
"name": "new account",
"settings": {
"Webhook": "https://hooks.slack.com/services/Y14WYJ858/DJMML874S/wzf4jfrHySUq93pFMpMDpmpi"
}
},
{
"type": "Slack",
"name": "new account 2",
"settings": {
"Webhook": "https://hooks.slack.com/services/Z25WYJ858/DJMML874S/wzf4jfrHySUq93pFMpMDstts"
}
}
}

RESPONSE EXAMPLES:

Result 200 OK:

{
"UpdateStatuses": [
"Slack account for Account Id: 2 named: \"new account\" was created successfully.",
"Slack account for Account Id: 2 named: \"new account 2\" was created successfully."
]
}

If the name is not unique:

{
"UpdateStatuses": [
"Slack account for Account Id: 2 named: \"new account\" failed to be created. Please check your inputs.",
"Slack account for Account Id: 2 named: \"new account 2\" failed to be created. Please check your inputs."
]
}

Result 400 Bad Request:

{
"Message": "The request is invalid.",
"ModelState": {
"ErrorCode": [
"BadRequest"
],
"ErrorIdentity": [
"6366587284835855842b2b1d2f-4743-4e94-b819-abbafc212525"
],
"ErrorMessage": [
"Type not supported"
]
}
}

Delete Third Party Account

The API method, “delete_third_party_account”, is used to delete a connection between CloudCheckr and an external service provider.

The preferred HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; account-level API key
id string required; the database id of the account that can be found in the return results for “get_third_party_account” calls

API CALL URL:

https://api.cloudcheckr.com/api/account.[json|xml]/delete_third_party_account?access_key=your_account_access_key


REQUEST EXAMPLE:

curl -X POST \
-- https://api.cloudcheckr.com/api/account.[json|xml]/delete_third_party_account?access_key=your_account_access_key\
-- header 'cache-control: no-cache' \
-- header 'content-type: application/[json|xml]' \
-- data '{
"account":
{
"id": 2054
}

RESPONSE EXAMPLES:

Result 200 OK:

{
"UpdateStatuses": [
"Slack account for Account Id: 2 named: \"new account\" was deleted successfully."
]
}

Or:

{
"UpdateStatuses": [
"Id: 2054 could not be found, and therefore was not deleted."
]
}

Delete Third Party Accounts

The API method, “delete_third_party_accounts”, is used to delete a connection between CloudCheckr and multiple external service providers.

The preferred HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; account-level API key
id string required; the database id of the account that can be found in the return results for “get_third_party_account” calls

API CALL URL:

https://api.cloudcheckr.com/api/account.[json|xml]/delete_third_party_accounts?access_key=your_account_access_key


REQUEST EXAMPLE:

curl -X POST \
-- https://api.cloudcheckr.com/api/account.[json|xml]/delete_third_party_accounts?access_key=your_account_access_key\
-- header 'cache-control: no-cache' \
-- header 'content-type: application/[json|xml]' \
-- data '{
"account":
{
"id": [
2054,
2053
]
}

RESPONSE EXAMPLES:

Result 200 OK:

{
"UpdateStatuses": [
"Slack account for Account Id: 2 named: \"new account\" was deleted successfully.",
"Slack account for Account Id: 2 named: \"new account 2\" was deleted successfully."
]
}

Or:

{
             "UpdateStatuses": [
"Id: 2054 could not be found, and therefore was not deleted.",
"Id: 2053 could not be found, and therefore was not deleted."
]
}

Edit Third Party Account

The API method, “edit_third_party_account”, is used to modify a connection between CloudCheckr and an external service provider.

The preferred HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; account-level API key
account string required; the name of the third-party account

Account includes the following attributes: name, type, and settings.

Click Account Attributes for more details.

Account Attributes

ParameterTypeDescription
typestringrequired; the type of the third-party account

Note: Click Settings to view the supported third-party applications

namestringrequired; the name of the third-party account
settingsstringrequired; the configuration settings that will enable you to connect the third-party application with CloudCheckr

Note: Click Settings to view the supported third-party applications


Settings

Account TypeRequired ParametersOptional Parameters
ServiceNowInstance

ClientId

ClientSecret

Username

Password

AssignmentGroup
SlackWebhooknot applicable
PagerDutyServiceKeynot applicable
snsTargetArnnot applicable
SyslogHostName

Port

SendRawData



API CALL URL:

https://api.cloudcheckr.com/api/account.[json|xml]/edit_third_party_account?access_key=your_account_access_key

REQUEST EXAMPLE:

curl -X POST \
-- https://api.cloudcheckr.com/api/account.[json|xml]/add_third_party_account?access_key=your_account_access_key\
-- header 'cache-control: no-cache' \
-- header 'content-type: application/[json|xml]' \
-- data '{
"account":
{
"id": 38,
"type": "Slack",
"name": "new account",
"settings": {
"Webhook": "https://hooks.slack.com/services/Y14WYJ858/DJMML874S/wzf4jfrHySUq93pFMpMDpmpi"
}
}
}

RESPONSE EXAMPLES:

Result 200 OK:


{
"UpdateStatuses": [
"Slack account for Account Id: 2 named: \"new account\" was created successfully."
]
}

If the name is not unique or the ID is incorrect:

{
"UpdateStatuses": [
""Slack account for Account Id: 2 named: \"new account\" failed to be created. Please check your inputs."
]
}

Result 400 Bad Request:

{
"Message": "The request is invalid.",
"ModelState": {
"ErrorCode": [
"BadRequest"
],
"ErrorIdentity": [
"63665815800523277060f1e76c-6919-4000-865b-21454ff70e05"
],
"ErrorMessage": [
"Type not supported"
]
}
}

Edit Third Party Accounts

The API method, “edit_third_party_accounts”, is used to modify a connection between CloudCheckr and multiple external service providers.

The preferred HTTP method for this call is POST.

INPUT PARAMETERS:

ParameterTypeDescription
access_keystringrequired; account-level API key
accountstringrequired; the name of the third-party account

Account includes the following attributes: name, type, and settings.

Click Account Attributes for more details.

Account Attributes

ParameterTypeDescription
typestringrequired; the type of the third-party account

Note: Click Settings to view the supported third-party applications

namestringrequired; the name of the third-party account
settingsstringrequired; the configuration settings that will enable you to connect the third-party application with CloudCheckr

Note: Click Settings to view the supported third-party applications


Settings

Account TypeRequired ParametersOptional Parameters
ServiceNowInstance

ClientId

ClientSecret

Username

Password

AssignmentGroup
SlackWebhooknot applicable
PagerDutyServiceKeynot applicable
snsTargetArnnot applicable
SyslogHostName

Port

SendRawData



API CALL URL:

https://api.cloudcheckr.com/api/account.[json|xml]/edit_third_party_accounts?access_key=your_account_access_key

REQUEST EXAMPLE:

curl -X POST \
-- https://api.cloudcheckr.com/api/account.[json|xml]/edit_third_party_accounts?access_key=your_account_access_key\
-- header 'cache-control: no-cache' \
-- header 'content-type: application/[json|xml]' \
-- data '{
"account":
{
"id": 38,
"type": "Slack",
"name": "new account",
"settings": {
"Webhook": "https://hooks.slack.com/services/Y14WYJ858/DJMML874S/wzf4jfrHySUq93pFMpMDpmpi"
}
},
{
"id": 40,
"type": "Slack",
"name": "new account 2",
"settings": {
"Webhook": "https://hooks.slack.com/services/Z25WYJ858/DJMML874S/wzf4jfrHySUq93pFMpMDsst"
}
}
}

RESPONSE EXAMPLES:

Result 200 OK:

  {
"UpdateStatuses": [
"Slack account for Account Id: 2 named: \"new account\" was created successfully.",
"Slack account for Account Id: 2 named: \"new account 2\" was created successfully."
]
}

If the name is not unique or the ID is incorrect:

  {
"UpdateStatuses": [
"Slack account for Account Id: 2 named: \"new account\" failed to update. Please check your inputs.",
"Slack account for Account Id: 2 named: \"new account 2\" failed to update. Please check your inputs."
]
}

Result 400 Bad Request:

  {
"Message": "The request is invalid.",
"ModelState": {
"ErrorCode": [
"BadRequest"
],
"ErrorIdentity": [
"63665815800523277060f1e76c-6919-4000-865b-21454ff70e05"
],
"ErrorMessage": [
"Type not supported"
]
}
}

Get Third Party Account

The API method, “get_third_party_account”, is used to return a specific third-party account that identifies a connection between CloudCheckr and an external service provider.

The preferred HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; account-level access key
type string required; the name of the external service provider integrated with CloudCheckr that you want included in your request
CloudCheckr supports integrations with the following external service providers:
  • ServiceNow
  • Slack
  • PagerDuty
  • Amazon SNS
  • Syslog
  • Jira
name string required; the name of the third-party account created as part of the CloudCheckr integration that you want included in your request

ENDPOINT URL:

https://api.cloudcheckr.com/api/account.[json|xml]/get_third_party_account?access_key=your_account_access_key

REQUEST EXAMPLE:

curl -- request POST \
-- 'https://api.cloudcheckr.com/api/account.json/get_third_party_account' \
-- header 'cache-control: no-cache' \
-- header 'content-type: application/json' \
-- data '{
"type": "Slack",
"name":"name_of_slack_account_in_cloudcheckr"
}'

RESPONSE EXAMPLE:

{
"accounts": [
{
"id": 4,
"type": "Slack",
"name": "account1",
"settings": {
"Webhook": "https://hooks.slack.com/services/T0zzzzzzzz/Bzzzzzzzz/rzzzzzzzzzzzzzzzzzzzzzzzz"
}
}
]
}

Result 400 Bad Request:

{
"Message": "The request is invalid.",
"ModelState": {
"ErrorCode": [
"BadRequest"
],
"ErrorIdentity": [
"63665815800523277060f1e76c-6919-4000-865b-21454ff70e05"
],
"ErrorMessage": [
"Type not supported"
]
}
}

Get Third Party Accounts

The API method, “get_third_party_accounts”, is used to return a list of multiple third-party accounts that identify a connection between CloudCheckr and an external service provider.

The preferred HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; account-level access key
type string *required or optional; the name of the external service provider integrated with CloudCheckr that you want included in your request
CloudCheckr supports integrations with the following external service providers:
  • ServiceNow
  • Slack
  • PagerDuty
  • Amazon SNS
  • Syslog
  • Jira
name string *required or optional; the name of the third-party account created as part of the CloudCheckr integration that you want included in your request
*You are required to include the type or name parameter in your call.

ENDPOINT URL:

https://api.cloudcheckr.com/api/account.[json|xml]/get_third_party_accounts?access_key=your_account_access_key

REQUEST EXAMPLE:

curl -- request POST \
-- 'https://api.cloudcheckr.com/api/account.json/get_third_party_accounts' \
-- header 'cache-control: no-cache' \
-- header 'content-type: application/json' \
-- data '{
"type": "Slack",
"name":"name_of_slack_account_in_cloudcheckr"
}'

RESPONSE EXAMPLE:

{
"accounts": [
{
"id": 4,
"type": "Slack",
"name": "account1",
"settings": {
"Webhook": "https://hooks.slack.com/services/T0zzzzzzzz/Bzzzzzzzz/rzzzzzzzzzzzzzzzzzzzzzzzz"
}
},
{
"id": 24,
"type": "Slack",
"name": "account2",
"settings": {
"Webhook": "https://hooks.slack.com/services/T0zzzzzzzz/Bzzzzzzzz/rzzzzzzzzzzzzzzzzzzzzzzzz"
}
},
{
"id": 26,
"type": "Slack",
"name": "account3",
"settings": {
"Webhook": null
}
}
]
}

Result 400 Bad Request:

{
"Message": "The request is invalid.",
"ModelState": {
"ErrorCode": [
"BadRequest"
],
"ErrorIdentity": [
"63665815800523277060f1e76c-6919-4000-865b-21454ff70e05"
],
"ErrorMessage": [
"Type not supported"
]
}
}

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:

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_to DateTime optional; identities the date that the customer wants to end the search for improperly tagged resources
date_from DateTime optional; identities the date that the customer wants to begin the search for improperly tagged resources
aws_account_id string required; the 12-digit AWS account ID (must be payer account)

Note: This parameter is only required 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 required; the ID of the Azure subscription

Note: This parameter is only required 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"
                  ]
                }
              ]
            }
          ]
          

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.
  • 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 Grouping 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.
  • emails (optional - comma seperated string) - Sends the results via email rather than api response.
  • high_precision_csv (optional) - Sends the results with cost data up to 10 decimals. Accepts true/false.
  • 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"
                  }
                ]
              }
            ]
          }


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

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

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

This API endpoint only responds to POST requests.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; account-level API key. must be specified in header
aws_account_id string * required/optional; 12-digit AWS account ID to modify
account_family string * required/optional; 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:

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

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&																	[email protected]

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&																	[email protected]

INPUT PARAMETERS

This call accepts these parameters:

  • use_aws_account_id (*optional/required) – the 12-digit AWS account ID of the CloudCheckr account you are making the call for.
  • use_account (*optional/required) – the name of the CloudCheckr account you are making the call for.
  • use_cc_account_id (*optional/required) – the CloudCheckr ID of the account you are making the call for.
  • 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 Payer 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"
}

Delete Cost Allocator

The API method, “delete_cost_allocator”, is used to delete Cost Allocator settings in CloudCheckr, so you can allocate usage costs and report on shared services more accurately.

CloudCheckr has rebranded its existing feature, Tag Mapping – Splitting, as Cost Allocator.

The preferred HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level or account-level access key
name_for_cost_allocator string required; the unique name of the tagging structure for your selected Cost Allocator configuration
use_aws_account_id string *optional/required; the 12-digit AWS account ID of the CloudCheckr account you are making the call for
use_account string *optional/required; the name of the CloudCheckr account you are making the call for
use_cc_account_id string *optional/required; the CloudCheckr ID of the account you are making the call for
*If you use an admin-level access key, you are required to add one of the following parameters to your request:
  • use_aws_account_id
  • use_account
  • use_cc_account_id

API CALL URL:

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

REQUEST EXAMPLE:

curl -- request POST \
-- 'https://api.cloudcheckr.com/api/billing.[json|xml]/delete_cost_allocator' \
-- header 'cache-control: no-cache' \
-- header 'access_key: [access key]' \
-- header 'content-type: application/[json|xml]' \
-- data '{
"use_cc_account_id": "3",
"name_for_cost_allocator" : "sampleName"
}'

RESPONSE EXAMPLES:

Result 200 OK (XML):

	<delete_cost_allocatorResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<status>
<Code>200</Code>
<Message>Success</Message>
</status>
</delete_cost_allocatorResponse>

Result 200 OK (JSON):

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


Edit Cost Allocator

The API method, “edit_cost_allocator”, is used to edit Cost Allocator settings in CloudCheckr, so you can allocate usage costs and report on shared services more accurately.

CloudCheckr has rebranded its existing feature, Tag Mapping – Splitting, as Cost Allocator.

The preferred HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level or account-level access key
name_for_cost_allocator string required; the unique name of the tagging structure for your selected Cost Allocator configuration
tag_conditions List <string>

required/optional; identifies the costs that match an attribute and a given value

EX: Your company uses an Environment tag key with a tag value of Development.

You must use the tag_conditions or property_conditions parameter when defining your tagging structure.
property_conditions List <string>

required/optional; identifies any additional characteristic that allows you to further limit what costs are included in your tagging structure

In AWS accounts, you can select one or more of the following properties:

  • Account
  • Availability Zone
  • Operation
  • Region
  • Resource
  • Service
  • Usage Type
You must use the tag_conditions or property_conditions parameter when defining your tagging structure.
all_conditions_met boolean required; indicates that the cost data must meet all the conditions before CloudCheckr will apply the divisions
divisions List <string>

required; indicates how you want CloudCheckr to allocate your costs, by percentage, across your tag mappings

CloudCheckr will only apply the divisions if your tagging structure meets the previous conditions.

Your cost allocations should add up to 100%.
use_aws_account_id string *optional/required; the 12-digit AWS account ID of the CloudCheckr account you are making the call for
use_account string *optional/required; the name of the CloudCheckr account you are making the call for
use_cc_account_id string *optional/required; the CloudCheckr ID of the account you are making the call for
*If you use an admin-level access key, you are required to add one of the following parameters to your request:
  • use_aws_account_id
  • use_account
  • use_cc_account_id

API CALL URL:

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

REQUEST EXAMPLE:

curl -- request POST \
-- 'https://api.cloudcheckr.com/api/billing.[json|xml]/edit_cost_allocator' \
-- header 'cache-control: no-cache' \
-- header 'access_key: [access key]' \
-- header 'content-type: application/[json|xml]' \
-- data '{
"use_cc_account_id": "3",
"name_for_cost_allocator" : "sampleName",
"property_conditions" : [{"key_to_map" : "Region", "value_to_map" : "ap_east_1"}],
"divisions" : [{"map_percent_of_cost_to_tag" : "50", "map_to_tag_key" : "TagKey2", "map_to_tag_value" : "TagValue2"},
{"map_percent_of_cost_to_tag" : "50", "map_to_tag_key" : "TagKey3", "map_to_tag_value" : "TagValue3"}],
"all_conditions_met" : "true"
}'

RESPONSE EXAMPLES:

Result 200 OK (XML):

	<edit_cost_allocatorResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<status>
<Code>200</Code>
<Message>Success</Message>
</status>
</edit_cost_allocatorResponse>

Result 200 OK (JSON):

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

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

Get Billing And Cost Management Dashboard

The API method “get_dashboard” is used to export the Billing and Cost Management 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 create the Single Month Billing Summary report.

The preferred HTTP method for this call is GET.

INPUT PARAMETERS:

Parameter

Type

Description

access_key

string

required; admin-level or an account-level access key

cost_type

string

optional; select the cost type you want to apply to your report
Cost types include Unblended, Blended, and List for AWS accounts.

include_services

string

optional; select if you want to filter the report by all services or one service

for_date

string

optional; select the month and year on which to base your report data

amortize_cost

boolean

optional; select if you want Cloudcheckr to distribute the upfront fee from your RI purchases throughout the month

use_aws_account_id string *optional/required; the 12-digit AWS account ID of the AWS account you are making the call for
use_account string *optional/required; the name of the CloudCheckr account you are making the call for
use_cc_account_id string *optional/required; the CloudCheckr ID of the account you are making the call for
*If you use an admin-level access key, you are required to add one of the following parameters to your request:
  • use_aws_account_id
  • use_account
  • use_cc_account_id

API CALL URL:

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

REQUEST EXAMPLE:

curl -- request GET \
-- 'https://api.cloudcheckr.com/api/billing.[json|xml]/get_monthly_bill?access_key=[access_key]&use_account=123'\
-- header 'cache-control: no-cache' \
-- header 'content-type: application/[json|xml]' \
<?xml version="1.0" encoding="UTF-8" ?>
<Summary>
<MonthlyToDateCost>($157,094.41)</MonthlyToDateCost>
<MonthlyToDateCredit>$0.00</MonthlyToDateCredit>
<MonthlyToDateBill>($157,094.41)</MonthlyToDateBill>
<AverageDailyNetBill>($5,279.34)</AverageDailyNetBill>
<HighestCost>
<ServiceName>Compute Savings Plans</ServiceName>
<Cost>$21,552.28</Cost>
</HighestCost>
<HighestDaily>
<Date>7/31/2020</Date>
<Bill>$1,285.81</Bill>
</HighestDaily>
<LowestDaily>
<Date>7/1/2020</Date>
<Bill>($174,358.04)</Bill>
</LowestDaily>
<HighestChange>
<StartDate>7/1/2020</StartDate>
<EndDate>7/2/2020</EndDate>
<ChangeAmount>$174,503.47</ChangeAmount>
<ChangePercent>-100.08%</ChangePercent>
</HighestChange>
</Summary>
<BillByDay>
<Day>7/1/2020</Day>
<Cost>($174,358.04)</Cost>
<Credits>$0.00</Credits>
<Bill>($174,358.04)</Bill>
</BillByDay>
<BillByDay>
<Day>7/2/2020</Day>
<Cost>$145.43</Cost>
<Credits>$0.00</Credits>
<Bill>$145.43</Bill>
</BillByDay>
<BillByDay>
<Day>7/3/2020</Day>
<Cost>$153.60</Cost>
<Credits>$0.00</Credits>
<Bill>$153.60</Bill>
</BillByDay>
<BillByDay>
<Day>7/4/2020</Day>
<Cost>$155.81</Cost>
<Credits>$0.00</Credits>
<Bill>$155.81</Bill>
</BillByDay>
<BillByDay>
<Day>7/5/2020</Day>
<Cost>$151.39</Cost>
<Credits>$0.00</Credits>
<Bill>$151.39</Bill>
</BillByDay>
<BillByDay>
<Day>7/6/2020</Day>
<Cost>$179.41</Cost>
<Credits>$0.00</Credits>
<Bill>$179.41</Bill>
</BillByDay>
<BillByDay>
<Day>7/7/2020</Day>
<Cost>$203.30</Cost>
<Credits>$0.00</Credits>
<Bill>$203.30</Bill>
</BillByDay>
<BillByDay>
<Day>7/8/2020</Day>
<Cost>$146.74</Cost>
<Credits>$0.00</Credits>
<Bill>$146.74</Bill>
</BillByDay>
<BillByDay>
<Day>7/9/2020</Day>
<Cost>$132.99</Cost>
<Credits>$0.00</Credits>
<Bill>$132.99</Bill>
</BillByDay>
<BillByDay>
<Day>7/10/2020</Day>
<Cost>$169.12</Cost>
<Credits>$0.00</Credits>
<Bill>$169.12</Bill>
</BillByDay>
<BillByDay>
<Day>7/11/2020</Day>
<Cost>$175.70</Cost>
<Credits>$0.00</Credits>
<Bill>$175.70</Bill>
</BillByDay>
<BillByDay>
<Day>7/12/2020</Day>
<Cost>$175.83</Cost>
<Credits>$0.00</Credits>
<Bill>$175.83</Bill>
</BillByDay>
<BillByDay>
<Day>7/13/2020</Day>
<Cost>$175.11</Cost>
<Credits>$0.00</Credits>
<Bill>$175.11</Bill>
</BillByDay>
<BillByDay>
<Day>7/14/2020</Day>
<Cost>$138.14</Cost>
<Credits>$0.00</Credits>
<Bill>$138.14</Bill>
</BillByDay>
<BillByDay>
<Day>7/15/2020</Day>
<Cost>$125.65</Cost>
<Credits>$0.00</Credits>
<Bill>$125.65</Bill>
</BillByDay>
<BillByDay>
<Day>7/16/2020</Day>
<Cost>($857.73)</Cost>
<Credits>$0.00</Credits>
<Bill>($857.73)</Bill>
</BillByDay>
<BillByDay>
<Day>7/17/2020</Day>
<Cost>$614.53</Cost>
<Credits>$0.00</Credits>
<Bill>$614.53</Bill>
</BillByDay>
<BillByDay>
<Day>7/18/2020</Day>
<Cost>$618.22</Cost>
<Credits>$0.00</Credits>
<Bill>$618.22</Bill>
</BillByDay>
<BillByDay>
<Day>7/19/2020</Day>
<Cost>$616.59</Cost>
<Credits>$0.00</Credits>
<Bill>$616.59</Bill>
</BillByDay>
<BillByDay>
<Day>7/20/2020</Day>
<Cost>$645.31</Cost>
<Credits>$0.00</Credits>
<Bill>$645.31</Bill>
</BillByDay>
<BillByDay>
<Day>7/21/2020</Day>
<Cost>$618.57</Cost>
<Credits>$0.00</Credits>
<Bill>$618.57</Bill>
</BillByDay>
<BillByDay>
<Day>7/22/2020</Day>
<Cost>$1,207.67</Cost>
<Credits>$0.00</Credits>
<Bill>$1,207.67</Bill>
</BillByDay>
<BillByDay>
<Day>7/23/2020</Day>
<Cost>$1,285.81</Cost>
<Credits>$0.00</Credits>
<Bill>$1,285.81</Bill>
</BillByDay>
<BillByDay>
<Day>7/24/2020</Day>
<Cost>$1,285.81</Cost>
<Credits>$0.00</Credits>
<Bill>$1,285.81</Bill>
</BillByDay>
<BillByDay>
<Day>7/25/2020</Day>
<Cost>$1,285.81</Cost>
<Credits>$0.00</Credits>
<Bill>$1,285.81</Bill>
</BillByDay>
<BillByDay>
<Day>7/26/2020</Day>
<Cost>$1,285.81</Cost>
<Credits>$0.00</Credits>
<Bill>$1,285.81</Bill>
</BillByDay>
<BillByDay>
<Day>7/27/2020</Day>
<Cost>$1,285.81</Cost>
<Credits>$0.00</Credits>
<Bill>$1,285.81</Bill>
</BillByDay>
<BillByDay>
<Day>7/28/2020</Day>
<Cost>$1,285.81</Cost>
<Credits>$0.00</Credits>
<Bill>$1,285.81</Bill>
</BillByDay>
<BillByDay>
<Day>7/29/2020</Day>
<Cost>$1,285.81</Cost>
<Credits>$0.00</Credits>
<Bill>$1,285.81</Bill>
</BillByDay>
<BillByDay>
<Day>7/30/2020</Day>
<Cost>$1,285.81</Cost>
<Credits>$0.00</Credits>
<Bill>$1,285.81</Bill>
</BillByDay>
<BillByDay>
<Day>7/31/2020</Day>
<Cost>$1,285.81</Cost>
<Credits>$0.00</Credits>
<Bill>$1,285.81</Bill>
</BillByDay>
<BillByAccount>
<Account>111222333444 (xyz-savingsplans)</Account>
<MonthlyToDateBill>$14,104.30</MonthlyToDateBill>
<MonthlyToDateCost>$14,104.30</MonthlyToDateCost>
<MonthlyToDateCredits>$0.00</MonthlyToDateCredits>
</BillByAccount>
<BillByAccount>
<Account>222333444555(CloudCheckr-Prod)</Account>
<MonthlyToDateBill>($171,198.70)</MonthlyToDateBill>
<MonthlyToDateCost>($171,198.70)</MonthlyToDateCost>
<MonthlyToDateCredits>$0.00</MonthlyToDateCredits>
</BillByAccount>
{
"Summary": {
"MonthlyToDateCost": "($157,094.41)",
"MonthlyToDateCredit": "$0.00",
"MonthlyToDateBill": "($157,094.41)",
"AverageDailyNetBill": "($5,279.34)",
"HighestCost": {
"ServiceName": "Compute Savings Plans",
"Cost": "$21,552.28"
},
"HighestDaily": {
"Date": "7/31/2020",
"Bill": "$1,285.81"
},
"LowestDaily": {
"Date": "7/1/2020",
"Bill": "($174,358.04)"
},
"HighestChange": {
"StartDate": "7/1/2020",
"EndDate": "7/2/2020",
"ChangeAmount": "$174,503.47",
"ChangePercent": "-100.08%"
}
},
"BillByDay": [
{
"Day": "7/1/2020",
"Cost": "($174,358.04)",
"Credits": "$0.00",
"Bill": "($174,358.04)"
},
{
"Day": "7/2/2020",
"Cost": "$145.43",
"Credits": "$0.00",
"Bill": "$145.43"
},
{
"Day": "7/3/2020",
"Cost": "$153.60",
"Credits": "$0.00",
"Bill": "$153.60"
},
{
"Day": "7/4/2020",
"Cost": "$155.81",
"Credits": "$0.00",
"Bill": "$155.81"
},
{
"Day": "7/5/2020",
"Cost": "$151.39",
"Credits": "$0.00",
"Bill": "$151.39"
},
{
"Day": "7/6/2020",
"Cost": "$179.41",
"Credits": "$0.00",
"Bill": "$179.41"
},
{
"Day": "7/7/2020",
"Cost": "$203.30",
"Credits": "$0.00",
"Bill": "$203.30"
},
{
"Day": "7/8/2020",
"Cost": "$146.74",
"Credits": "$0.00",
"Bill": "$146.74"
},
{
"Day": "7/9/2020",
"Cost": "$132.99",
"Credits": "$0.00",
"Bill": "$132.99"
},
{
"Day": "7/10/2020",
"Cost": "$169.12",
"Credits": "$0.00",
"Bill": "$169.12"
},
{
"Day": "7/11/2020",
"Cost": "$175.70",
"Credits": "$0.00",
"Bill": "$175.70"
},
{
"Day": "7/12/2020",
"Cost": "$175.83",
"Credits": "$0.00",
"Bill": "$175.83"
},
{
"Day": "7/13/2020",
"Cost": "$175.11",
"Credits": "$0.00",
"Bill": "$175.11"
},
{
"Day": "7/14/2020",
"Cost": "$138.14",
"Credits": "$0.00",
"Bill": "$138.14"
},
{
"Day": "7/15/2020",
"Cost": "$125.65",
"Credits": "$0.00",
"Bill": "$125.65"
},
{
"Day": "7/16/2020",
"Cost": "($857.73)",
"Credits": "$0.00",
"Bill": "($857.73)"
},
{
"Day": "7/17/2020",
"Cost": "$614.53",
"Credits": "$0.00",
"Bill": "$614.53"
},
{
"Day": "7/18/2020",
"Cost": "$618.22",
"Credits": "$0.00",
"Bill": "$618.22"
},
{
"Day": "7/19/2020",
"Cost": "$616.59",
"Credits": "$0.00",
"Bill": "$616.59"
},
{
"Day": "7/20/2020",
"Cost": "$645.31",
"Credits": "$0.00",
"Bill": "$645.31"
},
{
"Day": "7/21/2020",
"Cost": "$618.57",
"Credits": "$0.00",
"Bill": "$618.57"
},
{
"Day": "7/22/2020",
"Cost": "$1,207.67",
"Credits": "$0.00",
"Bill": "$1,207.67"
},
{
"Day": "7/23/2020",
"Cost": "$1,285.81",
"Credits": "$0.00",
"Bill": "$1,285.81"
},
{
"Day": "7/24/2020",
"Cost": "$1,285.81",
"Credits": "$0.00",
"Bill": "$1,285.81"
},
{
"Day": "7/25/2020",
"Cost": "$1,285.81",
"Credits": "$0.00",
"Bill": "$1,285.81"
},
{
"Day": "7/26/2020",
"Cost": "$1,285.81",
"Credits": "$0.00",
"Bill": "$1,285.81"
},
{
"Day": "7/27/2020",
"Cost": "$1,285.81",
"Credits": "$0.00",
"Bill": "$1,285.81"
},
{
"Day": "7/28/2020",
"Cost": "$1,285.81",
"Credits": "$0.00",
"Bill": "$1,285.81"
},
{
"Day": "7/29/2020",
"Cost": "$1,285.81",
"Credits": "$0.00",
"Bill": "$1,285.81"
},
{
"Day": "7/30/2020",
"Cost": "$1,285.81",
"Credits": "$0.00",
"Bill": "$1,285.81"
},
{
"Day": "7/31/2020",
"Cost": "$1,285.81",
"Credits": "$0.00",
"Bill": "$1,285.81"
}
],
"BillByAccount": [
{
"Account": "111222333444 (xyz-savingsplans)",
"MonthlyToDateBill": "$14,104.30",
"MonthlyToDateCost": "$14,104.30",
"MonthlyToDateCredits": "$0.00"
},
{
"Account": "222333444555(CloudCheckr-Prod)",
"MonthlyToDateBill": "($171,198.70)",
"MonthlyToDateCost": "($171,198.70)",
"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)

See Output
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


Create Detailed Billing Grouped Filter V2

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

This API call supports AWS and Azure environments.

AWS

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

INPUT PARAMETERS:

ParameterTypeDescription
access_keystringrequired; account-level API key
filter_namestringrequired; name of the filter
email_on_buildbooleanoptional; indicates if saved email will be sent to customer; defaults to “false”
emailslistoptional; comma-separated list of valid email addresses where the saved filter report will be sent to upon completion
group_bylist<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 list<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
account_type string optional; identifies if the cost data is filtered by account or account family
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
filters list<GroupedFilter>** optional; Indicates how to filter the cost data, using the GroupedFilter object datatype

* = one of these parameters must be defined


** How To Use the "GroupedFilter" object datatype
Parameter Type Description
filter_type string required; Indicates the type to filter. Possible values: AWS: Account, Family, Region, Service, Operation, UsageType, BillingCustomer Azure: Subscription, ChargeModel, CostSource, CostCenter, ResourceGroup, ResourceLocation, ConsumedService, MeterCategory, Department, MeterSubCategory, MeterRegion, MeterName
values list <string> required; comma-separated list of values that the customer can use to filter the cost data
invert boolean required; Applies the NOT logical operator in the previous parameter; defaults to “false”

ENDPOINT URL:

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

JSON/XML CALL EXAMPLE:

curl-- request POST \
'https://api.cloudcheckr.com/api/billing.[json|xml]/create_detailed_billing_grouped_filter_v2?access_key=[access_key]&use_account=[account ID]' \
{
"filter_name":"api_99",
"email_on_build":"true",
"emails":[
"[email protected]",
"[email protected]"
],
"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"
,
"filters": [
{ "filter_type": "Account",
"values": ["AWS account ID"],
"invert": "true"
},
{ "filter_type": "Family",
"values": ["Account Family Name"],
"invert": "true"
},
{ "filter_type": "Region",
"values": ["ap-northeast-1"],
"invert": "true"
},
{ "filter_type": "Service",
"values": [
"AmazonSimpleDB",
"AmazonEC2",
"AmazonSQS"
],
"invert": "true"
},
{ "filter_type": "Operation",
"values": [
"SetQueueAttributes",
"RunInstances:0002:SV012",
"PutObject"
],
"invert": "true"
},
{ "filter_type": "UsageType",
"values": [
"CAN1-EUC1-AWS-Out-Bytes",
"HeavyUsage:m4.large",
"UGW1-TimedStorage-RRS-ByteHrs"
],
"invert": "true"
}]

SUCCESSFUL JSON/XML RESPONSE:

{
"Code": 200,
"Message":"Successfully saved search. An email will be sent to the following addresses upon building completion:
[email protected],
[email protected]"
}


Azure


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

INPUT PARAMETERS:

ParameterTypeDescription
access_keystringrequired; account-level API key
filter_namestringrequired; name of the filter
email_on_buildbooleanoptional; indicates if saved email will be sent to customer; defaults to “false”
emailslist<string>optional; comma-separated list of valid email addresses where the saved filter report will be sent to upon completion
group_bylist<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
filter_type (CSP) list<string> optional; types of filters available to CSPs
filter_type (Enterprise Agreement) list<string> optional; types of filters available to Enterprise Agreements
filter_type (Subscription with resources) list<string> optional; types of filters available to subscriptions with resources
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”.)

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

* = 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 '{
"filter_name": "MyFilter1",
"filter_tag_type": "RequireAll",
"filters": [
{
"filter_type": "Department",
"values": [
"Unassigned"
]
},
{
"filter_type": "ChargeModel",
"values": [
"On-Demand",
"Reservation (OS License)"
]
},
{
"filter_type": "ResourceGroup",
"values": [
"my-resources"
]
},
{
"filter_type": "ConsumedService",
"values": [
"Classic Storage",
"Compute",
"Azure Active Directory"
]
},
{
"filter_type": "MeterCategory",
"values": [
"Insight and Analytics"
]
},
{
"filter_type": "MeterSubCategory",
"values": [
"Geo Redundant"
]
},
{
"filter_type": "MeterRegion",
"values": [
"Iowa"
]
},
{
"filter_type": "MeterName",
"values": [
"Base Unit"
]
},
{
"filter_type": "ResourceLocation",
"values": [
"EastUS"
]
}
],
"include_untagged": true,
"include_usage_quantity": true,
"group_by": [
"Account",
"ConsumedService"
],
"aggregate" : "month",
"cost_type": "List",
"email_on_build": true,
"emails": [
"[email protected]"
],
"tags": [
"Tag Key : Tag Value",
"Department : Support"
]
}

SUCCESSFUL JSON/XML RESPONSE:

	{
"Code": 200,
"Message":"Successfully saved search. An email will be sent to the following addresses upon build completion: [email protected]"
}

Create Group

The API method, “create_group”, is used to create a group.

The preferred HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level or an account-level access key
name string required; name of the group you want to create

use_aws_account_id

string

*optional/required; the 12-digit AWS account ID

use_account

string

*optional/required; the name of the CloudCheckr account you are making the call for

use_cc_account_id

string

*optional/required; the CloudCheckr ID of the account you are making the call for

*If you use an admin-level access key, you are required to add one of the following parameters to your request:
  • use_aws_account_id
  • use_account
  • use_cc_account_id

ENDPOINT URL:

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

JSON/XML CALL EXAMPLE:

curl --request POST \
-- 'https://api.cloudcheckr.com/api/account.[json|xml]/create_group?access_key=your_admin_access_key&use_cc_account_id=1234'\
-- header 'cache-control: no-cache' \
-- header 'content-type: application/[json|xml]' \
-- data '{
"(required)access_key": "someValHere",
"(required)name": "someValHere",
}

SUCCESSFUL JSON/XML RESPONSE:

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

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”
high_precision_csv boolean optional; adds high-precision to the CSV data up to 10 decimals; 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": ["[email protected]"],
"email_weekly_list" : ["[email protected]"],
"email_monthly_list":[ "[email protected]"],
"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": [" [email protected]"],
"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 the CloudCheckr Cost tagging rules that you created to monitor resources that don’t meet your deployment’s tagging strategy.

The preferred HTTP method for this call is GET.

INPUT PARAMETERS:

Parameter

Type

Description

access_key

string

required; admin-level or an account-level access key

use_aws_account_id

string

*optional/required; the 12-digit AWS account ID for the CloudCheckr account you are making the call for

use_account

string

*optional/required; the name of the CloudCheckr account you are making the call for

use_cc_account_id

string

*optional/required; the CloudCheckr ID of the account you are making the call for

*If you use an admin-level access key, you are required to add one of the following parameters to your request:
  • use_aws_account_id
  • use_account
  • use_cc_account_id

API CALL URL:

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

REQUEST EXAMPLE:

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

RESPONSE EXAMPLE:

XML:

<?xml version="1.0" encoding="UTF-8" ?>
<tag_rules>
<tag_rule_id>51</tag_rule_id>
<name>Have_Environment</name>
</tag_rules>
<tag_rules>
<tag_rule_id>48</tag_rule_id>
<name>New Rule</name>
</tag_rules>
<tag_rules>
<tag_rule_id>56</tag_rule_id>
<name>Test Rule</name>
</tag_rules>
<tag_rules>
<tag_rule_id>37</tag_rule_id>
<name>WildCardTest</name>
</tag_rules>

JSON:

{
"tag_rules": [
{ "tag_rule_id": 51,
"name": "Have_Environment"
},
{
"tag_rule_id": 48,
"name": "New Rule"
},
{
"tag_rule_id": 56,
"name": "Test Rule"
},
{
"tag_rule_id": 37,
"name": "WildCardTest"
}
]
}

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 an AWS account, choose Cost > Tags (from Detailed Billing) > Tagging Rules.

Once in the Tagging Rules report, click New Rule.

Note: For information on the Azure API call, review the Azure API Reference Guide.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; standard access key
name string required; name of the tag rule
tags string required; tag_key and tag_value
regions list<string> required; list of region(s) where the tag rule will be applied
awsresourcetypes list<string> required; the AWS resources
awsaccounts list<string> required; the 12-digit AWS account ID

API CALL URL:

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

REQUEST EXAMPLE:

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

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.

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; select one of the following report formats: description, operation, or usagetypeanddescription
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": "[email protected]",
"subject": "Azure Invoice Generator via API"
}

RESPONSE EXAMPLES:

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

Get All Tag Mappings

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

The preferred HTTP method for this call is GET.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; standard access key
max_results int required
next_token string optional

API CALL URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/get_all_tag_mappings?access_key=your_access_key&max_results=100

Get Tag Mapping

The API method, “get_tag_mapping”, is used to retrieve a cost tag mapping with a specified Key and Value.

The preferred HTTP method for this call is GET.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; standard access key
key_to_map string required
value_to_map string required

API CALL URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/get_tag_mapping?access_key=your_access_key&key_to_map=Tagkey1&value_to_map=Tagvalue1

Delete Tag Mapping

The API method, “delete_tag_mapping”, is used to retrieve a cost tag mapping with a specified Key and Value.

The preferred HTTP method for this call is GET.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; standard access key
map_to_tag_key string required
map_to_tag_value string required

API CALL URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/delete_tag_mapping?access_key=your_access_key&map_to_tag_key=Tagkey1&map_to_tag_value=Tagvalue1

Add Cost Alert Percent

The API method, “add_cost_alert_percent”, is used to create the cost alert, AWS Costs (percent), which will notify customers when their average costs spike above a designated amount in comparison with the average costs of a previous billing period.

The preferred HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; account-level access key
alert_name string required; unique name of your cost alert
send_frequency_days integer required; how often you want CloudCheckr to send you cost alerts in terms of number of days
thresholds List <threshold> required; a list of properties that will trigger a cost alert

A threshold will contain one or more of the following properties:

  • threshold_days
  • threshold_dollar_spike
  • threshold_percent_spike
  • threshold_minimum_cost_change
  • spike_days
  • use_dollar_spike
  • use_percent_spike

The next few rows in this table define each property.

threshold_days integer required; the number of days before CloudCheckr will alert you to cost spikes
spike_days integer required; the number of days in a previous time period that you want to use as your comparison for the current spike
use_dollar_spike boolean required/optional; indicates that you want a dollar amount to trigger the cost spike
This parameter is only required if you want to use a dollar amount for your cost spike.
use_percent_spike boolean required/optional; indicates that you want a percentage to trigger the cost spike
This parameter is only required if you want to use a percentage for your cost spike.
threshold_dollar_spike integer required/optional; the daily dollar amount that will trigger a cost spike
This parameter is only required if you selected the use_dollar_spike parameter.
threshold_percent_spike integer required/optional; the percentage that will trigger a cost spike
This parameter is only required if you selected the use_percent_spike parameter.
threshold_minimum_cost_change string optional; the smallest monetary value that will trigger an alert when the software compares the change in cost between two billing periods
This parameter is only enabled if you selected the use_percent_spike parameter.
monitoring_type string required; identifies if you want to monitor costs by account, service, or a specific tag
selected_tag_key string optional; the name of the tag that you want to use to monitor your costs
emails string optional; the emails addresses of the users who you want to receive the alert

API CALL URL:

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

REQUEST EXAMPLE:

curl -- request 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":"Production Cost Alert",
"send_frequency_days":"1",
"thresholds":[
{
"threshold_days":1,
"threshold_minimum_cost_change":3.2,
"spike_days":2,
"use_minimum_cost_change":true
}
],
"monitoring_type":"Accounts",
"selected_tag_key":"production"
}

RESPONSE EXAMPLEs:

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 Alerts Percent

The API method, “get_cost_alerts_percent”, is used to get the cost alert, AWS Costs (percent), which notifies customers about any cost fluctuations in their account or project.

The preferred HTTP method for this call is GET.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level or account-level access key

API CALL URL:

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

REQUEST EXAMPLE:

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

RESPONSE EXAMPLE:

XML:

<?xml version="1.0" encoding="UTF-8" ?>
<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>

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

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
use_cc_account_id string required; account ID of the account in CloudCheckr

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

Update Tag Rule

The API method, “update_tag_rule”, is used to modify an existing cost tag rule.

The preferred HTTP method for this call is POST.

To update a tag rule in an AWS account, choose Cost > Tags (from Detailed Billing) > Tagging Rules.

Once in the Tagging Rules report, click the tag rule that you want to modify.

Note: For information on the Azure API call, review the Azure API Reference Guide.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; standard access key
tag_rule_id string required; ID of the rule you want to modify
name string required; name of the tag rule
tags list<string> required; tag_key and tag_value
regions list<string> required; list of region(s) where the tag rule will be applied
awsresourcetypes list<string> required; the AWS resources
awsaccounts list<string> required; the 12-digit AWS account ID

API CALL URL:

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

REQUEST EXAMPLE:

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 '{
                                   "tag_rule_id": "94",
                                   "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"
          }
          

RESPONSE EXAMPLE:
XML:

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

JSON:

{
              "code": 200,
              "message": "Rule updated.",
              "tag_rule_id": "94"
          }

Get AWS Billing Configuration

The API method, “get_aws_billing_configuration”, is used to return the billing configuration for a selected AWS project.

The preferred HTTP method for this call is GET.

INPUT PARAMETERS:

Parameter

Type

Description

access_key

string

required; account-level access key

API CALL URL:

https://api.cloudcheckr.com/api/account.[json|xml]/get_aws_billing_configuration?access_key=your_access_key

REQUEST EXAMPLE:

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

RESPONSE EXAMPLE:

XML:

<?xml version="1.0" encoding="UTF-8" ?>
<accounts_list>103200001111</accounts_list>
<accounts_list>183555502222</accounts_list>
<accounts_list>215222253333</accounts_list>
<accounts_list>211111055555</accounts_list>
<accounts_list>245999996666</accounts_list>
<accounts_list>260777789090</accounts_list>
<accounts_list>318100518787</accounts_list>
<accounts_list>333353456565</accounts_list>
<accounts_list>499994633333</accounts_list>
<accounts_list>557888822222</accounts_list>
<accounts_list>614000091212</accounts_list>
<accounts_list>625072000000</accounts_list>
<generate_accounts_of_payees>false</generate_accounts_of_payees>
<hide_credits_from_payees>false</hide_credits_from_payees>
<dbr_bucket_name>somelogfiles</dbr_bucket_name>
<dbr_region_name />
<cur_enabled>true</cur_enabled>
<cur_start_date>2018-06-27T00:00:00</cur_start_date>
<cur_bucket_name>cc-state</cur_bucket_name>
<cur_region_name>us-east-1</cur_region_name>
<cur_folder_prefix>SomeName</cur_folder_prefix>
<cur_report_name>aName</cur_report_name>

JSON:

{
"accounts_list": [
"103200001111",
"183555502222",
"215222253333",
"211111055555",
"245999996666",
"260777789090",
"318100518787",
"333353456565",
"499994633333",
"557888822222",
"614000091212",
"625072000000"
],
"generate_accounts_of_payees": false,
"hide_credits_from_payees": false,
"dbr_bucket_name": "somelogfiles",
"dbr_region_name": null,
"cur_enabled": true,
"cur_start_date": "2018-06-27T00:00:00",
"cur_bucket_name": "cc-state",
"cur_region_name": "us-east-1",
"cur_folder_prefix": "SomeName",
"cur_report_name": "aName"
}

Edit AWS Billing Configuration

The API method, “edit_aws_billing_configuration”, is used to edit the existing billing configuration for a selected AWS project.

The preferred HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter

Type

Description

access_key

string

required; account-level API key

accounts_list

string

optional; select the AWS accounts that you do not want to include in the billing report

generate_accounts_of_payees

boolean

optional; select if you want CloudCheckr to automatically register any new payee accounts discovered during billing

hide_credits_from_payees

boolean

optional; select if you want CloudCheckr to hide any new payee accounts discovered during billing

dbr_bucket_name

string

required/optional: if DBR is billing source, this is required, but if CUR is billing source, this is optional

name of S3 bucket where AWS writes and stores the DBR data

dbr_region_name

string

required/optional: if DBR is billing source, this is required, but if CUR is billing source, this is optional

name of region where the S3 bucket that contains the DBR data is located

cur_enabled

boolean

required; If CUR is billing source.

Select if you want to use the CUR as your billing source

cur_start_date

DateTime

required; (YYYY-MM-DD)

Identifies the date you want CloudCheckr to start collecting CUR data.

cur_bucket_name

string

required:

name of S3 bucket where AWS writes and stores the CUR data

cur_region_name

string

required:

name of region where the S3 bucket that contains the CUR data is located

cur_folder_prefix

string

required:

folder prefix used by the CUR bucket.

cur_report_name

string

required:

the report name associated with your CUR report

use_account string *optional/required; the name of the CloudCheckr account you are making the call for
use_cc_account_id string *optional/required; the CloudCheckr ID of the account you are making the call for
use_aws_account_id string *optional/required; the 12-digit AWS account ID
*Because this call requires an admin-level access key, you must add one of the following parameters to your request:
  • use_aws_account_id
  • use_account
  • use_cc_account_id

API CALL URL:

https://api.cloudcheckr.com/api/account.[json|xml]/edit_aws_billing_configuration?access_key=your_access_key

JSON/XML CALL EXAMPLE:

curl --request POST \
'https://api.cloudcheckr.com/api/billing.[json|xml]/edit_aws_billing_configuration?access_key=your_access_key' \
--header 'cache-control: no-cache' \
--header 'content-type: application/[json|xml]' \
--data' {
"generate_accounts_of_payees":"false",
"hide_credits_from_payees":"true",
"dbr_bucket_name":"billing949195593353",
"dbr_region":"U East (Northern Virginia)"
}

SUCCESSFUL JSON/XML RESPONSE:

{
"accounts_list": null,
"generate_accounts_of_payees": true,
"hide_credits_from_payees": false,
"dbr_bucket_name": "aaronslogfiles",
"dbr_region_name": null,
"cur_enabled": true,
"cur_start_date": "2017-06-15T00:00:00",
"cur_bucket_name": "cc-ohio",
"cur_region_name": "us-east-1",
"cur_folder_prefix": "AGCUR",
"cur_report_name": "AGQA"
}


Forgot Password

The API method, “forgot_password”, is used to reset a user’s password. The method will return the password reset link and a password reset key.

The preferred HTTP method is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level API key
email string required; user’s email address


API CALL URL:

https://api.cloudcheckr.com/api/account.[json|xml]/forgot_password?access_key=your_admin_access_key

REQUEST EXAMPLE:

curl -X POST \
-- https://api.cloudcheckr.com/api/account.[json|xml]/forgot_password?access_key=your_admin_access_key\
-- header 'cache-control: no-cache' \
-- header 'content-type: application/[json|xml]' \
-- data {
"email": "user1@domain.com",
}

RESPONSE EXAMPLE:
XML:

<ForgotPasswordResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance>
<status>
<reset_link>https://app.cloudcheckr.com/LogOn/#!/resetPassword</reset_link>
<key>reset key</key>
<code>200</code>
<message>Password Reset Successful</message>
</status>
</ForgotPasswordResponse>

JSON:

{
"ResetLink": "https://app.cloudcheckr.com/LogOn/#!/resetPassword",
"Key": [RESET KEY],
"Code": 200,
"Message": "Password Reset Successful"
}
You can access documentation on deprecated Account-Level API calls here.

Edit Custom Billing Charge – Percent All Charges V2

The API method, “edit_custom_billing_charge_percent_all_charges_v2”, is used to edit a percent discount or premium that you applied to all charges.

The preferred HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; account-level access key
ID string required; ID of the custom billing charge you want to edit
Description string optional; summary of the custom billing charge that allows you to easily distinguish it from other charges
PercentageValue decimal optional; sets the percentage for a discount (negative value) or a premium (positive value)
ApplyPercentageTo string optional; selects the cost type that you want CloudCheckr to apply the custom charge to
Accounts List<string> optional; select the accounts where you want CloudCheckr to apply the custom billing charge
The default option is all accounts.
AccountsInvert boolean optional; indicates that you want CloudCheckr to apply the custom billing charge to accounts that are not on the list
The default option is false.
AccountFamilies List<string> optional; select the account families where you want CloudCheckr to apply the custom billing charge
AccountFamiliesInvert boolean optional; indicates that you want CloudCheckr to apply the custom billing charge to account families that are not on the list
The default option is false.
Regions List<string> optional; select the regions where you want CloudCheckr to apply the custom billing charge
The default option is all regions.
This parameter accepts region IDs as valid values.
RegionsInvert boolean optional; indicates that you want CloudCheckr to apply the custom billing charge to regions that are not on the list
The default option is false.
AWSService List<string> optional; select the AWS services where you want CloudCheckr to apply the custom billing charge
The default option is all AWS services.
AWSServiceInvert boolean optional; indicates that you want CloudCheckr to apply the custom billing charge to AWS services that are not on the list
The default option is false.
ReservedInstance boolean optional; select the Reserved Instances (RIs) where you want CloudCheckr to apply the custom billing charge
Operation List<string> optional; select the operations where you want CloudCheckr to apply the custom billing charge
The default option is all operations.
OperationInvert boolean optional; indicates that you want CloudCheckr to apply the custom billing charge to any operations not on the list
The default option is false.
UsageType List<string> optional; select the usage types where you want CloudCheckr to apply the custom billing charge
The default option is all usage types.
IncludeCurrentAndFutureEc2Box boolean optional; select if you want the custom billing charge to inherit any EC2 Box usage automatically
IncludeCurrentAndFutureEc2Heavy boolean optional; select if you want the custom billing charge to inherit any EC2 Heavy usage types automatically
UsageTypeInvert boolean optional; indicates that you want CloudCheckr to apply the custom billing charge to usage types that are not on the list
The default option is false.
Tag List<string> optional; select the tag key/value pairs where you want CloudCheckr to apply the custom billing charge
The default option is all tags.
TagInvert boolean optional; indicates that you want CloudCheckr to apply the custom billing charge to tags that are not on the list
The default option is false.
StartDate DateTime required; the date that you want CloudCheckr to begin to apply the custom billing charge
EndDate DateTime optional; the date that you want CloudCheckr to stop applying the custom billing charge
If you want the charges to continue indefinitely, do not choose an end date.
use_account string *optional/required; the name of the CloudCheckr account you are making the call for
use_cc_account_id string *optional/required; the CloudCheckr ID of the account you are making the call for
use_aws_account_id string *optional/required; the 12-digit AWS account ID
*Because this call requires an admin-level access key, you must add one of the following parameters to your request:
  • use_aws_account_id
  • use_account
  • use_cc_account_id

ENDPOINT URL:

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

REQUEST EXAMPLE:

curl -- request POST \
-- 'https://api.cloudcheckr.com/api/billing.[json|xml]/edit_custom_billing_charge_percent_all_charges_v2?access_key=your_admin_access_key&use_cc_account_id=7' \
-- header 'cache-control: no-cache'\
-- header 'content-type: application/[json|xml]'\
-- data '{
"Description":"TEST DESCRIPTION",
"ApplyPercentageTo":"ListCost",
"PercentageValue":5,
"StartDate":"2013-01-01",
"EndDate":"2014-01-01",
"Account":[
"103237650000",
"949195599999",
"443094638888"
],
"Region":[
"16",
"4",
"2"
],
"UsageType":[
"CAN1-EUC1-AWS-Out-Bytes",
"HeavyUsage:m4.large",
"UGW1-TimedStorage-RRS-ByteHrs"
],
"Operation":[
"SetQueueAttributes",
"RunInstances:0002:SV012",
"PutObject"
],
"AWSService":[
"AmazonSimpleDB",
"AmazonEC2",
"AmazonSQS"
],
"Tag":[
"Name | WebTemplateNew",
"aws:cloudformation:stack-id | arn:aws:cloudformation:us-west-2:949195593353:stack\/awseb-e-4uypmi4ubg-stack\/f2837e90-8b2a-11e6-8349-50a686fc37d2",
"Name | DevServer"
]
}

RESPONSE EXAMPLE:

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

Delete Custom Billing Charge – Percent All Charges

The API method, “delete_custom_billing_charge_percent_all_charges”, is used to delete delete an existing custom billing charge that applies a percent discount or premium for all charges.
INPUT PARAMETERS:

Parameter Type Description
access_key string required; account-level access key
Id string required; custom billing charge Id
use_account string *optional/required; friendly name of the account in CloudCheckr where the custom billing charge can be applied (must be payer account!)
use_cc_account_id string *optional/required; account ID of the account in CloudCheckr where the custom billing charge can be applied (must be a payer account!)
use_aws_account_id string *optional/required; the 12-digit AWS account ID where the custom billing charge can be applied (must be payer account)

*= one of these parameters must be defined

ENDPOINT URL:

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

JSON/XML CALL EXAMPLE:

curl-- request POST \
'https://api.cloudcheckr.com/api/billing.[json|xml]/delete_custom_billing_charge_percent_all_charges?access_key=access_key]&use_account=[CloudCheckr account name]' \
--header 'cache-control: no-cache'\
    --header 'content-type: application/[json|xml]'\
--data '{
"Id": "custom billing charge Id",
}'

SUCCESSFUL JSON/XML RESPONSE:

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

Add Tag Mapping

The API method, “add_tag_mapping”, enables you to programmatically add a unique tag mapping to your CloudCheckr account.

The preferred HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; the admin-level or account-level access key
map_to_tag_key string

required; the name of the tag key in your new tag mapping

A tag mapping helps you track selected cost and billing data associated with your cloud resources. A tag mapping consists of a tag key and a tag value.

A tag key is the attribute that you want to track.

A tag value is the value of the tag key that you are tracking.

For example, you can apply the Environment tag key with a tag value of Development to track your costs across your Development environments.

map_to_tag_value string

required; the value associated with the tag key in your new tag mapping

For example, you can apply the Production tag value if you only want to see costs for assets in your Production environments or you can leave the field blank if you want to see costs across all environments in your cloud deployment.

tag_conditions List <string>

required/optional; additional conditions you can apply to your tag mapping that will trigger CloudCheckr to only apply the tag mapping if a resource meets at least one of these conditions :

  • key_to_map
  • value_to_map
  • match_tag_key_exactly
  • match_tag_value_exactly
  • match_resources_without_key
You must select the tag_conditions parameter or the property_conditions parameter in your tagging structure.
key_to_map string

required; the name of the tag key

value_to_map string

required; the name of the tag value

match_tag_key_exactly boolean

optional; select if you want your results to match the tag key exactly

match_tag_value_exactly boolean

optional; select if you want your results to match the tag value exactly

match_resources_without_key boolean

optional; select if you want your results to include resources that do not use the tag key

property_conditions List <string>

required/optional; additional conditions that allow you to further limit what data is included in your tag mapping:

  • key_to_map
  • value_to_map
You must select the tag_conditions parameter or the property_conditions parameter in your tagging structure.
key_to_map string

required; the name of a cloud provider property

In AWS accounts, you can select one or more of the following properties:

  • Account
  • AvailabilityZone
  • Operation
  • Region
  • Resource
  • Service
  • UsageType
value_to_map string

required; the value of the cloud provider property

use_account string *optional/required; the name of the CloudCheckr account you are making the call for
use_cc_account_id integer *optional/required; the CloudCheckr ID of the account you are making the call for
*If you use an admin-level access key, you are required to add one of the following parameters to your request:
  • use_account
  • use_cc_account_id

API CALL URL:

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

REQUEST EXAMPLE:

curl -- request POST \
-- 'https://api.cloudcheckr.com/api/billing.[json|xml]/add_tag_mapping' \
-- header 'cache-control: no-cache' \
-- header 'access_key: [access key]' \
-- header 'content-type: application/[json|xml]' \
-- data {
"map_to_tag_key":"testTagKey",
"map_to_tag_value":"testTagValue",
"tag_conditions":[
[
{
"key_to_map":"key-1",
"value_to_map":"value-1"
},
{
"key_to_map":"key-2",
"value_to_map":"value-2",
"match_tag_key_exactly":true,
"match_tag_value_exactly":true,
"match_resources_without_key":true
}
],
[
{
"key_to_map":"key-3",
"value_to_map":"value-3"
}
]
],
"property_conditions":[
[
{
"key_to_map":"Service",
"value_to_map":"AmazonBraket"
},
{
"key_to_map":"AvailabilityZone",
"value_to_map":"af-south-1a"
}
],
[
{
"key_to_map":"Service",
"value_to_map":"ElasticBeanstalk"
},
{
"key_to_map":"AvailabilityZone",
"value_to_map":"us-west-1a"
}
]
]
}

RESPONSE EXAMPLES:

<AddTagMappingv2Response xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<status>
<ID>CloudCheckr Tag ID</ID>
<Code>200</Code>
<Message>OK</Message>
</status>
</AddTagMappingv2Response>
	{
"ID": CloudCheckr Tag ID,
"Code": 200,
"Message": "OK"
}

AWS Billing Report Get Status

The API method, "aws_billing_report_get_status", is used to retrieve the information with the report rows on the reprocess billing reports page.

The preferred HTTP method for this call is GET.

INPUT PARAMETERS

Parameter Type Description
access_key string required; account-level or admin-level access key
billing_month string optional; retrieve a specific or the last 18 months of billing files and their status
use_cc_account_id string required; account ID of the account in CloudCheckr (must be a payer account)

API CALL URL

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

REQUEST EXAMPLE

curl -- request POST \
-- 'https://api.cloudcheckr.com/api/billing.json/aws_billing_report_get_status' \
-- header 'access_key: [access key]' \
-- header 'content-type: application/json' \
-- data '{
"billing_month": "2023-01",
"use_cc_account_id": "3"
}

OUTPUT & RESPONSE

{
"Files": [
{
"BillingMonth": "2023-01-01T00:00:00",
"FileName": "AWSAccountID-cost-and-usage-report-2023-01",
"SummaryState": "Processed",
"SummaryDataStart": "2023-02-02T13:19:00",
"SummaryDataEnd": "2023-02-02T14:36:20",
"DetailedDataStart": "2023-02-02T13:19:00",
"DetailedDataEnd": "2023-02-02T14:36:20",
"DetailedState": "Processed",
"LockedStatus": true,
"Reprocess": false
}
],
"Code": 200,
"Message": "OK"
}

AWS Billing Report Unlock Month

The API method, "aws_billing_report_unlock_month", is used to unlock billing months.

The preferred HTTP method for this call is POST.

INPUT PARAMETERS

Parameter Type Description
access_key string required; account-level or admin-level access key
lock_month boolean required; false to unlock the month, true to lock the month
change_reseller_files boolean optional; included parameter to change the status of associated L2 accounts. True to unlock the month, false to lock the month.
billing_month string required; specify the billing month in yyyy-mm format
use_cc_account_id string required; account ID of the account in CloudCheckr (must be a payer account)

API CALL URL

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

EXAMPLE REQUEST

curl -- request POST \
-- 'https://api.cloudcheckr.com/api/billing.json/aws_billing_report_unlock_month' \
-- header 'access_key: [access key]' \
-- header 'content-type: application/json' \
-- data '{
"lock_month": "false",
"change_reseller_files": "false",
"billing_month": "2023-01",
"use_cc_account_id": "3"
}

OUTPUT & RESPONSE

{
"Code": 200,
"Message": "AWSAccountID: Successfully unlocked month."
}
{
"Code": 200,
"Message": "AWSAccountID: Successfully locked month."
}
{
"Code": 200,
"Message": "AWSAccountID: Successfully unlocked month..AWSAccountID1: Successfully unlocked month..AWSAccountID2: Successfully unlocked month..AWSAccountID3: Successfully unlocked month."
}

AWS Billing Report Reprocess Month

The API method, "aws_billing_report_reprocess_month", is used to trigger a reload for the specified, unlocked billing files.

The preferred HTTP method for this call is POST.

INPUT PARAMETERS

Parameter Type Description
access_key string required; account-level or admin-level access key
billing_month string required; the billing month to reload, in yyyy-mm format
use_cc_account_id string required; account ID of the account in CloudCheckr (must be a payer account)

API CALL URL

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

EXAMPLE REQUEST

curl -- request POST \
-- 'https://api.cloudcheckr.com/api/billing.json/aws_billing_report_reprocess_month' \
-- header 'access_key: [access key]' \
-- header 'content-type: application/json' \
-- data '{
"billing_month": "2023-01",
"use_cc_account_id": "3"
}

OUTPUT & RESPONSE

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

How did we do?