Azure API Reference Guide

Below is the list of CloudCheckr API calls specific to Microsoft Azure.

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.

Add Azure CSP Account

The API method, “add_azure_csp_account”, is used to register an Azure Cloud Solution Provider (CSP) account with CloudCheckr. This method will return a unique ID to enhance security for the newly created account that can be used for the parameter “use_cc_account_id” when making calls to the admin-level API.

Note:

  • This call can only be made using an admin-level access key.
  • The HTTP method for this call is POST.
  • Azure parameters typically contain special characters. 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 an input parameter.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level API key
account_name string optional; the name of the Azure account used to register with CloudCheckr
azure_ad_id string optional; Azure Active Directory ID
azure_ad_user_name string optional; Azure Active Directory username
azure_ad_user_password string optional; Azure Active Directory password
azure_app_id string optional; Azure Native App ID

OUTPUT PARAMETERS:

Parameter Type Description
account_status string indicates success or failure with creating the account
cc_account_id string unique account ID used in CloudCheckr
credential_status string status message indicating the result of validating the Azure credentials (if provided in the request)
role_account_id string role account ID

API CALL URL:

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

REQUEST EXAMPLE:

curl -X POST \
                -- https://api.cloudcheckr.com/api/account.[json|xml]/add_azure_csp_account?access_key=your_admin_access_key\
                -- header 'cache-control: no-cache' \
                -- header 'content-type: application/[json|xml]' \
                -- data '{
          	       "account_name": "New Azure CSP Account",
          	       }

RESPONSE EXAMPLE:
XML:

<AddAzureCSPAccountResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
             <account_status>Success</account_status>
             <cc_account_id>9999</cc_account_id>
             <credential_status>Azure credentials applied.</credential_status>
             <role_account_id>CC-99999999999999999999999999999999</role_account_id>
          </AddAzureCSPAccountResponse>
          

JSON:

{
             "account_status":"Success",
             "cc_account_id":9999,
             "credential_status":"Azure credentials applied.",
             "role_account_id":"CC-99999999999999999999999999999999",
             "cc_external_id":null
          }

Add Azure EA Account

The API method, “add_azure_ea_account”, is used to  register an Azure Enterprise Agreement (EA) account with CloudCheckr. This method will return a unique ID to enhance security for the newly created account that can be used for the parameter, “use_cc_account_id”, when making calls to the admin-level API.

Note:

  • This call can only be made using an admin-level access key
  • The HTTP method for this call is POST
  • Azure parameters 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 an input parameter.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level API key
use_cc_account_id string required; the Account ID (Project ID) of the CloudCheckr account to update
azure_enrollment_number string required; Azure enrollment number associated with the CloudCheckr account
azure_api_access_key string required; Azure API access key (token)

API CALL URL:

https://api.cloudcheckr.com/api/account.[json|xml]/add_azure_ea_account?access_key=your_admin_access_key&use_cc_account_id=1234&azure_enrollment_number=[azure_enrollment_number]&azure_api_access_key=[azure_api_access_key]

REQUEST EXAMPLE:

curl -X POST \
                          -- https://api.cloudcheckr.com/api/account.[json|xml]/add_azure_ea_account?access_key=your_admin_access_key\
                          -- header 'cache-control: no-cache' \
                          -- header 'content-type: application/[json|xml]' \
                          -- data '{
          	                 "account_name": "New Azure EA Account",
          	                 }

RESPONSE EXAMPLE:
XML:

<AddAzureCSPAccountResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
             <account_status>Success</account_status>
             <cc_account_id>9999</cc_account_id>
             <credential_status>Azure credentials applied.</credential_status>
             <role_account_id>CC-99999999999999999999999999999999</role_account_id>
          </AddAzureCSPAccountResponse>
          

JSON:

{
          "account_status": "Success",
          "cc_account_id": 9999,
          "credential_status": "Azure credentials applied.",
          "role_account_id": "CC-99999999999999999999999999999999",
          "cc_external_id": null
          }

Add Azure Inventory Account

The API method, “add_azure_inventory_account”, is used to register an Azure Subscription account with CloudCheckr. This method will return a unique ID to enhance security for the newly created account that can be used for the parameter “use_cc_account_id” when making calls to the admin-level API.

Note:

  • This call can only be made using an admin-level access key.
  • The HTTP method for this call is POST.
  • Azure parameters 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 an input parameter.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level API key
