Deprecated Admin API 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.

Click here for details on creating and managing Admin-Level Access Keys.

Admin-Level Access Keys are needed to make the following calls:

Attempting to make any of these calls using a General API Access Key will result in an error. You may also use Admin-Level API Keys to make the other calls found in the general API Reference guide.

NOTE: When using an Admin-Level Access Keys to make those calls you MUST add one of the following parameter to your calls:

  • use_account – 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 – the Id of the account you are making the call for. The Id is returned when using the method ‘account/add_accountv3′ to register the account in CloudCheckr.

XML call:

https://api.cloudcheckr.com/api/best_practice.xml/get_best_practices?access_key=[access_key]&use_account=[MyAccount]
https://api.cloudcheckr.com/api/best_practice.xml/get_best_practices?access_key=[access_key]&use_cc_account_id=[MyAccountId]

JSON call:

https://api.cloudcheckr.com/api/best_practice.json/get_best_practices?access_key=[access_key]&use_account=[MyAccount]
https://api.cloudcheckr.com/api/best_practice.json/get_best_practices?access_key=[access_key]&use_cc_account_id=[MyAccountId]

USING ACCESS KEYS

CloudCheckr requires an Access Key to be passed as a parameter to all API calls.

Click here for details on creating and managing Access Keys.

Example of using an Access Key:

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

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

56422A55E6B340239D6F473726128F979A86766B738C4BD1AC29F1F42DFEF55A

Putting it all together:

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

PREFERRED HTTP METHODS

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

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

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


API CALLS

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}

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