Deprecated Admin Calls

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

Add Account

This API is deprecated and is maintained for historical reasons only. Please use add_accountv3 instead. The API method "add_account" is used to register an AWS account with CloudCheckr. IMPORTANT: This call can only be made using Admin-Level Access Keys. The preferred HTTP method for this call is POST. XML call:

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

JSON call:

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

INPUT PARAMETERS This call accepts these parameters:

  • access_key (required) - standard Access Key required for all API calls.
  • account_name (required) - the name of the AWS account to register with CloudCheckr.
  • aws_access_key (optional) - the access key of the IAM user whose credentials will be used to connect CloudCheckr to your AWS account.
  • aws_secret_key (optional) - the secret key of the IAM user whose credentials will be used to connect CloudCheckr to your AWS account.
  • aws_role_arn (optional) - the cross account role for the IAM user whose credentials will be used to connect CloudCheckr to your AWS account.
  • account_tag (optional) - the tag for the account to be used within a Multi-Account View.
  • user_name (optional) - the name of the user that will have access to this account. If no user is specified, the first Administrator of the account will be applied.
  • emails (optional) - the email address(es) that will populate the account's Email Settings, determining who receives the automated reports. If this parameter is not used, the email address used when registering the CloudCheckr account will be populated in this field.

NOTE: AWS secret keys typically contain special characters. In order to submit as a parameter on the URL, you must URL encode it. See http://www.w3schools.com/tags/ref_urlencode.asp for more details or to URL encode a AWS secret key.

OUTPUT

XML & JSON Example:

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

Add Account V2

This API is deprecated and is maintained for historical reasons only. Please use add_accountv3 instead. The API method "add_accountv2" is used to register an AWS account with CloudCheckr. This method will return an ID for the newly created account that can be used for the parameter 'use_cc_account_id' when making calls to the Admin-Level API.

IMPORTANT: This call can only be made using Admin-Level Access Keys. The preferred HTTP method for this call is POST. XML call:

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

JSON call:

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

INPUT PARAMETERS This call accepts these parameters:

  • access_key (required) - standard Access Key required for all API calls.
  • account_name (required) - the name of the AWS account to register with CloudCheckr.
  • aws_access_key (optional) - the access key of the IAM user whose credentials will be used to connect CloudCheckr to your AWS account.
  • aws_secret_key (optional) - the secret key of the IAM user whose credentials will be used to connect CloudCheckr to your AWS account.
  • aws_role_arn (optional) - the cross account role for the IAM user whose credentials will be used to connect CloudCheckr to your AWS account.
  • account_tag (optional) - the tag for the account to be used within a Multi-Account View.
  • user_name (optional) - the name of the user that will have access to this account. If no user is specified, the first Administrator of the account will be applied.
  • emails (optional) - the email address(es) that will populate the account's Email Settings, determining who receives the automated reports. If this parameter is not used, the email address used when registering the CloudCheckr account will be populated in this field.

NOTE: AWS secret keys typically contain special characters. In order to submit as a parameter on the URL, you must URL encode it. See http://www.w3schools.com/tags/ref_urlencode.asp for more details or to URL encode a AWS secret key.

OUTPUT

XML Example:

<AddAccountResponseV2 xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance>
<cc_account_id>336</cc_account_id>
</AddAccountResponseV2>

JSON Example:

{"cc_account_id":340}

Add Custom Billing Charge – Fixed

The API method, “add_custom_billing_charge_fixed”, is used to add a custom billing charge that applies a fixed charge or credit.

To add a fixed charge or credit, go to the left navigation pane, choose Cost > AWS Partner Tools > Configure > Custom Billing Charges, click New Custom Charge, and select Add a fixed charge or credit.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level API key
startDate DateTime required; start date for the custom billing charge
endDate DateTime required/optional; end date for the custom billing charge; custom billing charges with no end date will apply until the end of time
amount decimal required; sets the fixed charge (positive value) or credit (negative value) dollar amount
oneTime string *required/optional; applies the fixed charge or credit as a one-time occurence to the custom billing charge
monthlyRecurring string *required/optional; applies the fixed credit or charge as a monthly recurring amount to the custom billing charge
description string required; human-friendly description of the custom billing charge
accounts List<string> optional; comma-separated list of accounts where the custom billing charge can be applied; defaults to all accounts
accountsInvert boolean optional; applies the NOT logical operator to selected accounts in the previous parameter; defaults to false
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
** = one of these parameters must be defined
The end date is only required if you select the Monthly recurring option.