account_name string optional; the name of the Azure account used to register with CloudCheckr
azure_ad_id string optional; Azure Active Directory ID
azure_app_id string optional; Azure App ID
azure_api_access_key string optional; Azure API access key (token)
azure_subscription_id string optional; Azure Active Directory Subscription ID
azure_offer_id string optional; Azure Offer ID

OUTPUT PARAMETERS:

Parameter Type Description
account_status string indicates success or failure about creating the account
cc_account_id string unique account ID used in CloudCheckr
credential_status string status message indicating the result of validating the Azure credentials (if provided in the request)
role_account_id string role account ID

API CALL URL:

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

REQUEST EXAMPLE:

curl -X POST \
                          -- https://api.cloudcheckr.com/api/account.[json|xml]/add_azure_inventory_account?access_key=your_admin_access_key\
                          -- header 'cache-control: no-cache' \
                          -- header 'content-type: application/[json|xml]' \
                          -- data '{
          	                 "account_name": "New Azure Inventory Account",
          	                 }

RESPONSE EXAMPLE:
XML:

<AddAzureInventoryAccountResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
           <account_status>Success</account_status>
           <cc_account_id>9999</cc_account_id>
           <credential_status>Azure credentials applied.</credential_status>
           <role_account_id>CC-99999999999999999999999999999999</role_account_id>
          </AddAzureInventoryAccountResponse>
          

JSON:

{
          "account_status": "Success",
          "cc_account_id": 9999,
          "credential_status": "Azure credentials applied.",
          "role_account_id": "CC-99999999999999999999999999999999",
          "cc_external_id": null
          }

Edit Azure CSP Credential

The API method, “edit_azure_csp_account”, is used used to change the credentials on an Azure Cloud Solution Provider (CSP) account with CloudCheckr.

Note:

  • This call can only be made using an admin-level access key.
  • The HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level API key
use_cc_account_id string required; the Account ID (Project ID) of the CloudCheckr account to update
azure_ad_user_name string required; Azure Active Directory username
azure_ad_user_password string required; Azure Active Directory password
azure_app_id string required; Azure Native App ID

API CALL URL:

https://api.cloudcheckr.com/api/account.[json|xml]/edit_azure_csp_account?access_key=your_admin_access_key&use_cc_account_id=cc_account_id&azure_ad_user_name=azure_ad_user_name&azure_ad_user_password=azure_ad_user_password&azure_app_id=azure_app_id

REQUEST EXAMPLE:

curl -X POST \
                          -- https://api.cloudcheckr.com/api/account.[json|xml]/edit_azure_csp_account?access_key=your_admin_access_key&use_cc_account_id=cc_account_id&azure_ad_user_name=azure_ad_user_name&azure_ad_user_password=azure_ad_user_password&azure_app_id=azure_app_id\
                          -- header 'cache-control: no-cache' \
                          -- header 'content-type: application/[json|xml]' \
                          -- data '{
          	                 "use_cc_account_id": 111,
                                   "azure_ad_user_name": [email protected],
                                   "zure_ad_user_password": "Active Directory User Password",
                                   "azure_app_id": f11g4042-5286-5d68-6b18-3623cd8f6cg5
          	                 }

RESPONSE EXAMPLE:
XML:

<EditAzureCSPAccountResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
           <code>200</code>
           <message>Azure credentials updated.</message>
           </EditAzureCSPAccountResponse>
          

JSON:

{
          "code": "200",
          "message": "Azure credentials updated."
          }

Edit Azure EA Credential

The API method, “edit_azure_ea_account”, is used used to change the credentials on an Azure Enterprise Agreement (EA) account with CloudCheckr.

Note:

  • This call can only be made using an admin-level access key.
  • The HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level API key
use_cc_account_id string required; the Account ID (Project ID) of the CloudCheckr account to update
azure_enrollment_number string required; Azure enrollment number to associate with the CloudCheckr account
azure_api_access_key string required; Azure API access key (token)

API CALL URL:

https://api.cloudcheckr.com/api/account.[json|xml]/edit_azure_ea_account?access_key=your_admin_access_key&use_cc_account_id=1234&azure_enrollment_number=[azure_enrollment_number]&azure_api_access_key=[azure_api_access_key]

REQUEST EXAMPLE:

curl -X POST \
                          -- https://api.cloudcheckr.com/api/account.[json|xml]/edit_azure_ea_account?access_key=[access_key]&use_cc_account_id=1234&azure_enrollment_number=[azure_enrollment_number]&azure_api_access_key=[azure_api_access_key]\
                          -- header 'cache-control: no-cache' \
                          -- header 'content-type: application/[json|xml]' \
                          -- data '{
          	                 "use_cc_account_id": 111,
                                   "azure_enrollment_number": "Azure Enrollment number",
                                   "azure_api_access_key": "Azure API access key"
          	                 }

RESPONSE EXAMPLE:
XML:

<EditAzureEAAccountResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
           <code>200</code>
           <message>Azure credentials updated.</message>
           </EditAzureEAAccountResponse>
          

JSON:

{
          "code": "200",
          "message": "Azure credentials updated."
          }

Edit Azure Inventory Credential

The API method, “edit_azure_inventory_credential”, is used used to change the credentials on an Azure Subscription account with CloudCheckr.

Note:

  • This call can only be made using an admin-level access key.
  • The HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level API key
use_cc_account_id string required; the Account ID (Project ID) of the CloudCheckr account to update
azure_app_id string required; Azure Native App ID
azure_api_access_key string required; Azure API access key (token)

API CALL URL:

https://api.cloudcheckr.com/api/account.[json|xml]/edit_azure_inventory_credential?access_key=your_admin_access_key&use_cc_account_id=1234&azure_app_id=[azure_app_id]&azure_api_access_key=[azure_api_access_key]

REQUEST EXAMPLE:

curl -X POST \
                          -- https://api.cloudcheckr.com/api/account.[json|xml]/edit_azure_inventory_credential?access_key=your_admin_access_key&use_cc_account_id=1234&azure_app_id=[azure_app_id]&azure_api_access_key=[azure_api_access_key]\
                          -- header 'cache-control: no-cache' \
                          -- header 'content-type: application/[json|xml]' \
                          -- data '{
          	                 "use_cc_account_id": 111,
                                   "azure_app_id": "Azure App ID",
                                   "azure_api_access_key": "Azure API access key"
          	                 }

RESPONSE EXAMPLE:
XML:

<EditAzureInventoryAccountResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
           <code>200</code>
           <message>Azure credentials updated.</message>
           </EditAzureInventoryAccountResponse>
          

JSON:

{
          "code": "200",
          "message": "Azure credentials updated."
          }

Get Best Practices V2

The API method “best_practice/get_best_practices_v2” is used to:

  • pull the list of best practice results from a CloudCheckr account
  • show ignored checks and the reasons for those ignored items
  • report back the CIS benchmark information associated with the BPC

INPUT PARAMETERS:

Parameter Type Description
access_key string required; account-level API key
include_compliance_checks boolean optional; will report back the CIS benchmark information associated with the BPC; accepts true or false
date DateTime optional; date to pull the list of Best Practice results; used to access historical data
category string optional; category of the Best Practice report to pull; accepts Security, Cost, Availability, and/or Usage
importance string optional; the importance level of the Best Practice checks to pull; accepts ShowAll, High, Medium, Low, Informational, InformationAndHigher, LowAndHigher, and MediumAndHigher
all_result boolean optional; allows you to pull all results from the Best Practice report even if there are no issues with the report; accepts true or false
azure_account_ids string optional/multi-account view (MAV) only; return statistics from these accounts
bpc_id string optional; allows you to pull results for a specific Best Practice ID number
include_advisor_bpcs string optional; when specified as yes , 1 , or true , the response will also include Azure Advisor BPCs

Note: To get a list of available ID numbers, pull a list of results without specifying an ID.

API CALL URL:

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

REQUEST EXAMPLE:

XML:

<GetBestPracticesResponseV2
            xmlns:xsd='http://www.w3.org/2001/XMLSchema'
            xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
            <BestPracticeChecks>
              <BestPracticeCheckV2>
                <CheckId>441</CheckId>
                <Name>Contact Details on AWS Accounts Are Not Up-To-Date</Name>
                <Category>Security</Category>
                <Importance>High</Importance>
                <CountOfResults>1</CountOfResults>
                <ScanResultId>423</ScanResultId>
                <Results>
                  <Result>Contact Details: Not Updated</Result>
                </Results>
                <Ignored>false</Ignored>
                <IgnoredReason></IgnoredReason>
                <ComplianceFrameworks>
                  <ComplianceFramework>
                    <Name>CIS Benchmark</Name>
                    <ComplianceChecks>
                      <ComplianceCheck>
                        <ControlNumber>1.19</ControlNumber>
                        <ControlName>Maintain current contact details</ControlName>
                      </ComplianceCheck>
                    </ComplianceChecks>
                  </ComplianceFramework>
                </ComplianceFrameworks>...
              </BestPracticeCheckV2>
            </BestPracticeChecks>
          </GetBestPracticesResponseV2>

JSON:

{
             "BestPracticeChecks": {
                "BestPracticeCheckV2": {
                   "CheckId": "441",
                   "Name": "Contact Details on AWS Accounts Are Not Up-To-Date",
                   "Category": "Security",
                   "Importance": "High",
                   "CountOfResults": "1",
                   "ScanResultId": "423",
                   "Results": {
                      "Result": "Contact Details: Not Updated"
                   },
                   "Ignored": "false",
                   "IgnoredReason": "",
                   "ComplianceFrameworks": {
                      "ComplianceFramework": {
                         "Name": "CIS Benchmark",
                         "ComplianceChecks": {
                            "ComplianceCheck": {
                               "ControlNumber": "1.19",
                               "ControlName": "Maintain current contact details"
                            }
                         }
                      }
                   },
                   "__text": "..."
                }
             }
          }
          

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 the user interface, choose Cost > Tagging > Tagging Rules.

Once in the Tagging Rules report, click New Rule.

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
azure_consumed_services list<string> required; the Azure resource(s)
azure_subscriptions list<string> required; the Azure subscription(s)

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_access_key
               -- header 'cache-control: no-cache' \
               -- header 'content-type: application/[json|xml]' \
               -- data '{
                  "name": "Azure Tag Rule",
                  "tags": {
                    "TagKey": "TagValue",
                    "TagKey2": "*"
                  },
                    "region": "US East",
                    "azure_consumed_service": "*",
                    "azure_subscriptions": [
                         "4dc76947-2789-4149-bc29-3b7bd45ce4a8",
                         "b9e7ac32-fcba-4090-a249-d8a240d356ac"
              ]
          }

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

Add Custom Billing Charge - Fixed

The API method, “azure_add_custom_billing_charge_fixed”, is used to add a custom billing charge that applies a fixed charge or credit in an Azure account.

To add a fixed charge or credit, go to the left navigation pane, choose Cost > Azure Partner Tools > Configure > Custom 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
name string required; name of the custom billing charge
description string required; human-friendly description of the custom billing charge
subscriptions List<string> optional; comma-separated list of subscriptions that you can apply to the charges

Note: * = one of these parameters must be defined
Note: The end date is only required if you select the monthly recurring option.

API CALL URL:

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

RESPONSE EXAMPLE:

curl -X POST \
                          --'https://localhost/api/billing/[json|xml]/azure_add_custom_billing_charge_fixed?access_key=46YI9Z8T5JQR353JU63BM88AK99T0FIL67T93QSPX76303C2H17HXS3316CL2N50&use_cc_account_id=3' \
                         --header 'cache-control: no-cache' \
                         --header 'content-type: application/[json|xml]' \
                         --data '{
          	               "description": "example custom billing charge",
                                 "name": "example name",
                                 "charge_value": 111.5,
                                 "subscriptions": ["71c1d715-a1ce-48d9-b77c-03c00b4463a71","4dc76947-2789-4149-bc29-3b7bd45ce4a8", "07d18ff4-0bea-44e8-bd86-82a7df2e91bc", "8cbaba05-bfe1-426f-b4f7-7378ea754c1e"],
          	              "startdate":  "1970-01-01",
                                "end_date": "2063-04-05",
                  "is_recurring": true }
          	              }
          

RESPONSE EXAMPLE:
XML:

<AzureAddCustomBillingChargeFixedResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
           <code>200</code>
           <message>OK</message>
          </AzureAddCustomBillingChargeFixedResponse>
          

JSON:

{
          "code": "200",
          "message": "OK"
          }

Add Custom Billing Charge - Monthly Percent

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