ENDPOINT URL:

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

JSON/XML CALL EXAMPLE:

curl --request POST \
--'https://api.cloudcheckr.com/api/billing.[json|xml]/add_custom_billing_charge_fixed?access_key=your_admin_access_key&use_cc_account_id=1234' \
--header 'cache-control: no-cache' \
--header 'content-type: application/[json|xml]' \
--data '{
"startDate":"1970-01-01",
"endDate":"2063-04-05",
"description":"example custom billing charge",
"amount":"dollar amount",
"oneTime":"true or false",
"monthlyRecurring":"true or false",
"accounts":[
"215011050627,245990094719"
],
"accountInvert":"true"
}

SUCCESSFUL JSON/XML RESPONSE:

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

Add Custom Billing Charge – Monthly Percent

The API method, “add_custom_billing_charge_monthly_percent”, is used to add the Add a monthly percent charge or credit custom billing charge that applies a monthly percent discount or premium.

To access the page in the application, navigate to Cost > AWS Partner Tools > Configure > Custom Billing Charges, click New Custom Charge, and select Add a monthly percent charge or credit.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level API key
description string required; human-friendly description of the custom billing charge
percentageValue decimal required; sets the charge (positive value) or credit (negative value) percentage
minimumCharge decimal optional; applies a minimum charge/credit threshold to the custom billing charge
maximumCharge decimal optional; applies a maximum charge/credit threshold to the custom billing charge
tiers List<Tier> optional; applies the custom billing charge to a monetary tier range
applyPercentageTo CostBasline required; indicates the cost type  that the custom billing charge will apply to
stack boolean optional; enables custom stack ordering; defaults to false
stackOrder integer optional; sets stack order if previous parameter is true
accounts List<string> optional; comma-separated list of accounts where the custom billing charge can be applied; defaults to all accounts
accountsInvert boolean optional; applies the NOT logical operator to selected accounts in the previous parameter; defaults to false
accountFamilies List<string> optional; comma-separated list of account families where the custom billing charge can be applied
accountFamiliesInvert boolean optional; applies the NOT logical operator to selected account families in the previous parameter; defaults to false
accountFamiliesProjectCode List<string> optional; comma-separated list of account family project codes where the custom billing charge can be applied
accountFamiliesProjectCodeInvert boolean optional; applies the NOT logical operator to selected account family project codes in the previous parameter; defaults to false
region List<string> optional; comma-separated list of region(s) where the custom billing charge can be applied; defaults to all; accepts region id’s as valid values
regionInvert boolean optional; applies the NOT logical operator to selected regions in the previous parameter; defaults to false
awsService List<string> optional; comma-separated list of AWS services where the custom billing charge can be applied; defaults to all
awsServiceInvert boolean optional; applies the NOT logical operator to selected AWS services in the previous parameter; defaults to false
reservedInstance boolean optional; identifies if you want to apply the custom billing charge to any Reseved Instances (RI)
operation List<string> optional; comma-separated list of AWS operations where the custom billing charge can be applied; defaults to all
operationInvert boolean optional; applies the NOT logical operator to selected AWS operations in the previous parameter; defaults to false
usageType List<string> optional; comma-separated list of AWS usage types where the custom billing charge can be applied; defaults to all
usageTypeInvert boolean optional; applies the NOT logical operator to selected AWS usage types in the previous parameter; defaults to false
tag List<string> optional; comma-separated list of tag key/value pairs where the custom billing charge can be applied; defaults to all
tagInvert boolean optional; applies the NOT logical operator to selected tag key/value pairs in the previous parameter; defaults to false
startDate DateTime required; start date for the custom billing charge
endDate DateTime optional; end date for the custom billing charge; custom billing charges with no end date will apply until the end of time
use_account string *optional/required; friendly name of the account in CloudCheckr where the custom billing charge is applied (must be payer account!)
use_cc_account_id string *optional/required; account ID of the account in CloudCheckr where the custom billing charge is applied (must be a payer account)
use_aws_account_id string *optional/required; the 12-digit AWS account ID where the custom billing charge is applied (must be payer account)
* = one of these parameters must be defined