To add a custom monthly precent discount or premium, go to the left navigation pane, choose Cost > Azure Partner Tools > Configure > Custom 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
name string required; name of the custom billing charge
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
applyPercentageTo CostBasline required; indicates the cost type  that the custom billing charge will apply to
subscription List<string> optional; comma-separated list of subscriptions where the custom billing charge can be applied; defaults to all subscriptions
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
consumedService List<string> optional; comma-separated list of consumed services where the custom billing charge can be applied; defaults to all
category List<string> optional; comma-separated list of categories where the custom billing charge can be applied; defaults to all
subCategory List<string> optional; comma-separated list of sub-categories where the custom billing charge can be applied; defaults to all
meterName List<string> optional; comma-separated list of meter names where the custom billing charge can be applied; defaults to all
tags 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; custom billing charges with no end date will apply until the end of time

API CALL URL:

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

REQUEST EXAMPLE:

curl -X POST \
                          -- 'https://api.cloudcheckr.com/api/billing.[json|xml]/add_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 '{
                                 "name": "example custom billing charge name",
          	               "description": "example custom billing charge description",
          	               "percentageValue": 10.5,
          	               "minimumCharge": 5000, "maximumCharge": 10000,
          	               "costBaseline": "Cost", "ListCost", "RetailCost"
          	               "subscriptions": "example subscription",
          	               "region": ["1","2"],
          	               "consumedService": ["VirtualNetwork","Compute"],
          	               "category": ["Networking"],
                                 "subCategory": ["PublicIPAddresses"],
                                 "meterName": ["StandardIOTableGB"],
          	               "tag": ["environment"],
          	               "startDate": "1970-01-01", "endDate": "2063-04-05"
          }

RESPONSE EXAMPLE:
XML:

<AzureAddCustomBillingChargeMonthlyPercentResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
           <code>200</code>
           <message>OK</message>
          </AzureAddCustomBillingChargeMonthlyPercentResponse>
          

JSON:

{
          "code": "200",
          "message": "OK"
          }

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

Get Detailed Billing 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 > Azure Billing > Custom Reports > Advanced Grouping.
Note:

  • The HTTP method for this call is GET.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; 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

API CALL URL:

https://api.cloudcheckr.com/api/ReportPdfDownload.[json|xml]/get_billing_detailed_grouped_pdf

REQUEST 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]'
            

RESPONSE EXAMPLE:
XML:

<GetBillingDetailedGroupedPdfResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
           <code>200</code>
           <message>OK</message>
          </GetBillingDetailedGroupedPdfResponse>
          

JSON:

{
          "code": "200",
          "message": "OK"
          }

Get Detailed Billing With Grouping By Currency

The API method, “get_detailed_billing_with_grouping_by_currency”, is used to pull results from a saved filter in the Advanced Grouping (w/tags) report. It is identical to the “/billing/get_detailed_billing_with_grouping_v2” call with an additional grouping on currency.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; standard access key required for all API calls
saved_filter_name string required; the name of the saved filter from which to pull the results
use_account string *required; friendly name of the account in CloudCheckr; must be a payer account in CloudCheckr
use_cc_account_id string *required; unique account ID used in CloudCheckr; must be a payer account in CloudCheckr
with_costs_by_group string optional; retrieves costs per group; accepts true/false; defaults to true if not specified
with_costs_by_time string optional; retrieves costs per time period; accepts true/false; defaults to true if not specified
start string optional; returns costs after the specified date
end string optional; returns costs before the specified date

Note: One of the * parameters must be defined.
Note: If the start and end are not defined, the application will return the last 14 days.

API CALL URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/get_detailed_billing_with_grouping_by_currency?access_key=your_access_key&start=2013-11-08&end=2013-11-15&saved_filter_name=group2filter

REQUEST EXAMPLE:

curl -X GET \
                                   -- https://api.cloudcheckr.com/api/billing.[json|xml]/get_detailed_billing_with_grouping_by_currency?access_key=your_access_key&start=2013-11-08&end=2013-11-15&saved_filter_name=group2filteraccess_key=your_admin_access_key&use_cc_account_id=1234'\
                                   -- header 'cache-control: no-cache' \
                                   -- header 'content-type: application/[json|xml]' \
                                

RESPONSE EXAMPLE:

XML:

<GetDetailedBillingWithGroupingByCurrencyResponse
          xmlns:xsd='http://www.w3.org/2001/XMLSchema"'
          xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
             <Currency>USD</Currency>
          	<Total>30.79834162</Total>
          	<Max>30.79834162</Max>
          	<Min>30.79834162</Min>
          	<Average>30.798698086413037</Average>
          	<CostsByGroup>
          		<GroupName>Service</GroupName>
          		<GroupValue>AmazonS3</GroupValue>
          		<FriendlyName>S3</FriendlyName>
          		<Cost>0.1099985400</Cost>
          		<NextLevel>
          			<GroupName>aws:createdBy</GroupName>
          			<GroupValue>IAMUser:AIDAI5X7LBFKDHYFABCDE:mikeb</GroupValue>
          			<FriendlyName></FriendlyName>
          			<Cost>0.1083478400</Cost>
          		</NextLevel>
          	</CostsByGroup>
          	<CostsByGroup>
          		<GroupName>Service</GroupName>
          		<GroupValue>AmazonEC2</GroupValue>
          		<FriendlyName>EC2</FriendlyName>
          		<Cost>22.6078574000</Cost>
          		<NextLevel>
          			<GroupName>aws:createdBy</GroupName>
          			<GroupValue>IAMUser:AIDAI4NZVQK6IW45ABCDE:paul.vanw</GroupValue>
          			<FriendlyName></FriendlyName>
          			<Cost>0.0750056100</Cost>
          		</NextLevel>
          	</CostsByGroup>
          	<CostsByTime>
          		<Groups>
          			<GroupName>Service</GroupName>
          			<GroupValue>AmazonEC2</GroupValue>
          			<FriendlyName>EC2</FriendlyName>
          		</Groups>
          		<Groups>
          			<GroupName>aws:createdBy</GroupName>
          			<GroupValue>IAMUser:AIDAI4NZVQK6IW45ABCDE:paul.vanw</GroupValue>
          			<FriendlyName></FriendlyName>
          		</Groups>
          		<CostDates>
          			<Date>1/20/2017 12:00:00 AM</Date>
          			<Cost>0.0750056100</Cost>
          			<UsageQuantity>24.0000619600</UsageQuantity>
          		</CostDates>
          	</CostsByTime>
          	<CostsByTime>
          		<Groups>
          			<GroupName>Service</GroupName>
          			<GroupValue>AmazonS3</GroupValue>
          			<FriendlyName>S3</FriendlyName>
          		</Groups>
          		<Groups>
          			<GroupName>aws:createdBy</GroupName>
          			<GroupValue>IAMUser:AIDAI5X7LBFKDHYFABCDE:mikeb</GroupValue>
          			<FriendlyName></FriendlyName>
          		</Groups>
          		<CostDates>
          			<Date>1/20/2017 12:00:00 AM</Date>
          			<Cost>0.1083478400</Cost>
          			<UsageQuantity>418.5352970600</UsageQuantity>
          		</CostDates>
          	</CostsByTime>
          </GetDetailedBillingWithGroupingByCurrencyResponse>
          

JSON:

{
            {
            "Currency": "USD",
            "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"
                  }
                ]
              }
            ]
          }
          

Get Detailed Billing With Grouping V2

The API method, “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.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; standard access key required for all API calls
saved_filter_name string required; the name of the saved filter from which to pull the results
use_account string *required; friendly name of the account in CloudCheckr; must be a payer account in CloudCheckr
use_cc_account_id string *required; unique account ID used in CloudCheckr; must be a payer account in CloudCheckr
with_costs_by_group string optional; retrieves costs per group; accepts true/false; defaults to true if not specified
with_costs_by_time string optional; retrieves costs per time period; accepts true/false; defaults to true if not specified
start string optional; returns costs after the specified date
end string optional; returns costs before the specified date

Note: One of the * parameters must be defined.
Note: If the start and end are not defined, the application will return the last 14 days.

API CALL URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/get_detailed_billing_with_grouping_v2?access_key=your_access_key&start=2013-11-08&end=2013-11-15&saved_filter_name=group2filter

REQUEST EXAMPLE:

curl -X GET \
                                   -- https://api.cloudcheckr.com/api/billing.[json|xml]/get_detailed_billing_with_grouping_v2?access_key=your_access_key&start=2013-11-08&end=2013-11-15&saved_filter_name=group2filteraccess_key=your_admin_access_key&use_cc_account_id=1234'\
                                   -- header 'cache-control: no-cache' \
                                   -- header 'content-type: application/[json|xml]' \