ENDPOINT URL:

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

JSON/XML CALL EXAMPLE:

curl --request POST \
--'https://api.cloudcheckr.com/api/billing.[json|xml]/add_custom_billing_charge_monthly_percent?access_key=your_admin_access_key& amp;use_cc_account_id=1234' \
--header 'cache-control: no-cache' \
--header 'content-type: application/[json|xml]' \
--data '{
"description":"example custom billing charge",
"percentageValue":10.5,
"minimumCharge":5000,
"maximumCharge":10000,
"stack":"true",
"stackOrder":1,
"tiers":[
{
"From":0,
"To":1000,
"Charge":25
},
{
"From":1001,
"To":2000,
"Charge":-10
}
],
"costBaseline":"ListCost",
"accounts":["215011050627,245990094719"],
"region":["1","2"],
"RegionInvert":"true",
"operation":["AbortMultipartUpload", "AssociateAddress"],
"usageType":["ActiveConfigRules","APN1-ActiveConfigRules"],
"tag":["Customer | test123","Customer | Testtag"],
"startDate":"1970-01-01",
"endDate":"2063-04-05"
}

SUCCESSFUL JSON/XML RESPONSE:

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

Add Custom Billing Charge – Percent All Charges

The API method, “add_custom_billing_charge_percent_all_charges”, is used to add a percent discount or premium for all charges.

To add this custom billing charge, go to the left navigation pane, choose Cost > AWS Partner Tools > Configure > Custom Billing Charges,  click New Custom Charge, and select Add a percent discount or premium for all charges from the Custom Billing Charges page.

INPUT PARAMETERS:

Parameter Type Description
Access_key string required; admin-level API key
Description string required; human-friendly description of the custom billing charge
PercentageValue decimal required; sets the discount (negative value) or premium (positive value) percentage
ApplyPercentageTo CostBasline required; indicates which cost type the custom billing charge will apply to
Account List<string> optional; comma-separated list of accounts where the custom billing charge can be applied; defaults to all accounts
Region List<string> optional; comma-separated list of region(s) where the custom billing charge can be applied; defaults to all; accepts region id’s as valid values
regionInvert boolean optional; applies the NOT logical operator to selected regions in the previous parameter; defaults to false
 AWSService List<string> optional; comma-separated list of AWS services where the custom billing charge can be applied; defaults to all
AWSServiceInvert boolean optional; applies the NOT logical operator to selected AWS services in the previous parameter; defaults to false
Operation List<string> optional; comma-separated list of AWS operations where the custom billing charge can be applied; defaults to all
operationInvert boolean optional; applies the NOT logical operator to selected operations in the previous parameter; defaults to false
 UsageType  List<string> optional; comma-separated list of AWS usage types where the custom billing charge can be applied; defaults to all
UsageTypeInvert boolean optional; applies the NOT logical operator to selected usage types in the previous parameter; defaults to false
Tag List<string> optional; comma-separated list of tag key/value pairs where the custom billing charge can be applied; defaults to all
TagInvert boolean optional; applies the NOT logical operator to selected tags in the previous parameter; defaults to false
 StartDate  DateTime required; start date for the custom billing charge
 EndDate  DateTime optional; end date for the custom billing charge
use_account string *optional/required; friendly name of the account in CloudCheckr where the custom billing charge is applied (must be payer account!)
use_cc_account_id string *optional/required; account ID of the account in CloudCheckr where the custom billing charge is applied (must be a payer account)
use_aws_account_id string *optional/required; the 12-digit AWS account ID where the custom billing charge is applied (must be payer account)
* = one of these parameters must be defined

ENDPOINT URL:

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

JSON/XML CALL EXAMPLE:

curl --request POST \
--'https://api.cloudcheckr.com/api/billing.[json|xml]/add_custom_billing_charge_percent_all_charges?use_cc_account_id=7&access_key=your_admin_access_key' \
--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":[
"103237659442",
"949195593353",
"443094636793"
],
"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"
]
}

SUCCESSFUL JSON/XML RESPONSE:

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

Edit Custom Billing Charge - Fixed

The API method, “edit_custom_billing_charge_fixed”, is used to edit a custom billing charge that applies a fixed charge or credit.

To edit a fixed charge or credit, go to the left navigation pane, choose Cost > AWS Partner Tools > Configure > Custom Billing Charges, click New Custom Charge, and select Add a fixed charge or credit.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level API key
startDate DateTime required; start date for the custom billing charge
endDate DateTime required/optional; end date for the custom billing charge; custom billing charges with no end date will apply until the end of time
amount decimal required; sets the fixed charge (positive value) or credit (negative value) dollar amount
oneTime string *required/optional; applies the fixed charge or credit as a one-time occurence to the custom billing charge
monthlyRecurring string *required/optional; applies the fixed credit or charge as a monthly recurring amount to the custom billing charge
description string required; human-friendly description of the custom billing charge
accounts List<string> optional; comma-separated list of accounts where the custom billing charge can be applied; defaults to all accounts
accountsInvert boolean optional; applies the NOT logical operator to selected accounts in the previous parameter; defaults to false
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
** = one of these parameters must be defined

The end date is only required if you select the Monthly recurring option.

ENDPOINT URL:

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

JSON/XML CALL EXAMPLE:

curl --request POST \
            'https://api.cloudcheckr.com/api/billing.[json|xml]/add_custom_billing_charge_fixed?access_key=your_admin_access_key&use_cc_account_id=1234' \
            --header 'cache-control: no-cache' \
            --header 'content-type: application/[json|xml]' \
            --data '{
          	"startDate": "1970-01-01",
                  "endDate": "2063-04-05",
                  "description": "example custom billing charge",
          	"amount": "dollar amount",
                  "oneTime": "true or false",
                  "monthlyRecurring": true or false,
          	"accounts": ["215011050627,245990094719"],
                  "accountInvert": "true"
          	}
          

SUCCESSFUL JSON/XML RESPONSE:

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

Edit Custom Billing Charge – Monthly Percent

The API method, “edit_custom_billing_charge_monthly_percent”, is used to edit the Add a monthly percent charge or credit custom billing charge that applies a monthly percent discount or premium.

To access the page in the application, navigate to Cost > AWS Partner Tools > Configure > Custom Billing Charges, click New Custom Charge, and click Add a monthly percent charge or credit.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level API key
id long required; ID of the custom billing charge to edit
description string optional; human-friendly description of the custom billing charge
percentageValue decimal optional; sets the charge (positive value) or credit (negative value) percentage
minimumCharge decimal optional; applies a minimum charge/credit threshold to the custom billing charge
maximumCharge decimal optional; applies a maximum charge/credit threshold to the custom billing charge
tiers List<Tier> optional; applies the custom billing charge to a monetary tier range
applyPercentageTo CostBasline optional; indicates which cost type the custom billing charge will apply to
stack boolean optional; enables custom stack ordering; defaults to false
stackOrder integer optional; sets stack order if previous parameter is true
accounts List<string> optional; comma-separated list of accounts where the custom billing charge can be applied; defaults to all accounts
accountsInvert boolean optional; applies the NOT logical operator to selected accounts in the previous parameter; defaults to false
region List<string> optional; comma-separated list of region(s) where the custom billing charge can be applied; defaults to all; accepts region id’s as valid values
regionInvert boolean optional; applies the NOT logical operator to selected regions in the previous parameter; defaults to false
awsService List<string> optional; comma-separated list of AWS services where the custom billing charge can be applied; defaults to all
awsServiceInvert boolean optional; applies the NOT logical operator to selected AWS services in the previous parameter; defaults to false
operation List<string> optional; comma-separated list of AWS operations where the custom billing charge can be applied; defaults to all
operationInvert boolean optional; applies the NOT logical operator to selected AWS operations in the previous parameter; defaults to false
usageType List<string> optional; comma-separated list of AWS usage types where the custom billing charge can be applied; defaults to all
usageTypeInvert boolean optional; applies the NOT logical operator to selected AWS usage types in the previous parameter; defaults to false
tag List<string> optional; comma-separated list of tag key/value pairs where the custom billing charge can be applied; defaults to all
tagInvert boolean optional; applies the NOT logical operator to selected tag key/value pairs in the previous parameter; defaults to false
startDate DateTime optional; start date for the custom billing charge
endDate DateTime optional; end date for the custom billing charge; custom billing charges with no end date will apply until the end of time
use_account string * optional/required; friendly name of the account in CloudCheckr where the custom billing charge can be applied (must be a 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 a payer account)