RESPONSE EXAMPLE:

XML:

<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:

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

Get Tag Rules

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

The preferred HTTP method for this call is GET.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; standard access key

API CALL URL:

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

REQUEST EXAMPLE:

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

RESPONSE EXAMPLE:
XML:

<GetTagRuleResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
              <tag_rules>
                  <TagRuleDto>
                      <tag_rule_id>79</tag_rule_id>
                      <name>Cost Center</name>
                  </TagRuleDto>
                  <TagRuleDto>
                      <tag_rule_id>80</tag_rule_id>
                      <name>Services</name>
                  </TagRuleDto>
              </tag_rules>
          </GetTagRuleResponse>

JSON:

{
              "tag_rules": [
                  {
                      "tag_rule_id": 79,
                      "name": "Cost Center"
                  },
                  {
                      "tag_rule_id": 80,
                      "name": "Services"
                  }
              ]
          }

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 the user interface, choose Cost > Tagging > Tagging Rules.

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

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
azure_consumed_services list<string> required; the Azure resource(s)
azure_subscriptions list<string> required; the Azure subscription(s)

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]/update_tag_rule?access_key=your_access_key
               -- header 'cache-control: no-cache' \
               -- header 'content-type: application/[json|xml]' \
               -- data '{
                  "tag_rule_id": "94",
                  "name": "Azure Tag Rule",
                  "tags": {
                    "TagKey": "TagValue",
                    "TagKey2": "*"
                  },
                    "region": "US East",
                    "azure_consumed_service": "*",
                    "azure_subscriptions": [
                         "4dc76947-2789-4149-bc29-3b7bd45ce4a8",
                         "b9e7ac32-fcba-4090-a249-d8a240d356ac"
              ]
          }

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 Resources Virtual Machine Details

The API method, “get_resources_virtual_machine_details”, is used to to pull the data for the list of Virtual Machines report from CloudCheckr.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; standard access key required
use_cc_account_id string required/optional; unique account ID used in CloudCheckr; must be a payer account in CloudCheckr

Note: Required if the access key represents an administrator account.

date string optional; return report from this date; if date is not defined, the most recent report will be returned; recommended date format is mm/dd/yyyy.

API CALL URL:

https://api.cloudcheckr.com/api/inventory.json/get_resources_virtual_machine_details?access_key=your_access_key&use_cc_account_id=1234

REQUEST EXAMPLE:

curl -X GET \
                 -- https://api.cloudcheckr.com/api/account.[json|xml]/add_account_v3?access_key=your_admin_access_key&use_cc_account_id=1234'\
                 -- header 'cache-control: no-cache' \
                 -- header 'content-type: application/[json|xml]' \

RESPONSE EXAMPLE:
XML:

<GetResourcesVirtualMachineDetailsResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
          <DateOfResults>2017-09-26T15:36:43</DateOfResults>
          	<TotalCount>1</TotalCount>
          	<Count>1</Count>
          	<VirtualMachines>
          		<SubscriptionId>11111111-2222-3333-4444-555555555555</SubscriptionId>
          		<LocationName>East US</LocationName>
          		<Name>ManagedDisk</Name>
          		<State>Running</State>
          		<Url>/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/CLOUDCHECKR/providers/Microsoft.Compute/virtualMachines/ManagedDisk</Url>
          		<LicenseType />
          		<VmSize>Basic_A0</VmSize>
          		<Offer>WindowsServer</Offer>
          		<Sku />
          		<Version />
          		<OsType>Windows</OsType>
          		<DiskName>ManagedDisk_OsDisk_1_72e7bb21920e486aa9ddc5da4532980e</DiskName>
          		<DiskUri />
          		<DiskCaching>ReadWrite</DiskCaching>
          		<DiskCreateOption>FromImage</DiskCreateOption>
          		<ComputerName>ManagedDisk</ComputerName>
          		<PrivateDnsName />
          		<PrivateIpAddress />
          		<PublicDnsName />
          		<PublicIpAddress />
          		<SubnetId />
          		<AvgCpuForLast7Days>1.9828732800284399</AvgCpuForLast7Days>
          		<AvgCpuForLast30Days />
          		<AvgCpuForLast90Days />
          		<HighCpuPercent>90</HighCpuPercent>
          		<LowCpuPercent>5</LowCpuPercent>
          		<AvgNetworkInLast30Days />
          		<AvgNetworkOutLast30Days />
          		<HoursCpuUtilAbove80>0</HoursCpuUtilAbove80>
          		<HoursCpuUtilBelow80>0</HoursCpuUtilBelow80>
          		<HoursCpuUtilBelow60>0</HoursCpuUtilBelow60>
          		<HoursCpuUtilBelow40>0</HoursCpuUtilBelow40>
          		<HoursCpuUtilBelow20>0</HoursCpuUtilBelow20>
          		<HoursHighCpuLast7Days>0</HoursHighCpuLast7Days>
          		<HoursHighCpuLast30Days>0</HoursHighCpuLast30Days>
          		<HoursHighCpuLast90Days />
          		<HoursLowCpuLast7Days>0</HoursLowCpuLast7Days>
          		<HoursLowCpuLast30Days>0</HoursLowCpuLast30Days>
          		<HoursLowCpuLast90Days />
          		<HoursRunningLast7Days />
          		<HoursRunningLast30Days />
          		<HoursRunningLast90Days />
          		<MinimumCpuUtilization />
          		<MinimumCpuUtilizationDateTime />
          		<PeakCpuUtilization />
          		<PeakCpuUtilizationDateTime />
                          <ScaleSets>ScaleSetName</ScaleSets>
          		<Tags>
          			<TagName>Creator</TagName>
          			<TagValue>John Doe</TagValue>
          		</Tags>
          	</VirtualMachines>
          	<HasNext>false</HasNext>
          	<NextToken></NextToken>
          </GetResourcesVirtualMachineDetailsResponse>

JSON:

{
              "DateOfResults": "2017-09-26T15:36:43",
              "TotalCount": 1,
              "Count": 1,
              "VirtualMachines": [
                  {
          			"SubscriptionId": "11111111-2222-3333-4444-555555555555",
                      "LocationName": "East US",
                      "Name": "ManagedDisk",
                      "State": "Running",
                      "Url": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/CLOUDCHECKR/providers/Microsoft.Compute/virtualMachines/ManagedDisk",
                      "LicenseType": null,
                      "VmSize": "Basic_A0",
                      "Offer": "WindowsServer",
                      "Sku": null,
                      "Version": null,
                      "OsType": "Windows",
                      "DiskName": "ManagedDisk_OsDisk_1_72e7bb21920e486aa9ddc5da4532980e",
                      "DiskUri": null,
                      "DiskCaching": "ReadWrite",
                      "DiskCreateOption": "FromImage",
                      "ComputerName": "ManagedDisk",
                      "PrivateDnsName": null,
                      "PrivateIpAddress": null,
                      "PublicDnsName": null,
                      "PublicIpAddress": null,
                      "SubnetId": null,
                      "AvgCpuForLast7Days": 1.9828732800284399,
                      "AvgCpuForLast30Days": null,
                      "AvgCpuForLast90Days": null,
                      "HighCpuPercent": 90,
                      "LowCpuPercent": 5,
                      "AvgNetworkInLast30Days": null,
                      "AvgNetworkOutLast30Days": null,
                      "HoursCpuUtilAbove80": 0,
                      "HoursCpuUtilBelow80": 0,
                      "HoursCpuUtilBelow60": 0,
                      "HoursCpuUtilBelow40": 0,
                      "HoursCpuUtilBelow20": 0,
                      "HoursHighCpuLast7Days": 0,
                      "HoursHighCpuLast30Days": 0,
                      "HoursHighCpuLast90Days": null,
                      "HoursLowCpuLast7Days": 0,
                      "HoursLowCpuLast30Days": 0,
                      "HoursLowCpuLast90Days": null,
                      "HoursRunningLast7Days": null,
                      "HoursRunningLast30Days": null,
                      "HoursRunningLast90Days": null,
                      "MinimumCpuUtilization": null,
                      "MinimumCpuUtilizationDateTime": null,
                      "PeakCpuUtilization": null,
                      "PeakCpuUtilizationDateTime": null,
                      "ScaleSets": ScaleSetName,
                      "Tags": [
                          {
                              "TagName": "Creator",
                              "TagValue": "John Doe"
                          }
                      ]
                  }
              ],
              "HasNext": false,
              "NextToken": ""
          }
          

How did we do?