* = one of these parameters must be defined

ENDPOINT URL:

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

CALL EXAMPLE:

  curl --request POST \
--url 'https://api.cloudcheckr.com/api/billing. [json|xml]edit_custom_billing_charge_monthly_percent?access_key=your_admin_access_key&use_cc_account_id=1234' \
--header 'cache-control: no-cache' \
--header 'content-type: application/[json|xml]' \
--data {
"id":179,
"percentageValue":42
}

SUCCESSFUL JSON RESPONSE:

{
"Id": <new ID value>,
"Code": 200,
"Message": "OK"
}

Edit Custom Billing Charge - Percent All Charges

The API method, edit_custom_billing_charge_percent_all_charges, is used to edit the percent discount or premium for all charges.

To edit this custom billing charge, go to the left navigation pane, and choose Cost > AWS Partner Tools > Configure > Custom Billing Charges. From the Custom Billing Charge page, select a charge from the table with a type, Premium/Discount for all charges, and click Edit.

INPUT PARAMETERS:

Parameter Type Description
Access_key string required; admin-level API key
Description string required; human-friendly description of the custom billing charge
PercentageValue decimal required; sets the discount (negative value) or premium (positive value) percentage
ApplyPercentageTo CostBasline required; indicates which cost type the custom billing charge will apply to
Account List<string> optional; comma-separated list of accounts where the custom billing charge can be applied; defaults to all accounts
Region List<string> optional; comma-separated list of region(s) twhere the custom billing charge can be applied; defaults to all; accepts region id’s as valid values
 AWSService List<string> optional; comma-separated list of AWS services where the custom billing charge can be applied; defaults to all
Operation List<string> optional; comma-separated list of AWS operations the custom billing charge applies to; defaults to all
 UsageType  List<string> optional; comma-separated list of AWS usage types where the custom billing charge can be applied; defaults to all
Tag List<string> optional; comma-separated list of tag key/value pairs where the custom billing charge can be applied; defaults to all
 StartDate  DateTime required; start date for the custom billing charge
 EndDate  DateTime optional; end date for the custom billing charge
use_account string *optional/required; friendly name of the account in CloudCheckr where the custom billing charge is applied (must be payer account!)
use_cc_account_id string *optional/required; account ID of the account in CloudCheckr where the custom billing charge is applied (must be a payer account)
use_aws_account_id string *optional/required; the 12-digit AWS account ID where the custom billing charge is applied (must be payer account)

* = one of these parameters must be defined

ENDPOINT URL:

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

JSON/XML CALL EXAMPLE:

curl-- request POST \
'https://api.cloudcheckr.com/api/billing.[json|xml]/edit_custom_billing_charge_percent_all_charges?use_cc_account_id=7&access_key=your_admin_access_key' \
--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":[
"103237659442",
"949195593353",
"443094636793"
],
"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"
]
}

SUCCESSFUL JSON/XML RESPONSE:

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

Get Account Level Tags

This API is deprecated and is maintained for historical reasons only. Please use get_account_level_tags_v2 instead. The API method "get_account_level_tags", when called from a general account, retrieves all of the account-level tags created within that account. When called from a Multi-Account View, it returns a list of accounts associated with the Multi-Account View and a list of their account-level tags.

Using call against general accounts: The preferred HTTP method for this call is GET.

XML call:

https://api.cloudcheckr.com/api/account.xml/get_account_level_tags?access_key=[access_key]

JSON call:

https://api.cloudcheckr.com/api/account.json/get_account_level_tags?access_key=[access_key]

INPUT PARAMETERS This call accepts these parameters:

  • access_key (required) - Admin-Level Access Key is required for this call.

OUTPUT

XML Example:

<AccountLevelTag
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Accounts>
<Account>
<Name>MY AWS ACCOUNT</Name>
<Tags>
<Tag>Account Tag 1</Tag>
<Tag>Account Tag 2</Tag>
</Tags>
</Account>
</Accounts>
</AccountLevelTag>

JSON Example:

{
"Accounts": [
{
"Name": "MY AWS ACCOUNT",
"Tags": [
"Account Tag 1",
"Account Tag 2"
]
}
]
}

  Using the call against Multi-Account Views:

XML call:

https://api.cloudcheckr.com/api/account.xml/get_account_level_tags?access_key=[access_key]

JSON call:

https://api.cloudcheckr.com/api/account.json/get_account_level_tags?access_key=[access_key]

INPUT PARAMETERS This call accepts these parameters:

  • access_key (required) - Admin-Level Access Key is required for this call.
  • use_account (optional; multi-account view only) - return account-level tags from these accounts.

OUTPUT

XML Example:

<AccountLevelTag
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Accounts>
<Account>
<Name>AWS AccountA</Name>
<Tags>
<Tag>Account Tag 1</Tag>
<Tag>Account Tag 2</Tag>
</Tags>
</Account>
<Account>
<Name>AWS AccountB</Name>
<Tags>
<Tag>Account Tag 1</Tag>
<Tag>Account Tag 2</Tag>
<Tag>Account Tag 3</Tag>
</Tags>
</Account>
</Accounts>
</AccountLevelTag>

JSON Example:

{
"Accounts": [
{
"Name": "AWS AccountA",
"Tags": [
"Account Tag 1",
"Account Tag 2"
]
},
{
"Name": "AWS AccountB",
"Tags": [
"Account Tag 1",
"Account Tag 2",
"Account Tag 3"
]
}
]
}

 


Get Accounts

This API is deprecated and is maintained for historical reasons only. Please use get_accounts_v4 instead. The API method "get_accounts" is used to return a complete list of all AWS accounts registered in CloudCheckr. This call will return an ID for each account that can be used for the parameter ‘use_cc_account_id’ when making calls to the Admin-Level API. IMPORTANT: This call can only be made using Admin-Level Access Keys. The preferred HTTP method for this call is GET.

XML call:

https://api.cloudcheckr.com/api/account.xml/get_accounts?access_key=[access_key]

JSON call:

https://api.cloudcheckr.com/api/account.json/get_accounts?access_key=[access_key]

INPUT PARAMETERS This call accepts these parameters:

  • access_key (required) - Admin-Level Access Key is required for this call.

OUTPUT

XML Example:

<GetAccountsResponse 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<accounts_and_users>
<AccountAndUsernames>
<account_name>CloudCheckr Account Name 1 </account_name>
<cc_account_id>1</cc_account_id>
<user_names>
<string>user@domain.com</string>
</user_names>
</AccountAndUsernames>
</accounts_and_users>
</GetAccountsResponse>

JSON Example:

{
"accounts_and_users": [
{
"account_name": "CloudCheckr Account Name 1",
"cc_account_id": "1",
"user_names": [
"user@domain.com"
]
},
{
"account_name": "CloudCheckr Account Name 2",
"cc_account_id": "2",
"user_names":[
"user@domain.com"
]
},
{
"account_name": "CloudCheckr Account Name 3",
"cc_account_id": "3",
"user_names": [
"user@domain.com"
]
}
]
}

Get List Of Customers Setup In Invoice Generator

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

XML call:

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

JSON call:

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

This call accepts these parameters:

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

OUTPUT

XML Output:

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

Get Users

This API is deprecated and is maintained for historical reasons only. Please use get_users_v2 instead. The API method "get_users" is used to return a complete list of all CloudCheckr users and the AWS accounts registered in CloudCheckr they can access. IMPORTANT: This call can only be made using Admin-Level Access Keys. The preferred HTTP method for this call is GET.

XML call:

https://api.cloudcheckr.com/api/account.xml/get_users?access_key=[access_key]

JSON call:

https://api.cloudcheckr.com/api/account.json/get_users?access_key=[access_key]

INPUT PARAMETERS This call accepts these parameters:

  • access_key (required) - Admin-Level Access Key is required for this call.
  • use_account (required -- either this field or 'use_cc_account_id') - The name of the AWS account within CloudCheckr.
  • use_cc_account_id (required -- either this field or 'use_account') - The CloudCheckr ID number for the AWS account within the application.

OUTPUT

XML Example:

<GetUsersResponse
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<users_and_accounts>
<UsernameAndAccountNames>
<username>user@domain.com</username>
<account_names>
<string>AWS Account1</string>
<string>AWS Account2</string>
<string>AWS Account3</string>
</account_names>
</UsernameAndAccountNames>
</users_and_accounts>
</GetUsersResponse>

JSON Example:

{
"users_and_accounts": [
{
"username": "user@domain.com",
"account_names": [
"AWS Account1",
"AWS Account2",
"AWS Account3"
]
}
]
}

Get Account Family

This API is deprecated and is maintained for historical reasons only. Please use get_account_family_v2 instead. The API method "get_account_family" is used to return a complete list of all account families in a CloudCheckr payer account.

Sample XML call:

https://api.cloudcheckr.com/api/billing.xml/get_account_family?access_key=[access_key]&use_account=[use_account]&name=[name]

Sample JSON call:

https://api.cloudcheckr.com/api/billing.json/get_account_family?access_key=[access_key]&use_account=[use_account]&name=[name]

INPUT PARAMETERS This call accepts these parameters:

  • access_key (required) - Admin Level Access Key required for all API calls.
  • 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.
  • name (optional) - The name for the Account Family in question.

OUTPUT

XML Example:

<GetAccountFamilyResponse 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Code>0</Code>
<AccountFamilies>
<AccountFamily>
<Name>123456789 (AccountFamilyExample)</Name>
<Accounts>
<string>123456789 (AccountFamilyExample)</string>
</Accounts>
</AccountFamily>
</AccountFamilies>
<UnmappedAccounts>
<string>9876543210 (UnmappedAccountExample)</string>
</UnmappedAccounts>
</GetAccountFamilyResponse>

JSON Example:

{
"GetAccountFamilyResponse": {
"Code": "0",
"AccountFamilies": {
"AccountFamily": {
"Name": "123456789 (AccountFamilyExample)",
"Accounts": {
"string": "123456789 (AccountFamilyExample)"
}
}
},
"UnmappedAccounts": {
"string": "9876543210 (UnmappedAccountExample)"
},
"_xmlns:xsd": "http://www.w3.org/2001/XMLSchema",
"_xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance"
}
}

Get Custom Billing Charges

This API is deprecated and is maintained for historical reasons only. Please use get_custom_billing_charges_v3 instead. The API method, "get_custom_billing_charges", is used to return any custom billing charges from the Cost > AWS Partner Tools > Configure > Custom Billing Charges page. INPUT PARAMETERS:

Parameter

Type

Description

access_key

string

required, admin-level API key

accounts

string

optional; comma-separated list of AWS account IDs; only returns custom charges that contain one of the accounts from the list

ENDPOINT URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/get_custom_billing_charges&accounts=111111111111

JSON/XML CALL EXAMPLE:

curl --request GET \
--'https://api.cloudcheckr.com/api/billing.[json|xml]/get_custom_billing_charges?access_key=your_admin_access_key' \
--header 'cache-control: no-cache' \
--header 'content-type: application/[json|xml]' \
--data '{
"accounts": 1111111111111,
}

SUCCESSFUL JSON/XML RESPONSE:

{ 
"CustomBillingCharges":
[
{
"StartDate":"1/1/2018",
"EndDate":"N/A",
"Type":"Monthly Tier",
"ChargeValue":"Tiers",
"Description":"A Sample Tiered Charge for EC2",
"ResourceId":"",
"Stack":true,
"StackOrder":1,
"Account":"111111111111,222222222222,333333333333",
"Region":"All Regions"
}
]
}


Get Custom Billing Charges V2

The API method, “get_custom_billing_charges_v2”, is used to return any custom billing charges from the Cost > AWS Partner Tools > Configure > Custom Billing Charges page.

INPUT PARAMETERS:

Parameter Type Description
access_key string required, admin-level API key
accounts string optional; comma-separated list of AWS account IDs; only returns custom charges that contain one of the accounts from the list

ENDPOINT URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/get_custom_billing_charges_v2?access_key=your_admin_access_key&accounts=111111111111

CURL EXAMPLE:

curl --request GET \
            --'https://api.cloudcheckr.com/api/billing.[json|xml]/get_custom_billing_charges_v2?access_key=your_admin_access_key' \
            --header 'cache-control: no-cache' \
            --header 'content-type: application/[json|xml]' \
            --data '{
          	"accounts": 1111111111111,
          	 }
          

SUCCESSFUL JSON RESPONSE:

{
             "CustomBillingCharges":
             [
                 {
                   "Id":101,
                   "StartDate":"1/1/2018",
                   "EndDate":"N/A",
                   "Type":"Monthly Tier",
                   "ChargeValue":"Tiers",
                   "Description":"A Sample Tiered Charge for EC2",
                   "ResourceId":"",
                   "Stack":true,
                   "StackOrder":1,
                   "Account":"111111111111,222222222222,333333333333",
                   "Region":"All Regions"
                }
             ]
          }
          

Edit Account Email Settings

The API method “edit_account_email_settings” is used to configure a CloudCheckr account’s primary email address(es) for delivery of report emails.

IMPORTANT: This call can only be made using Admin-Level Access Keys.

The preferred HTTP method for this call is POST.

XML call:

https://api.cloudcheckr.com/api/account.xml/edit_account_email_settings?access_key=[access_key]&use_account=[account_name]&emails=[email_address]&alert_health_all=1

JSON call:

https://api.cloudcheckr.com/api/account.json/edit_account_email_settings?access_key=[access_key]&use_account=[account_name]&emails=[email_address]&alert_health_all=1

INPUT PARAMETERS
This call accepts these parameters:

If you want a report email to be enabled, you must always explicitly define it as enabled. If you omit a report email parameter (e.g. best_practices), then the result for that report email will default to false.

Also, when using edit_account_email_settings, you will identify which AWS account to edit by using either use_account or use_cc_account_id.

  • access_key (required) – Admin-Level Access Key is required for this call.
  • use_account (required — either this field or ‘use_cc_account_id’) – The name of the AWS account within CloudCheckr that will have its credentials changed.
  • use_cc_account_id (required — either this field or ‘use_account’) – The CloudCheckr ID number for the AWS account within the application.
  • emails (required) – The email address(es) to be added as the primary recipient(s) for this account.
  • alert_daily_billing (required) – true or false or 1 or 0 values
  • alert_health_affected (required) – true or false or 1 or 0 values
  • alert_health_all (required) – true or false or 1 or 0 values
  • change_monitoring (required) – true or false or 1 or 0 values
  • best_practices (required) – true or false or 1 or 0 values
  • daily_bill_summary (required) – true or false or 1 or 0 values
  • monthly_bill_summary (required) – true or false or 1 or 0 values
  • daily_consolidated_bill_summary (required) – true or false or 1 or 0 values
  • monthly_consolidated_bill_summary (required) – true or false or 1 or 0 values
  • inventory_summary_report (required) – true or false or 1 or 0 values
  • ec2_trending_report (required) – true or false or 1 or 0 values
  • s3_summary_report (required) – true or false or 1 or 0 values
  • ec2_resource_utilization_report (required) – true or false or 1 or 0 values

OUTPUT

XML & JSON Example:

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

How did we do?