├── CNAME ├── .DS_Store ├── favicon.ico ├── images ├── api-key.png ├── logo-white.png ├── my-profile.png ├── _screenshot.png ├── report-terms.png ├── time-indexes.png ├── user-profile.png ├── data-sub-rows.png ├── get-external-id.png ├── saved-report-id.png ├── generate-api-key.png ├── get-client-api-id.png ├── partner-cust-hier.png ├── tagging-workflow.png ├── dimension-data-rows.png ├── putting-it-together.png ├── vmw-aria-cost-icon.png ├── metadata-values-mapping.png ├── menu.svg ├── emblem.svg └── logo.svg ├── .gitignore ├── Gemfile ├── _includes ├── relative-src.html ├── syntax-highlight.html └── sidebar.html ├── _documentation ├── _defaults.md ├── getting_started.md ├── errors.md └── authentication.md ├── _sass ├── github.scss ├── _mixins.scss ├── colors.scss └── _borland.scss ├── css ├── editor.css └── style.scss ├── _azure-assignment ├── about-assignment-api.md ├── azure-account-assignment-read-single.md ├── azure-account-assignment-delete.md ├── azure-account-assignment-read.md └── azure-account-assignment-create.md ├── _partner ├── get-single-customer.md ├── customer-account-delete.md ├── get-client-api-id.md ├── get-all-customers.md ├── about-partner-api.md ├── get-customer-assets.md ├── use-client-api-id.md ├── get-single-govcloud-linkage.md ├── update-single-govcloud-linkage.md ├── linkage-post-data-format.md ├── list-govcloud-linkages.md ├── cust-statement-read-multiple.md ├── customer-account-modify.md ├── cust-statement-read-single.md ├── post-govcloud-account-linkage.md └── get-customer-reports.md ├── _organization ├── org-delete-v2.md ├── org-rate-limits.md ├── get-org-id.md ├── org-get-all-v2.md ├── org-allowed-account-get-v2.md ├── org-modify-v2.md ├── create-org-v2.md ├── about-org-api.md ├── org-account-assignment-get-v2.md ├── org-account-assignment-remove-v2.md ├── org-account-assignment-replace-v2.md └── org-account-assignment-append.md ├── _account ├── aws-account-read-single.md ├── aws-account-delete.md ├── external-id-get.md └── aws-account-read-multiple.md ├── _price-book ├── price-book-delete.md ├── price-book-delete-customer.md ├── price-book-delete-account.md ├── price-book-get-detail-xml.md ├── price-book-get-detail.md ├── about-price-book-api.md ├── price-book-get-account.md ├── price-book-get-customer.md ├── price-book-modify.md ├── price-book -get-specific-customer-assignments.md ├── price-book-modify-customer.md ├── price-book-modify-account.md ├── price-book-get-all-customers.md ├── price-book-get-all.md ├── price-book-get-all-accounts.md ├── price-book-assign-customer.md ├── price-book-add.md ├── price-book-aggregation-format.md └── price-book-test.md ├── _service-principal ├── service-principal-get-all.md ├── service-principal-get-detail.md ├── get-service-principal-id.md └── about-service-principal-api.md ├── _azure-partner ├── about-partner-api.md ├── get-all-customers-list.md ├── get-single-customers-list.md ├── get-client-api-id.md ├── get-customer-id.md ├── get-all-customers.md ├── get-single-customers.md ├── add-subscriptions-to-msp-client.md ├── get-all-subscriptions-from-msp-client.md ├── delete-subscriptions-from-msp-client.md └── customer-account-modify.md ├── _billing-rules ├── rule-get-single.md ├── about-billing-rule-api.md ├── rule-delete.md ├── get-ea-id.md └── get-rule-id.md ├── _policies ├── about-policy-api.md ├── get-policy-block.md └── get-policy-summary.md ├── _perspectives ├── get-perspective-id.md ├── about-perspectives-api.md ├── add-dynamic-group.md ├── get-perspective-version.md ├── get-all-perspectives.md ├── get-perspective-schema.md ├── delete-perspective-schema.md └── create-perspective-schema.md ├── _metrics ├── metrics-rate-limits.md └── about-metrics-api.md ├── _gcp-account ├── get-client-api-id.md ├── about-gcp-partner-api.md ├── get-billing-account-id.md ├── encode-json-key.md ├── get-all-accounts-list.md ├── get-single-accounts-list.md └── gcp-account-delete.md ├── _asset ├── about-asset-api.md ├── get-asset-list.md ├── asset-query-examples.md └── get-specific-asset.md ├── _sso ├── delete-sso-configuration.md ├── get-pending-domains.md ├── get-sso-configuration.md ├── validate-sso-domains.md └── configure-sso.md ├── _assignment ├── how-assignments-are-validated-v2.md ├── aws-account-assignment-delete-v2.md ├── aws-account-assignment-read-single-v2.md ├── aws-account-assignment-read-single.md ├── aws-account-assignment-delete.md ├── aws-account-assignment-read.md ├── about-assignment-api.md ├── aws-account-assignment-read-v2.md ├── aws-account-assignment-update.md ├── how-assignments-are-validated.md ├── aws-account-assignment-create.md └── aws-account-assignment-update-v2.md ├── LICENSE ├── _tagging ├── about-tagging-api.md ├── how-tags-are-processed.md └── post-tags-for-assets.md ├── _reporting ├── get-report-query.md ├── intro-to-reporting-api.md ├── add-filters-to-report-query.md ├── get-report-list.md ├── understand-time-filters.md └── get-standard-reports.md ├── README.md ├── Gemfile.lock ├── _layouts └── default.html ├── search.html ├── index.html ├── js └── main.js └── _config.yml /CNAME: -------------------------------------------------------------------------------- 1 | apidocs.cloudhealthtech.com -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloudHealth/cht_api_guide/HEAD/.DS_Store -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloudHealth/cht_api_guide/HEAD/favicon.ico -------------------------------------------------------------------------------- /images/api-key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloudHealth/cht_api_guide/HEAD/images/api-key.png -------------------------------------------------------------------------------- /images/logo-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloudHealth/cht_api_guide/HEAD/images/logo-white.png -------------------------------------------------------------------------------- /images/my-profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloudHealth/cht_api_guide/HEAD/images/my-profile.png -------------------------------------------------------------------------------- /images/_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloudHealth/cht_api_guide/HEAD/images/_screenshot.png -------------------------------------------------------------------------------- /images/report-terms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloudHealth/cht_api_guide/HEAD/images/report-terms.png -------------------------------------------------------------------------------- /images/time-indexes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloudHealth/cht_api_guide/HEAD/images/time-indexes.png -------------------------------------------------------------------------------- /images/user-profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloudHealth/cht_api_guide/HEAD/images/user-profile.png -------------------------------------------------------------------------------- /images/data-sub-rows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloudHealth/cht_api_guide/HEAD/images/data-sub-rows.png -------------------------------------------------------------------------------- /images/get-external-id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloudHealth/cht_api_guide/HEAD/images/get-external-id.png -------------------------------------------------------------------------------- /images/saved-report-id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloudHealth/cht_api_guide/HEAD/images/saved-report-id.png -------------------------------------------------------------------------------- /images/generate-api-key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloudHealth/cht_api_guide/HEAD/images/generate-api-key.png -------------------------------------------------------------------------------- /images/get-client-api-id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloudHealth/cht_api_guide/HEAD/images/get-client-api-id.png -------------------------------------------------------------------------------- /images/partner-cust-hier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloudHealth/cht_api_guide/HEAD/images/partner-cust-hier.png -------------------------------------------------------------------------------- /images/tagging-workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloudHealth/cht_api_guide/HEAD/images/tagging-workflow.png -------------------------------------------------------------------------------- /images/dimension-data-rows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloudHealth/cht_api_guide/HEAD/images/dimension-data-rows.png -------------------------------------------------------------------------------- /images/putting-it-together.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloudHealth/cht_api_guide/HEAD/images/putting-it-together.png -------------------------------------------------------------------------------- /images/vmw-aria-cost-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloudHealth/cht_api_guide/HEAD/images/vmw-aria-cost-icon.png -------------------------------------------------------------------------------- /images/metadata-values-mapping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloudHealth/cht_api_guide/HEAD/images/metadata-values-mapping.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | _site/ 2 | .sass-cache/ 3 | cloudhealth-swagger.json 4 | .idea/misc.xml 5 | .idea/modules.xml 6 | .idea/vcs.xml 7 | .idea/workspace.xml 8 | .idea/cht_api_guide.iml 9 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'jekyll', '3.6.2' 4 | 5 | group :jekyll_plugins do 6 | gem 'jekyll-seo-tag', '2.4.0' 7 | gem 'jekyll-sitemap', '1.1.1' 8 | end 9 | -------------------------------------------------------------------------------- /_includes/relative-src.html: -------------------------------------------------------------------------------- 1 | {% assign prefix = include.src | slice: 0, 2 %}{% assign protocol = include.src | slice: 0, 4 %}{% unless protocol == 'http' or prefix == "//" %}{{ site.baseurl }}{% endunless %}{{ include.src }} -------------------------------------------------------------------------------- /_includes/syntax-highlight.html: -------------------------------------------------------------------------------- 1 | {% capture highlight %} 2 | ``` {{ include.block.language }} 3 | {{ include.block.code_block }} 4 | ``` 5 | {: title="{{ include.block.title }}" } 6 | {% endcapture %} 7 | 8 | {{ highlight | markdownify }} -------------------------------------------------------------------------------- /images/menu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /_documentation/_defaults.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 3 | position: 4 | parameters: 5 | - name: 6 | content: 7 | content_markdown: 8 | left_code_blocks: 9 | - code_block: 10 | title: 11 | language: 12 | right_code_blocks: 13 | - code_block: 14 | title: 15 | language: 16 | --- 17 | -------------------------------------------------------------------------------- /_sass/github.scss: -------------------------------------------------------------------------------- 1 | .editor-link { 2 | float: right; 3 | border: 0; 4 | font-size: 1rem; 5 | padding: 5px 10px; 6 | margin: 0; 7 | color: #1EAEDB; 8 | 9 | &:before { 10 | content: '✏️'; 11 | padding-right: 3px; 12 | } 13 | &:hover { 14 | color: $cht-orange; 15 | } 16 | } 17 | 18 | .cms-editor-active .editor-link { 19 | display: inline-block; 20 | } 21 | -------------------------------------------------------------------------------- /images/emblem.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /css/editor.css: -------------------------------------------------------------------------------- 1 | .error, .warning, .info, .success { 2 | border-left: 5px solid #FD0; 3 | padding: 10px 15px; 4 | margin-left: -20px; 5 | margin-right: -15px; 6 | background-color: #FAFAFA; 7 | border-radius: 2px; 8 | } 9 | 10 | p.warning { 11 | border-color: #ffc107; 12 | } 13 | 14 | p.info { 15 | border-color: #56ADEC; 16 | } 17 | 18 | p.error { 19 | border-color: #F20; 20 | } 21 | 22 | p.success { 23 | border-color: #6c0; 24 | } -------------------------------------------------------------------------------- /_azure-assignment/about-assignment-api.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction to Partner Azure Account Assignment API 3 | description: An introduction to the Account Assignment API. 4 | position: 1 5 | parameters: 6 | - name: 7 | content: 8 | content_markdown: |- 9 | Use this API to administer Azure partner customer accounts that belong to CloudHealth Partners and to assign Azure partner customer accounts to Partner Customers for partner-generated billing purposes. 10 | --- 11 | -------------------------------------------------------------------------------- /_partner/get-single-customer.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get Single Customer 3 | position: 9 4 | description: Retrieve a specific customer tenant. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/customers/:customer_id 7 | right_code_blocks: 8 | - code_block: |- 9 | curl -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 'https://chapi.cloudhealthtech.com/v1/customers/' 10 | title: Sample Request 11 | language: bash 12 | --- 13 | -------------------------------------------------------------------------------- /_partner/customer-account-delete.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Delete Existing Customer 3 | position: 8 4 | description: Delete a partner customer tenant from the CloudHealth Platform. 5 | type: delete 6 | endpoint: https://chapi.cloudhealthtech.com/v1/customers/:customer_id 7 | right_code_blocks: 8 | - code_block: |- 9 | curl -X "DELETE" 'https://chapi.cloudhealthtech.com/v1/customers/' 10 | -H 'Authorization: Bearer ' 11 | title: Sample Request 12 | language: bash 13 | --- 14 | -------------------------------------------------------------------------------- /_organization/org-delete-v2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Delete Existing Organization 3 | position: 7 4 | description: Delete an organization from the CloudHealth Platform. 5 | type: delete 6 | endpoint: https://chapi.cloudhealthtech.com/v2/organizations/:org_id 7 | right_code_blocks: 8 | - code_block: |- 9 | curl --request DELETE -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 10 | 'https://chapi.cloudhealthtech.com/v2/organizations/' 11 | title: Sample Request 12 | language: bash 13 | --- 14 | -------------------------------------------------------------------------------- /_account/aws-account-read-single.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Single AWS Account 3 | position: 3 4 | description: Get information on a single AWS Account that is enabled in the CloudHealth Platform. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/aws_accounts/:id 7 | 8 | right_code_blocks: 9 | - code_block: |- 10 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' "https://chapi.cloudhealthtech.com/v1/aws_accounts/" 11 | title: Sample Request 12 | language: bash 13 | --- 14 | -------------------------------------------------------------------------------- /_price-book/price-book-delete.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Delete Existing Price Book 3 | position: 4 4 | description: Delete a custom price book from the CloudHealth Platform. 5 | type: delete 6 | endpoint: https://chapi.cloudhealthtech.com/v1/price_books/:price book id 7 | right_code_blocks: 8 | - code_block: |- 9 | curl --request DELETE -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 10 | 'https://chapi.cloudhealthtech.com/v1/price_books/' 11 | title: Sample Request 12 | language: bash 13 | --- 14 | -------------------------------------------------------------------------------- /_service-principal/service-principal-get-all.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get All Existing Service Principals 3 | position: 4 4 | description: Retrieve a list of all service principals. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/azure_service_principals 7 | right_code_blocks: 8 | - code_block: |- 9 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 10 | 'https://chapi.cloudhealthtech.com/v1/azure_service_principals/' 11 | title: Sample Request 12 | language: bash 13 | --- 14 | -------------------------------------------------------------------------------- /_azure-partner/about-partner-api.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction to Microsoft CSP Partner API 3 | position: 1 4 | description: An introduction to the Microsoft CSP Partner API. 5 | parameters: 6 | - name: 7 | content: 8 | content_markdown: |- 9 | Microsoft CSP partners and their customers are organized as tenants in a hierarchical, multi-tenant system in the Partner Platform. Customer tenants are subordinates of their corresponding Partner Tenant. 10 | 11 | The Partner API allows partners to add their customer tenants to the Partner Platform. 12 | --- 13 | -------------------------------------------------------------------------------- /_billing-rules/rule-get-single.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get Single Billing Rule 3 | position: 7 4 | description: Retrieve a specific billing rule. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/partner_billing_rules/:partner_billing_rule_id 7 | right_code_blocks: 8 | - code_block: |- 9 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 10 | 'https://chapi.cloudhealthtech.com/v1/partner_billing_rules/' 11 | title: Sample Request 12 | language: bash 13 | --- 14 | -------------------------------------------------------------------------------- /_service-principal/service-principal-get-detail.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Details of Service Principal 3 | position: 5 4 | description: Get details for a specific service principal. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/azure_service_principals/:sp_id 7 | right_code_blocks: 8 | - code_block: |- 9 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 10 | 'https://chapi.cloudhealthtech.com/v1/azure_service_principals//' 11 | title: Sample Request 12 | language: bash 13 | --- 14 | -------------------------------------------------------------------------------- /css/style.scss: -------------------------------------------------------------------------------- 1 | --- 2 | layout: null 3 | sitemap: false 4 | --- 5 | 6 | $brand-colour: #2d3b8f; 7 | 8 | $nav-header-height: 60px; 9 | $nav-background-color: #f5f5f5; 10 | $nav-width: 250px; 11 | 12 | $space: 20px; 13 | 14 | $mobile-break: 700px; 15 | 16 | $base-url: ''; 17 | 18 | @import "mixins"; 19 | @import "colors"; 20 | @import url('https://fonts.googleapis.com/css?family=Roboto:300,400,400i,500'); 21 | @import url('https://fonts.googleapis.com/css?family=Source+Code+Pro'); 22 | @import "main"; 23 | @import "borland"; 24 | @import "monaki"; 25 | @import "github"; 26 | -------------------------------------------------------------------------------- /_account/aws-account-delete.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Delete AWS Account 3 | position: 5 4 | description: Delete an AWS Account from the CloudHealth Platform. 5 | type: delete 6 | endpoint: https://chapi.cloudhealthtech.com/v1/aws_accounts/:id 7 | description: Delete an AWS Account from the CloudHealth Platform 8 | right_code_blocks: 9 | - code_block: |- 10 | curl --request DELETE -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 'https://chapi.cloudhealthtech.com/v1/aws_accounts/:id' 11 | title: Sample Request 12 | language: bash 13 | --- 14 | -------------------------------------------------------------------------------- /_price-book/price-book-delete-customer.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Delete Existing Price Book Customer Assignment 3 | position: 13 4 | description: Delete a custom price book's customer assignment. 5 | type: delete 6 | endpoint: https://chapi.cloudhealthtech.com/v1/price_book_assignments/:id 7 | right_code_blocks: 8 | - code_block: |- 9 | curl --request DELETE -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 10 | 'https://chapi.cloudhealthtech.com/v1/price_book_assignments/' 11 | title: Sample Request 12 | language: bash 13 | --- 14 | -------------------------------------------------------------------------------- /_billing-rules/about-billing-rule-api.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction to Billing Rule API 3 | position: 1 4 | description: An introduction to the Billing Rule API. 5 | parameters: 6 | - name: 7 | content: 8 | content_markdown: |- 9 | Partner Billing Rules allow partners to adjust AWS and Azure customer costs globally or for specific customers. CloudHealth applies these adjustments when generating the bills for individual customers. 10 | 11 | The Billing Rules API allows partner customers to create, modify, and delete AWS support and custom line item billing rules. 12 | --- 13 | -------------------------------------------------------------------------------- /_billing-rules/rule-delete.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Delete Existing Billing Rule 3 | position: 8 4 | description: Delete a billing rule from the CloudHealth Platform. 5 | type: delete 6 | endpoint: https://chapi.cloudhealthtech.com/v1/partner_billing_rules/:partner_billing_rule_id 7 | right_code_blocks: 8 | - code_block: |- 9 | curl --request DELETE -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 10 | 'https://chapi.cloudhealthtech.com/v1/partner_billing_rules/' 11 | title: Sample Request 12 | language: bash 13 | --- 14 | -------------------------------------------------------------------------------- /_price-book/price-book-delete-account.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Delete Existing Price Book Account Assignment 3 | position: 18 4 | description: Delete a custom price book's AWS account assignment. 5 | type: delete 6 | endpoint: https://chapi.cloudhealthtech.com/v1/price_book_account_assignments/:id 7 | right_code_blocks: 8 | - code_block: |- 9 | curl --request DELETE -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 10 | 'https://chapi.cloudhealthtech.com/v1/price_book_account_assignments/' 11 | title: Sample Request 12 | language: bash 13 | --- 14 | -------------------------------------------------------------------------------- /_policies/about-policy-api.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction to Policy API 3 | position: 1 4 | description: An introduction to the Policy API. 5 | content_markdown: |- 6 | The Policy API allows you to retrieve policy information and results. The API supports the following operations: 7 | * Retrieve policy, policy block, and policy violation data for your policies in the CloudHealth Platform. 8 | * For Partners, retrieve policy, policy block, and policy violation data for your partner customers' policies in the CloudHealth Platform. Limited to policies in the partner customer's default organization. 9 | --- 10 | -------------------------------------------------------------------------------- /_billing-rules/get-ea-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: How to Get Azure Enterprise Agreement ID 3 | position: 3 4 | content_markdown: |- 5 | In order to use some Billing Rule endpoints, you may need to provide the Azure Enterprise Agreement (EA) ID. CloudHealth generates a unique ID for each EA. You can get the Azure EA ID from the CloudHealth Platform. From the left menu, go to **Setup > Accounts > Azure Enrollment** and view or edit the EA. The Azure EA ID appears in the browser URL. Here's an example URL: 6 | 7 | ``` 8 | https://apps.cloudhealthtech.com/azure_enrollments/20XXXXXXX19/edit 9 | ``` 10 | 11 | Here, `20XXXXXXX19` is the Azure EA ID. 12 | --- 13 | -------------------------------------------------------------------------------- /_perspectives/get-perspective-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: How to Get Perspective ID 3 | position: 3 4 | content_markdown: |- 5 | In order to perform Get, Put, and Post operations using this API, you need to provide the ID of the Perspective that you want to manipulate. 6 | 7 | You can get the ID of a Perspective from the CloudHealth Platform. From the left menu, select **Setup > Perspectives** and click the Perspective that you want to manipulate. The ID of the Perspective appears in the browser URL. Here's an example URL: 8 | ``` 9 | https://apps.cloudhealthtech.com/perspectives/35261XXX012 10 | ``` 11 | 12 | Here, `35261XXX012` is the Perspective ID. 13 | --- 14 | -------------------------------------------------------------------------------- /_organization/org-rate-limits.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Rate Limits 3 | description: Understand rate limits when making requests to the Organization API. 4 | position: 3 5 | parameters: 6 | - name: 7 | content: 8 | content_markdown: |- 9 | CloudHealth limits the rate at the user, namely API key, level. 10 | - A total of 500 requests are allowed every ten minutes for the following endpoints: 11 | - [Create Organization](#organization_create-organization) 12 | - [Assign Account to Organization](#organization_assign-account-to-organization) 13 | - [Replace Existing Organization Account Assignment](#organization_replace-existing-organization-account-assignment) 14 | --- 15 | -------------------------------------------------------------------------------- /_azure-partner/get-all-customers-list.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get All Partner Customers 3 | position: 5 4 | description: Retrieve a list of all customer tenants that you have created in the CloudHealth Platform. This information is retrieved from the CloudHealth Platform. This endpoint can be used for both AWS and Azure customer tenants. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v2/customers 7 | right_code_blocks: 8 | - code_block: |- 9 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 10 | 'https://chapi.cloudhealthtech.com/v2/customers' 11 | title: Sample Request 12 | language: bash 13 | --- 14 | -------------------------------------------------------------------------------- /_metrics/metrics-rate-limits.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Rate Limits 3 | description: Understand rate limits when making requests to the Metrics API. 4 | position: 2 5 | parameters: 6 | - name: 7 | content: 8 | content_markdown: |- 9 | CloudHealth limits the rate at the user, namely API key, level. 10 | - A total of 60 POST requests are allowed per minute. 11 | - Read requests are not throttled. 12 | - A `429` HTTP status code is returned if the request is throttled. The client should be written to handle this response and retry with an exponential backoff. 13 | - Since a payload can contain up to 1000 data points, a single client can push 60,000 data points per minute. 14 | --- 15 | -------------------------------------------------------------------------------- /_price-book/price-book-get-detail-xml.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Details of Price Book Request 3 | position: 7 4 | description: Get details for a specific custom price book. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/price_books/:id/specification 7 | right_code_blocks: 8 | - code_block: |- 9 | { 10 | "specification": 11 | } 12 | title: Response Body 13 | language: json 14 | - code_block: |- 15 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 16 | 'https://chapi.cloudhealthtech.com/v1/price_books//specification' 17 | title: Sample Request 18 | language: bash 19 | --- 20 | -------------------------------------------------------------------------------- /_partner/get-client-api-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: How to Get Client API ID 3 | position: 2 4 | content_markdown: |- 5 | To use the Partner API, you need to include an additional parameter, the `client_api_id`, with each request. CloudHealth generates a unique ID for each partner customer. 6 | 7 | You can get the Client API ID for a customer using the [Get All Customers](#partner_get-all-customers) endpoint. You can get the Client API ID for a customer from the CloudHealth Platform. From the left menu, select **Partner > Customer > List**. If the **Client API Id** column is not visible in the report, add it by clicking the **Edit Columns** button. 8 | 9 | ![](images/get-client-api-id.png) 10 | --- 11 | -------------------------------------------------------------------------------- /_azure-partner/get-single-customers-list.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get Single Partner Customer 3 | position: 6 4 | description: Retrieve a specific customer tenant that you have created in the CloudHealth Platform. This information is retrieved from the CloudHealth Platform. This endpoint can be used for both AWS and Azure customer tenants. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v2/customers/:client_api_id 7 | right_code_blocks: 8 | - code_block: |- 9 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 10 | 'https://chapi.cloudhealthtech.com/v2/customers/' 11 | title: Sample Request 12 | language: bash 13 | --- 14 | -------------------------------------------------------------------------------- /_gcp-account/get-client-api-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: How to Get Client API ID 3 | position: 2 4 | content_markdown: |- 5 | If you are a GCP partner, you need to include an additional parameter, the `client_api_id`, with each request. CloudHealth generates a unique ID for each partner customer. 6 | 7 | You can get the Client API ID for a customer using the [Get All Customers](#azure-partner_get-all-partner-customers) endpoint. You can get the Client API ID for a customer from the CloudHealth Platform. From the left menu, select **Partner > Customer > List**. If the **Client API Id** column is not visible in the report, add it by clicking the **Edit Columns** button. 8 | 9 | ![](images/get-client-api-id.png) 10 | --- 11 | -------------------------------------------------------------------------------- /_perspectives/about-perspectives-api.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction to Perspectives API 3 | position: 1 4 | description: An introduction to the Perspectives API. 5 | parameters: 6 | - name: 7 | content: 8 | content_markdown: |- 9 | The Perspectives API allows you to manipulate a schema file that defines the rules for grouping assets in a Perspective. Use the following endpoint: 10 | ``` 11 | https://chapi.cloudhealthtech.com/v1/perspective_schemas 12 | ``` 13 | Using a schema file as a payload, you can perform these operations: 14 | * Create Perspectives 15 | * Modify rules that govern how Perspective Groups are created 16 | * Merge Groups 17 | * Reorder Groups 18 | * Delete Perspectives 19 | --- 20 | -------------------------------------------------------------------------------- /_azure-partner/get-client-api-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: How to Get Client API ID 3 | position: 2 4 | content_markdown: |- 5 | In order to use the Partner API, you need to include an additional parameter, the `client_api_id`, with each request. CloudHealth generates a unique ID for each partner customer. 6 | 7 | You can get the Client API ID for a customer using the [Get All Customers](#azure-partner_get-all-partner-customers) endpoint. You can get the Client API ID for a customer from the CloudHealth Platform. From the left menu, select **Partner > Customer > List**. If the **Client API Id** column is not visible in the report, add it by clicking the **Edit Columns** button. 8 | 9 | ![](images/get-client-api-id.png) 10 | --- 11 | -------------------------------------------------------------------------------- /_asset/about-asset-api.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction to Assets API 3 | position: 1 4 | description: An introduction to the Assets API. 5 | content_markdown: |- 6 | The Assets API allows you to retrieve information on AWS, Azure, Data Center, and Google Cloud assets in your environment. The API supports the following operations: 7 | * Retrieve the API names of all AWS, Azure, Data Center, and Google Cloud asset objects that you can query in the CloudHealth Platform. 8 | * Retrieve the attributes of an asset, including the Perspective Groups to which the asset belongs, as well as assets related to the queried asset. 9 | * Query objects of a specific type, filter objects by attribute, and list specific fields of assets in the response. 10 | --- 11 | -------------------------------------------------------------------------------- /_partner/get-all-customers.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get All Customers 3 | position: 10 4 | description: Retrieve a list of all customer tenants. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/customers 7 | parameters: 8 | - name: per_page 9 | required: no 10 | content: Integer that specifies the number of assets to return per page. 11 | - name: page 12 | required: no 13 | content: Integer that specifies the page to display when results run over multiple pages. 14 | right_code_blocks: 15 | - code_block: |- 16 | curl -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 'https://chapi.cloudhealthtech.com/v1/customers?per_page=25' 17 | title: Sample Request 18 | language: bash 19 | --- 20 | -------------------------------------------------------------------------------- /_perspectives/add-dynamic-group.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Add Dynamic Group to Perspective 3 | type: example 4 | description: Add a dynamic group to an existing Perspective. You can exclude the `ref_id` field from the request. Alternately, if you include the `ref_id` field, specify an arbitrary numerical value for it. 5 | position: 9 6 | right_code_blocks: 7 | - code_block: |- 8 | curl -s -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -X PUT "https://chapi.cloudhealthtech.com/v1/perspective_schemas/" -d '{"schema":{"name": "","rules": [{"type": "categorize","asset": "AwsS3Bucket","field": ["Active?"],"name": "Dynamic_group_name"}]}}'' 9 | title: Request 10 | language: bash 11 | --- 12 | -------------------------------------------------------------------------------- /_perspectives/get-perspective-version.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get Perspective Version 3 | type: example 4 | description: Include the version of a Perspective in the response. 5 | position: 8 6 | right_code_blocks: 7 | - code_block: |- 8 | curl -s -H 'Authorization: Bearer ' -H 'Accept: application/json' 9 | "https://chapi.cloudhealthtech.com/v1/perspective_schemas/ 10 | ?&include_version=true" 11 | title: Request 12 | language: bash 13 | - code_block: |- 14 | { 15 | "type": "Version", 16 | "list": [ 17 | { 18 | "ref_id": 181, 19 | "val": 2 20 | } 21 | ] 22 | } 23 | title: Response 24 | language: bash 25 | --- 26 | -------------------------------------------------------------------------------- /_includes/sidebar.html: -------------------------------------------------------------------------------- 1 | 21 | -------------------------------------------------------------------------------- /_organization/get-org-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: How to Get Organization ID 3 | position: 2 4 | content_markdown: |- 5 | In order to use some Organization endpoints, you need to provide the `org_id`. CloudHealth generates a unique ID for each organization. You can get the Organization ID for an organization from the CloudHealth Platform. From the left menu, go to **Setup > Admin > Organizations** and view or edit the organization. The Organization ID appears in the browser URL. Here's an example URL: 6 | 7 | ``` 8 | https://apps.cloudhealthtech.com/organizations/20XXXXXXXX09 9 | ``` 10 | 11 | Here, `20XXXXXXXX09` is the Organization ID. 12 | 13 | The Organization ID can also be retrieved using the [Get All Organizations](#organization_get-all-organizations) endpoint. 14 | --- 15 | -------------------------------------------------------------------------------- /_partner/about-partner-api.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction to Partner API 3 | position: 1 4 | description: An introduction to the Partner API. 5 | parameters: 6 | - name: 7 | content: 8 | content_markdown: |- 9 | Partners and their customers are organized as tenants in a hierarchical, multi-tenant system in the Partner Platform. Customer tenants are subordinates of their corresponding Partner Tenant. 10 | 11 | ![](images/partner-cust-hier.png) 12 | 13 | The Partner API allows partners to get reports, metrics, and assets for their customers. In order to use the Partner API, you need to include an additional parameter, the `client_api_id`, with each request. CloudHealth generates a unique ID for each partner customer. See [How to Get Client API ID](#partner_how-to-get-client-api-id). 14 | --- 15 | -------------------------------------------------------------------------------- /_price-book/price-book-get-detail.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get Price Book Request 3 | position: 6 4 | description: Retrieve a specific custom price book. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/price_books/:id 7 | right_code_blocks: 8 | - code_block: |- 9 | { 10 | "id":61, 11 | "book_name":"Test Price Book", 12 | "file_hash":"3d9cb352ba6a00d3211ab8f18507c5ce", 13 | "created_at":"2018-01-01", 14 | "updated_at":"2018-01-25" 15 | } 16 | title: Response Body 17 | language: json 18 | - code_block: |- 19 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 20 | 'https://chapi.cloudhealthtech.com/v1/price_books/' 21 | title: Sample Request 22 | language: bash 23 | --- 24 | -------------------------------------------------------------------------------- /_price-book/about-price-book-api.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction to Price Book API 3 | position: 1 4 | description: An introduction to the custom price book API. 5 | parameters: 6 | - name: 7 | content: 8 | content_markdown: |- 9 | Custom price books allow you to develop a custom system of discounts, rates, and adjustments for customers on an individual level. At minimum, the following four API requests must be sent to set up custom price books: 10 | 1. [Create New Price Book](#price-book_create-new-price-book) 11 | 2. [Test New Price Book](#price-book_test-new-price-book) 12 | 3. [Assign Price Book to Customer](#price-book_assign-price-book-to-customer) 13 | 4. [Assign Price Book to Account](#price-book_assign-price-book-to-account) 14 | 15 | **Note:** Custom price books are only available for AWS. 16 | 17 | --- 18 | -------------------------------------------------------------------------------- /_price-book/price-book-get-account.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get Price Book Account Assignment 3 | position: 20 4 | description: Retrieve one AWS account assigned to a custom price book. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/price_book_account_assignments/:id 7 | right_code_blocks: 8 | - code_block: |- 9 | { 10 | "id": 56, 11 | "target_client_api_id": , 12 | "price_book_assignment_id": , 13 | "billing_account_owner_id": 14 | } 15 | title: Response Body 16 | language: json 17 | - code_block: |- 18 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 19 | 'https://chapi.cloudhealthtech.com/v1/price_book_account_assignments/' 20 | title: Sample Request 21 | language: bash 22 | --- 23 | -------------------------------------------------------------------------------- /_price-book/price-book-get-customer.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get Price Book Customer Assignment 3 | position: 15 4 | description: Retrieve one customer assigned to a custom price book. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/price_book_assignments/:id 7 | right_code_blocks: 8 | - code_block: |- 9 | { 10 | "id": 1, 11 | "price_book_id": XXXX, 12 | "target_client_api_id": , 13 | "created_at": "2018-01-01", 14 | "updated_at": "2018-01-01" 15 | } 16 | title: Response Body 17 | language: json 18 | - code_block: |- 19 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 20 | 'https://chapi.cloudhealthtech.com/v1/price_book_assignments/' 21 | title: Sample Request 22 | language: bash 23 | --- 24 | -------------------------------------------------------------------------------- /_sso/delete-sso-configuration.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Delete SSO configuration 3 | position: 3 4 | description: Delete an existing SSO configuration 5 | type: delete 6 | endpoint: https://chapi.cloudhealthtech.com/v1/sso/unconfigure 7 | parameters: 8 | - name: client_api_id 9 | required: no 10 | content: String that specifies the unique customer API Key that CloudHealth generates. See [How to Get Client API ID](#partner_how-to-get-client-api-id). 11 | right_code_blocks: 12 | - code_block: |- 13 | curl -X DELETE -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 'https://chapi.cloudhealthtech.com/v1/sso/unconfigure' 14 | title: Sample Request 15 | language: bash 16 | - code_block: |- 17 | {"success":"SSO unconfigured for CloudHealth Technologies"} 18 | title: Sample Response 19 | language: json 20 | --- -------------------------------------------------------------------------------- /_gcp-account/about-gcp-partner-api.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction to GCP Billing Account API 3 | position: 1 4 | description: An introduction to the GCP Billing Account API. 5 | parameters: 6 | - name: 7 | content: 8 | content_markdown: |- 9 | The GCP billing account contains a customer's projects and are the source of truth for a customer's cost and usage data. By connecting the GCP billing account to the CloudHealth Platform, you allow the CloudHealth Platform access to the data the Platform needs to create reports and recommendations on how to better manage your cloud and cut down on costs. When the GCP billing account is connected, the Platform automatically pulls in derived projects. Random change. 10 | 11 | The GCP Billing Account API allows both direct customers and GCP partners to connect GCP billing accounts with the CloudHealth Platform. 12 | --- 13 | -------------------------------------------------------------------------------- /_billing-rules/get-rule-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: How to Get Billing Rule ID 3 | position: 2 4 | content_markdown: |- 5 | In order to use some Billing Rule endpoints, you need to provide the `partner_billing_rule_id`. CloudHealth generates a unique ID for each billing rule. You can get the Billing Rule ID for an organization from the CloudHealth Platform. From the left menu, go to **Partner > Partner Billing > Billing Rules** and view or edit the organization. The Billing Rule ID appears in the browser URL. Here's an example URL: 6 | 7 | ``` 8 | https://apps.cloudhealthtech.com/partner_billing_rules/57XXXXXXXXX96/edit 9 | ``` 10 | 11 | Here, `57XXXXXXXXX96` is the Billing Rule ID. 12 | 13 | The Billing Rule ID can also be retrieved using the [Create Billing Rule](#billing-rules_create-new-partner-billing-rule) and [Get All Billing Rules](#billing-rules_get-all-billing-rules) endpoints. 14 | --- 15 | -------------------------------------------------------------------------------- /_azure-partner/get-customer-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: How to Get Database Partner Customer ID 3 | position: 3 4 | content_markdown: |- 5 | In order to use some of the Azure Partner endpoints, you need to provide the `db_partner_customer_id`. CloudHealth generates a unique ID for each partner customer. 6 | 7 | You can get the Database Partner Customer ID for a partner customer from the CloudHealth Platform. From the left menu, go to **Setup > Accounts > Azure Partner Customers** and open the partner customer. The database ID of the partner customer appears in the browser URL. Here's an example URL: 8 | ``` 9 | https://apps.cloudhealthtech.com/azure_partner_customers/5XXXXXXXXXX25 10 | ``` 11 | 12 | Here, `5XXXXXXXXXX25` is the Database Partner Customer ID. 13 | 14 | The Database Customer ID can also be retrieved using the [Get Single Partner Customer](/azure-partner/get-single-customers-list.html) endpoint. 15 | --- 16 | -------------------------------------------------------------------------------- /_partner/get-customer-assets.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Assets for Specific Customer 3 | position: 5 4 | description: Retrieve a list of assets associated with a specific partner customer. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/api/search.json?api_version=2 7 | parameters: 8 | - name: client_api_id 9 | required: yes 10 | content: String that specifies the unique customer API Key that CloudHealth generates. See [How to Get Client API ID](#partner_how-to-get-client-api-id) 11 | - name: name 12 | required: yes 13 | content: String that specifies the unique display name of the customer's AWS account. 14 | right_code_blocks: 15 | - code_block: |- 16 | curl 'https://chapi.cloudhealthtech.com/api/search.json?api_version=2&client_api_id= 17 | &name=AwsAccount' 18 | -H 'Authorization: Bearer ' 19 | title: Request 20 | language: bash 21 | --- 22 | -------------------------------------------------------------------------------- /_assignment/how-assignments-are-validated-v2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: How AWS Account Assignments are Validated (Version 2) 3 | position: 2 4 | description: Understand the criteria through which CloudHealth validates Partner AWS Account assignments. 5 | parameters: 6 | - name: 7 | content: 8 | content_markdown: |- 9 | CloudHealth uses the following criteria to validate AWS Account assignments. 10 | * The `owner_id` matches the `owner_id` of an [AWS account](#account_enable-aws-account) in the partner’s CloudHealth account. 11 | * The `owner_id` is assigned to only one `target_client_api_id`. 12 | * You cannot merge two or more AWS accounts into one Partner Generated Billing account in CloudHealth. 13 | * When creating a family billing block, if you enter the `owner_id` of a consolidated AWS account, all AWS accounts linked to the consolidated account are also assigned to the specified `target_client_api_id`. 14 | 15 | --- 16 | -------------------------------------------------------------------------------- /_azure-partner/get-all-customers.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get All CSP Partner Customers 3 | position: 8 4 | description: Retrieve a list of all customer tenants. This information is retrieved from the Azure Portal. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/azure_partner_customers 7 | content_markdown: |- 8 | | Response Code | Description | 9 | | -------------------------- | ------------------------ | 10 | | `200 OK` | Operation was successful | 11 | | `401 Unauthorized` | Unauthorized entry | 12 | | `500 Internal Service Error` | Internal service error | 13 | 14 | right_code_blocks: 15 | - code_block: |- 16 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 17 | 'https://chapi.cloudhealthtech.com/v1/azure_partner_customers' 18 | title: Sample Request 19 | language: bash 20 | --- 21 | -------------------------------------------------------------------------------- /_service-principal/get-service-principal-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: How to Get Service Principal ID 3 | position: 2 4 | content_markdown: |- 5 | In order to use some of the Azure Service Principal endpoints, you need to provide the `sp_id`. CloudHealth generates a unique ID for each service principal. 6 | 7 | You can get the Service Principal ID for a customer's service principal from the CloudHealth Platform. From the left menu, go to **Setup > Accounts > Azure Service Principal** and open the service principal. The ID of the service principal appears in the browser URL. Here's an example URL: 8 | ``` 9 | https://apps.cloudhealthtech.com/azure_service_principals/33672XXXXXX68 10 | ``` 11 | 12 | Here, `33672XXXXXX68` is the service principal ID. 13 | 14 | The Service Principal ID can also be retrieved using the [Get All Existing Service Principals endpoint](#service-principal_get-all-existing-service-principals). 15 | --- 16 | -------------------------------------------------------------------------------- /_gcp-account/get-billing-account-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: How to Get CloudHealth Billing Account ID 3 | position: 3 4 | content_markdown: |- 5 | In order to use some of the GCP Billing Account endpoints, you need to provide the `cloudhealth_billing_account_id`. CloudHealth generates a unique ID for each billing account. 6 | 7 | You can get the CloudHealth Billing Account ID for a billing account from the CloudHealth Platform. From the left menu, go to **Setup > Accounts > GCP Billing** and open the billing account. The CloudHealth Billing Account ID of the partner customer appears in the browser URL. Here's an example URL: 8 | ``` 9 | https://apps.cloudhealthtech.com/gcp_billing_accounts/5XXXXXXXXXX25 10 | ``` 11 | 12 | Here, `5XXXXXXXXXX25` is the CloudHealth Billing Account ID. 13 | 14 | The CloudHealth Billing Account ID can also be retrieved using the [Get All GCP Billing Accounts](#gcp-account_get-all-gcp-billing-accounts) endpoint. 15 | --- 16 | -------------------------------------------------------------------------------- /_sso/get-pending-domains.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Retrieve Pending SSO Domains 3 | position: 4 4 | description: Retrieve SSO domains that are awaiting validation 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/sso/pending_domain_claims 7 | parameters: 8 | - name: client_api_id 9 | required: no 10 | content: String that specifies the unique customer API Key that CloudHealth generates. See [How to Get Client API ID](#partner_how-to-get-client-api-id). 11 | right_code_blocks: 12 | - code_block: |- 13 | curl -X GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 'https://chapi.cloudhealthtech.com/v1/sso/pending_domain_claims' 14 | title: Sample Request 15 | language: bash 16 | - code_block: |- 17 | {"pending_sso_domains": [{"domain":"cloudhealthtech.com", "token":"xxxxx-xxxxx-xxxxx", "created_at":"2019-07-10T18:45:47Z", "created_by_id":11937}]} 18 | title: Sample Response 19 | language: json 20 | --- -------------------------------------------------------------------------------- /_sass/_mixins.scss: -------------------------------------------------------------------------------- 1 | @mixin gradient($start-color, $end-color) { 2 | background: $start-color; 3 | background: -webkit-linear-gradient(left, $start-color, $end-color); 4 | background: linear-gradient(to right, $start-color, $end-color); 5 | } 6 | 7 | @mixin flex-direction($values) { 8 | -webkit-flex-direction: $values; 9 | flex-direction: $values; 10 | } 11 | 12 | @mixin flex-flow($values) { 13 | -webkit-flex-flow: $values; 14 | flex-flow: $values; 15 | } 16 | 17 | @mixin align-items($values) { 18 | -webkit-align-items: $values; 19 | align-items: $values; 20 | } 21 | 22 | @mixin justify-content($values) { 23 | -webkit-justify-content: $values; 24 | justify-content: $values; 25 | } 26 | 27 | @mixin flex($values) { 28 | -webkit-flex: $values; 29 | flex: $values; 30 | } 31 | 32 | @mixin display-flex() { 33 | display: -webkit-flex; 34 | display: flex; 35 | } 36 | 37 | @mixin display-inline-flex() { 38 | display: -webkit-inline-flex; 39 | display: inline-flex; 40 | } 41 | -------------------------------------------------------------------------------- /_partner/use-client-api-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: How to Use the Client API ID with Customer API 3 | category: partner 4 | position: 3 5 | parameters: 6 | - name: 7 | content: 8 | content_markdown: |- 9 | The Client API ID is an ID assigned to each partner customer. As a partner, you can use your partner customer's Client API ID with customer API endpoints to add, remove and view information about your partner customer. 10 | 11 | For example, you can use a partner customer's Client API ID to get a list of queryable reports belonging to that partner customer with the [List of Queryable Reports](#reporting_list-of-queryable-reports) endpoint. 12 | 13 | To get a partner customer's Client API ID, see the [How to Get Client API ID](#partner_how-to-get-client-api-id) topic. 14 | 15 | The Client API ID is added to the end of a customer API endpoint. For example: 16 | 17 | ``` 18 | https://chapi.cloudhealthtech.com/v1/perspective_schemas?client_api_id= 19 | ``` 20 | --- 21 | -------------------------------------------------------------------------------- /_sso/get-sso-configuration.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Retrieve SSO configuration 3 | position: 2 4 | description: Retrieve an existing SSO configuration 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/sso/configuration 7 | parameters: 8 | - name: client_api_id 9 | required: no 10 | content: String that specifies the unique customer API Key that CloudHealth generates. See [How to Get Client API ID](#partner_how-to-get-client-api-id). 11 | right_code_blocks: 12 | - code_block: |- 13 | curl -X GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 'https://chapi.cloudhealthtech.com/v1/sso/configuration' 14 | title: Sample Request 15 | language: bash 16 | - code_block: |- 17 | {"configuration":{"sso_provider":"google-apps", "claimed_domains":["cloudhealthtech.com"], "pending_domains":[], "connection_name":"cloudhealthtech-com", "default_organization":"CloudHealth Technologies"} } 18 | title: Sample Response 19 | language: json 20 | --- -------------------------------------------------------------------------------- /_price-book/price-book-modify.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Modify Existing Price Book 3 | position: 3 4 | description: Modify a custom price book that already exists in the CloudHealth Platform. 5 | type: put 6 | endpoint: https://chapi.cloudhealthtech.com/v1/price_books/:price book id 7 | right_code_blocks: 8 | - code_block: |- 9 | { 10 | "specification": 11 | } 12 | title: Request Body 13 | language: json 14 | - code_block: |- 15 | { 16 | "id": XXXX, 17 | "book_name": "Gold tier", 18 | "created_at": "2018-01-01", 19 | "updated_at": "2018-01-01" 20 | } 21 | title: Response Body 22 | language: json 23 | - code_block: |- 24 | curl --request PUT -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 25 | '{ 26 | "specification": 27 | }' 28 | 'https://chapi.cloudhealthtech.com/v1/price_books/' 29 | title: Sample Request 30 | language: bash 31 | --- 32 | -------------------------------------------------------------------------------- /_sso/validate-sso-domains.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Validate Pending SSO Domains 3 | position: 5 4 | description: Validate SSO domains that are pending 5 | type: put 6 | endpoint: https://chapi.cloudhealthtech.com/v1/sso/validate_pending_domain_claim 7 | parameters: 8 | - name: client_api_id 9 | required: no 10 | content: String that specifies the unique customer API Key that CloudHealth generates. See [How to Get Client API ID](#partner_how-to-get-client-api-id). 11 | - name: pending_domain_name 12 | required: yes 13 | content: String that specifies the domain to validate in `company.com` format. 14 | right_code_blocks: 15 | - code_block: |- 16 | curl -X PUT -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d '{"pending_domain_name":"cloudhealthtech.com"}' 'https://chapi.cloudhealthtech.com/v1/sso/validate_pending_domain_claim' 17 | title: Sample Request 18 | language: bash 19 | - code_block: |- 20 | {"valid":"true" } 21 | title: Sample Response 22 | language: json 23 | --- -------------------------------------------------------------------------------- /_azure-partner/get-single-customers.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get Single CSP Partner Customer 3 | position: 9 4 | description: Retrieve a specific customer tenant. This information is retrieved from the Azure Portal. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/azure_partner_customers/:db_partner_customer_id 7 | content_markdown: |- 8 | | Response Code | Description | 9 | | -------------------------- | ------------------------ | 10 | | `200 OK` | Operation was successful | 11 | | `401 Unauthorized` | Unauthorized entry | 12 | | `404 Not Found` | Entity not found | 13 | | `500 Internal Service Error` | Internal service error | 14 | 15 | right_code_blocks: 16 | - code_block: |- 17 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 18 | 'https://chapi.cloudhealthtech.com/v1/azure_partner_customers/' 19 | title: Sample Request 20 | language: bash 21 | --- 22 | -------------------------------------------------------------------------------- /_assignment/aws-account-assignment-delete-v2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Delete AWS Account Assignment (Version 2) 3 | position: 7 4 | description: Delete the relationship between an AWS account and the Partner Customer to which it was assigned. **Note:** If all accounts assigned to a billing block are deleted, the billing block is also deleted. 5 | type: delete 6 | endpoint: https://chapi.cloudhealthtech.com/v2/aws_account_assignments/:id 7 | content_markdown: |- 8 | | Response Code | Description | 9 | | -------------------------- | ------------------------ | 10 | | `200 OK` | Operation was successful | 11 | | `400 Bad Request` | Unprocessable entity | 12 | 13 | right_code_blocks: 14 | - code_block: |- 15 | curl --request 16 | -H 'Authorization: Bearer ' 17 | -H 'Content-Type: application/json' 18 | DELETE \ 19 | 'https://chapi.cloudhealthtech.com/v2/aws_account_assignments/' \ 20 | title: Sample Request 21 | language: bash 22 | --- 23 | -------------------------------------------------------------------------------- /_price-book/price-book -get-specific-customer-assignments.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get Specific Customer Price Book Assignments 3 | position: 21 4 | description: Run a query to get specific channel customer assignments. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/price_book_assignments 7 | right_code_blocks: 8 | - code_block: |- 9 | { 10 | "target_client_api_id": 11 | } 12 | title: Request Body 13 | language: json 14 | - code_block: |- 15 | { 16 | "id": 6, 17 | "target_client_api_id": , 18 | "price_book_id": XXXX, 19 | "created_at": "2018-01-01", 20 | "updated_at": "2018-01-01" 21 | } 22 | title: Response Body 23 | language: json 24 | - code_block: |- 25 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d '{"target_client_api_id": }' 26 | 'https://chapi.cloudhealthtech.com/v1/price_book_assignments' 27 | title: Sample Request 28 | language: bash 29 | --- 30 | -------------------------------------------------------------------------------- /_price-book/price-book-modify-customer.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Modify Existing Price Book Customer Assignment 3 | position: 12 4 | description: Modify which custom price book is assigned to a customer. 5 | type: put 6 | endpoint: https://chapi.cloudhealthtech.com/v1/price_book_assignments/:id 7 | right_code_blocks: 8 | - code_block: |- 9 | { 10 | "price_book_id": XXXX 11 | } 12 | title: Request Body 13 | language: json 14 | - code_block: |- 15 | { 16 | "id": 6, 17 | "target_client_api_id": , 18 | "price_book_id": XXXX, 19 | "created_at": "2018-01-01", 20 | "updated_at": "2018-01-01" 21 | } 22 | title: Response Body 23 | language: json 24 | - code_block: |- 25 | curl --request PUT -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 26 | '{ 27 | "price_book_id": XXXX 28 | }' 29 | 'https://chapi.cloudhealthtech.com/v1/price_book_assignments/' 30 | title: Sample Request 31 | language: bash 32 | --- 33 | -------------------------------------------------------------------------------- /images/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 10 | aviator 11 | 12 | -------------------------------------------------------------------------------- /_price-book/price-book-modify-account.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Modify Existing Price Book Account Assignment 3 | position: 17 4 | description: Modify which AWS account a custom price book is assigned to. 5 | type: put 6 | endpoint: https://chapi.cloudhealthtech.com/v1/price_book_account_assignments/:id 7 | right_code_blocks: 8 | - code_block: |- 9 | { 10 | "billing_account_owner_id": 11 | } 12 | title: Request Body 13 | language: json 14 | - code_block: |- 15 | { 16 | "id": 36, 17 | "target_client_api_id": , 18 | "price_book_assignment_id": , 19 | "billing_account_owner_id": 20 | } 21 | title: Response Body 22 | language: json 23 | - code_block: |- 24 | curl --request PUT -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 25 | '{ 26 | "billing_account_owner_id": 27 | }' 28 | 'https://chapi.cloudhealthtech.com/v1/price_book_account_assignments/' 29 | title: Sample Request 30 | language: bash 31 | --- 32 | -------------------------------------------------------------------------------- /_organization/org-get-all-v2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get All Organizations 3 | position: 5 4 | description: Retrieve a list of all organizations, including the number of accounts assigned to them. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v2/organizations 7 | parameters: 8 | - name: per_page 9 | required: no 10 | content: Specify how many results should be displayed per page. Default value is 30. Maximum value is 100. 11 | - name: page 12 | required: no 13 | content: Specify the page number for results. 14 | - name: org_id 15 | required: no 16 | content: String that specifies the ID of the organization in which this query should run. See [How to Get Organization ID](#organization_how-to-get-organization-id). If not specified, this parameter assumes the ID of your default organization. 17 | right_code_blocks: 18 | - code_block: |- 19 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 20 | 'https://chapi.cloudhealthtech.com/v2/organizations' 21 | title: Sample Request 22 | language: bash 23 | --- 24 | -------------------------------------------------------------------------------- /_partner/get-single-govcloud-linkage.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Details of Single GovCloud Linkage 3 | position: 15 4 | description: Get details for a specific GovCloud linkage. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/api/v1/govcloud_linkages/:id 7 | parameters: 8 | - name: client_api_id 9 | required: yes 10 | content: String that specifies the unique customer API Key that CloudHealth generates. See [How to Get Client API ID](#partner_how-to-get-client-api-id). 11 | right_code_blocks: 12 | - code_block: |- 13 | curl -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 'https://chapi.cloudhealthtech.com/api/v1/govcloud_linkages/25? 14 | client_api_id= 15 | title: Request 16 | language: bash 17 | - code_block: |- 18 | { 19 | "id": 25, 20 | "customer_id": ZZZZ, 21 | "govcloud_acct": 5, 22 | "commercial_acct": 8, 23 | "created_at": "2018-05-16T20:18:58Z", 24 | "updated_at": "2018-05-16T20:18:58Z" 25 | } 26 | title: Response 27 | language: bash 28 | --- 29 | -------------------------------------------------------------------------------- /_gcp-account/encode-json-key.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: How to Encode a JSON Private Key 3 | position: 4 4 | content_markdown: |- 5 | Several GCP Billing Account API endpoints require you to enter the JSON private key for the service account associated with the billing account. Before you can enter the JSON private key in the endpoint parameter, you must first encode the JSON private key. 6 | 7 | 1. Create and download the JSON private key in gcloud. For more information, see the [Creating and Managing Service Account Keys](https://cloud.google.com/iam/docs/creating-managing-service-account-keys). 8 | 2. In gcloud, enter the command `cloudshell download .json` to download the JSON private key. When prompted, click `Download`. 9 | 3. In Terminal, enter the command `cd downloads` to open the Downloads folder. 10 | 4. In Terminal, enter the following command to encode the downloaded private key: `base64 < '.json'` 11 | 5. Copy the private key generated in the response. Use this private key for the `billing_account_service_account_json_key` or `linked_projects_json_key` parameter. 12 | --- 13 | -------------------------------------------------------------------------------- /_gcp-account/get-all-accounts-list.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get All GCP Billing Accounts 3 | position: 6 4 | description: Retrieve a list of all GCP billing accounts that have been enabled with the CloudHealth Platform. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/gcp_billing_accounts 7 | parameters: 8 | - name: client_api_id 9 | required: no 10 | content: The client API ID of the partner customer whose billing account is being added. Required for partners configuring a partner customer's billing account. 11 | - name: per_page 12 | required: no 13 | content: Specify how many results should be displayed per page. Default value is 25. Maximum value is 50. 14 | - name: page 15 | required: no 16 | content: Specify the page number for results. Default value is 1. 17 | right_code_blocks: 18 | - code_block: |- 19 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 20 | 'https://chapi.cloudhealthtech.com/v1/gcp_billing_accounts?per_page=&page=' 21 | title: Sample Request 22 | language: bash 23 | --- 24 | -------------------------------------------------------------------------------- /_sass/colors.scss: -------------------------------------------------------------------------------- 1 | $cht-teal: #2BF1C7; 2 | $cht-blue: #282561; 3 | $cht-purple: #84076D; 4 | $cht-red: #C42B2B; 5 | $cht-pink: #F75999; 6 | $cht-orange: #FF912D; 7 | $cht-yellow: #F4DB26; 8 | $cht-gray-base: #595959; 9 | $cht-gray-cool: #8C8C8C; 10 | $cht-gray-light: #F2F2F2; 11 | $cht-white: #FFFFFF; 12 | $cht-black: #000000; 13 | 14 | /* Blues */ 15 | $Blue-900: #2d3b8f; 16 | $Blue-850: #00496c; 17 | $Blue-800: #282561; 18 | $Blue-700: #1273a1; 19 | $Blue-600: #2c8fbe; 20 | $Blue-500: #4daedb; 21 | $Blue-400: #ace3fc; 22 | $Blue-300: #d7eef8; 23 | 24 | /* Greens */ 25 | $Primary-Teal: #2BF1C7; 26 | $Green-900: #47d7ac; 27 | $Green-850: #2c8d8d; 28 | $Green-800: #3aa0a0; 29 | $Green-750: #7ee6c6; 30 | $Green-700: #62bc96; 31 | $Green-600: #7ee6c6; 32 | $Green-400: #acf8e1; 33 | $Green-300: #dcf6ee; 34 | 35 | /* UI Messaging */ 36 | $Text-Links: #0578c1; 37 | $Warning: #d42020; 38 | $Success: #2e8540; 39 | $Information: #317EA3; 40 | 41 | /* Text */ 42 | $Gray-900: #010101; 43 | $Gray-800: #333; 44 | $Slate-Gray-900: #617992; 45 | $Gray-700: #666; 46 | $Gray-600: #ccc; 47 | $Gray-500: #eee; 48 | $Gray-400: #f6f6f6; 49 | $White: #fff; 50 | -------------------------------------------------------------------------------- /_documentation/getting_started.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Welcome 3 | category: documentation 4 | position: 1 5 | parameters: 6 | - name: 7 | content: 8 | content_markdown: |- 9 | > CloudHealth provides two APIs for programmatically interacting with the platform: a REST API and a GraphQL API. You are currently viewing the documentation for the REST API. To access the documentation for the GraphQL API, [click here](https://help.cloudhealthtech.com/graphql-api/). 10 | {: .warning} 11 | 12 | Welcome to the CloudHealth REST API Guide. Here you'll find API services that programmatically retrieve data from the CloudHealth Platform. The CloudHealth REST API has predictable, resource-oriented URLs, and it uses HTTP response codes to indicate API errors. All API responses, including errors, return JSON. 13 | 14 | This API continues to be under development and will evolve. CloudHealth sends information on additions and changes to the API in the Product Updates emails that go out to all customers. 15 | 16 | For user guides, FAQs, and product updates, visit the [CloudHealth Help Center](https://help.cloudhealthtech.com){:target="_blank"}. 17 | --- 18 | -------------------------------------------------------------------------------- /_gcp-account/get-single-accounts-list.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get Single GCP Billing Account 3 | position: 7 4 | description: Retrieve a specific GCP billing account that you have enabled with the CloudHealth Platform. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/gcp_billing_accounts/:cloudhealth_billing_account_id 7 | parameters: 8 | - name: cloudhealth_billing_account_id 9 | required: yes 10 | content: The CloudHealth billing account ID of the GCP billing account. For more information, see [How to Get CloudHealth Billing Account ID](#gcp-account_how-to-get-cloudhealth-billing-account-id). 11 | - name: client_api_id 12 | required: no 13 | content: The client API ID of the partner customer whose billing account is being added. Required for partners configuring a partner customer's billing account. 14 | right_code_blocks: 15 | - code_block: |- 16 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 17 | 'https://chapi.cloudhealthtech.com/v1/gcp_billing_accounts/' 18 | title: Sample Request 19 | language: bash 20 | --- 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 CloudCannon 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /_price-book/price-book-get-all-customers.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get All Price Book Customer Assignments 3 | position: 14 4 | description: Retrieve a list of all customers assigned to a custom price book. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/price_book_assignments 7 | parameters: 8 | - name: page 9 | content: Specify the page number for results 10 | - name: per_page 11 | content: Specify how many results should be displayed per page. Default value is 30. 12 | - name: target_client_api_id 13 | content: Specifies the assigned customer’s `client_api_id`. 14 | right_code_blocks: 15 | - code_block: |- 16 | { 17 | "id": 1, 18 | "price_book_id": XXXX, 19 | "target_client_api_id": , 20 | "created_at": "2018-01-01", 21 | "updated_at": "2018-01-01" 22 | } 23 | title: Response Body 24 | language: json 25 | - code_block: |- 26 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 27 | 'https://chapi.cloudhealthtech.com/v1/price_book_assignments' 28 | title: Sample Request 29 | language: bash 30 | --- 31 | -------------------------------------------------------------------------------- /_price-book/price-book-get-all.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get All Price Books 3 | position: 5 4 | description: Retrieve a list of all your custom price books. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/price_books/ 7 | parameters: 8 | - name: page 9 | content: Specify the page number for results 10 | - name: per_page 11 | content: Specify how many results should be displayed per page. Default value is 30. 12 | right_code_blocks: 13 | - code_block: |- 14 | [{ 15 | "id": "1", 16 | "book_name": "Gold Tier", 17 | "created_at": "2018-01-01", 18 | "updated_at": "2018-01-01", 19 | "file_hash": "8b5ad852dc6c11b730" 20 | }, 21 | { 22 | "id": "3", 23 | "book_name": "Silver Tier" 24 | "created_at": "2018-01-01", 25 | "updated_at": "2018-01-01", 26 | "file_hash": "0cd8f13406a4ae" 27 | }] 28 | title: Response Body 29 | language: json 30 | - code_block: |- 31 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 32 | 'https://chapi.cloudhealthtech.com/v1/price_books/' 33 | title: Sample Request 34 | language: bash 35 | --- 36 | -------------------------------------------------------------------------------- /_assignment/aws-account-assignment-read-single-v2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get Single AWS Account Assignment (Version 2) 3 | position: 5 4 | description: Retrieve information on a single AWS account assignment. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v2/aws_account_assignments/:id 7 | content_markdown: |- 8 | #### Response content 9 | A JSON object with the following fields: 10 | * `id`: The ID of an AWS account assignment 11 | * `owner_id`: The AWS ID of the assigned account 12 | * `target_client_api_id`: The client API ID of the customer 13 | * `payer_account_owner_id`: The AWS ID of the account whose bills receive the billing line items for the assigned account 14 | * `billing_family_owner_id`: The AWS ID of the billing family of the assigned account 15 | * `billing_block_type`: The type of billing block 16 | * `billing_block_name`: The name of the billing block 17 | 18 | right_code_blocks: 19 | - code_block: |- 20 | curl --request GET \ 21 | 'https://chapi.cloudhealthtech.com/v2/aws_account_assignments/' \ 22 | -H 'Authorization: Bearer ' 23 | -H 'Content-Type: application/json' 24 | title: Sample Request 25 | language: bash 26 | --- 27 | -------------------------------------------------------------------------------- /_partner/update-single-govcloud-linkage.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Update Single GovCloud Linkage 3 | position: 16 4 | description: Update a specific relationship between a GovCloud Commercial Account and GovCloud Asset Account. 5 | type: put 6 | endpoint: https://chapi.cloudhealthtech.com/api/v1/govcloud_linkages/:id 7 | parameters: 8 | - name: client_api_id 9 | required: yes 10 | content: String that specifies the unique customer API Key that CloudHealth generates. See [How to Get Client API ID](#partner_how-to-get-client-api-id). 11 | right_code_blocks: 12 | - code_block: |- 13 | curl -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 'https://chapi.cloudhealthtech.com/api/v1/govcloud_linkages/25? 14 | client_api_id=' -d 15 | '{ 16 | "govcloud_acct_id": 17, 17 | "commercial_acct_id": 25 18 | }' 19 | title: Request 20 | language: bash 21 | - code_block: |- 22 | { 23 | "id": 25, 24 | "customer_id": ZZZZ, 25 | "govcloud_acct": 17, 26 | "commercial_acct": 25, 27 | "created_at": "2018-05-16T20:18:58Z", 28 | "updated_at": "2018-05-16T20:18:58Z" 29 | } 30 | title: Response 31 | language: bash 32 | --- 33 | -------------------------------------------------------------------------------- /_assignment/aws-account-assignment-read-single.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Read Single AWS Account Assignment (Version 1) 3 | position: 11 4 | description: Get information on a single AWS account assignment. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/aws_account_assignments 7 | parameters: 8 | - name: id 9 | required: yes 10 | content: The ID of the AWS account assignment 11 | content_markdown: |- 12 | #### Response content 13 | A JSON object with one field, `aws_account_assignments`, whose value is an array of objects with the following fields: 14 | * `id`: The ID of an AWS account assignment 15 | * `owner_id`: The AWS ID of the assigned account 16 | * `customer_id`: The ID of the customer to whom the account is assigned 17 | * `payer_account_owner_id`: The AWS ID of the account whose bills receive the billing line items for the assigned account 18 | 19 | The response content is paged if the total number of AWS account assignments is greater than the number that is returned per page. 20 | 21 | right_code_blocks: 22 | - code_block: |- 23 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 24 | 'https://chapi.cloudhealthtech.com/v1/aws_account_assignments/' 25 | title: Sample Request 26 | language: bash 27 | --- 28 | -------------------------------------------------------------------------------- /_account/external-id-get.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get External ID 3 | position: 6 4 | description: Generate your unique customer External ID so that you can configure an IAM Role in the AWS Console. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/aws_accounts/:id/generate_external_id 7 | content_markdown: |- 8 | You cannot generate and specify your own External ID as the value of the `assume_role_external_id` parameter. 9 | 10 | CloudHealth generates a unique External ID for each customer. You can only use this ID as the value of the `assume_role_external_id` parameter. 11 | Because the CloudHealth-generated ID is unique to you, you can reuse it across all your accounts. 12 | 13 | To get your External ID, log into the [CloudHealth Platform](https://apps.cloudhealthtech.com). From the left menu, select **Setup > Accounts > AWS** and click **New Account**. The account setup form displays the generated External ID. 14 | 15 | ![](images/get-external-id.png) 16 | 17 | You can also get your API key through an endpoint. 18 | right_code_blocks: 19 | - code_block: |- 20 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' "https://chapi.cloudhealthtech.com/v1/aws_accounts/:id/generate_external_id" 21 | title: Sample Request 22 | language: bash 23 | --- 24 | -------------------------------------------------------------------------------- /_assignment/aws-account-assignment-delete.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Delete AWS Account Assignment (Version 1) 3 | position: 13 4 | description: Delete the relationship between an AWS account and the Partner Customer to which it was assigned. 5 | type: delete 6 | endpoint: https://chapi.cloudhealthtech.com/v1/aws_account_assignments 7 | parameters: 8 | - name: id 9 | required: yes 10 | content: The ID of the AWS account assignment 11 | content_markdown: |- 12 | | Response Code | Description | 13 | | -------------------------- | ------------------------ | 14 | | `200 OK` | Operation was successful | 15 | | `422 Unprocessable Entity` | Unprocessable entity | 16 | 17 | #### Response header 18 | * `Location`: The location of the created AWS account assignment. 19 | 20 | #### Response content 21 | A JSON object that contains these fields: 22 | * All the fields in the request 23 | * `id`: The ID of the account assignment that was created 24 | 25 | right_code_blocks: 26 | - code_block: |- 27 | curl --request 28 | -H 'Authorization: Bearer ' 29 | DELETE -H 'Content-Type: application/json' 30 | 'https://chapi.cloudhealthtech.com/v1/aws_account_assignments/' 31 | title: Sample Request 32 | language: bash 33 | --- 34 | -------------------------------------------------------------------------------- /_tagging/about-tagging-api.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction to Tagging API 3 | position: 1 4 | description: An introduction to the Tagging API and its limitations. 5 | parameters: 6 | - name: 7 | content: 8 | content_markdown: |- 9 | The Tagging API allows you to add tags (key-value pairs) to objects in the CloudHealth Platform, including taggable AWS assets, AWS accounts, taggable Azure assets, taggable GCP assets, and Data Center servers. These tags are completely independent of your cloud provider tags. 10 | 11 | When you tag objects using this API, the resources are only tagged in the CloudHealth Platform. The tags do not cascade down to your cloud provider (AWS, Azure, GCP, or Data Center). CloudHealth continues to pull tags from both your cloud provider. 12 | 13 | The Tagging API allows you to add tags at this endpoint. 14 | ``` 15 | https://chapi.cloudhealthtech.com/v1/custom_tags 16 | ``` 17 | 18 | #### Limitations 19 | - No more than 100 instances per request 20 | - No more than 100 tags per instance 21 | - Tag keys must be between 1 and 127 characters long 22 | - Tag values must be no longer than 255 characters long 23 | - Tag values must be scalar. Lists and objects are not allowed. Numbers will be converted to strings. 24 | - Tag value will be stripped of leading and trailing whitespace 25 | --- 26 | -------------------------------------------------------------------------------- /_price-book/price-book-get-all-accounts.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get All Price Book Account Assignments 3 | position: 19 4 | description: Retrieve a list of all AWS accounts assigned to a custom price book. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/price_book_account_assignments 7 | parameters: 8 | - name: page 9 | content: Specify the page number for results 10 | - name: per_page 11 | content: Specify how many results should be displayed per page. Default value is 30. 12 | right_code_blocks: 13 | - code_block: |- 14 | { 15 | "price_book_account_assignments": [ 16 | { 17 | "id": 55, 18 | "target_client_api_id": , 19 | "price_book_assignment_id": , 20 | "billing_account_owner_id": 21 | }, 22 | { 23 | "id": 56, 24 | "target_client_api_id": , 25 | "price_book_assignment_id": , 26 | "billing_account_owner_id": 27 | } 28 | ] 29 | } 30 | title: Response Body 31 | language: json 32 | - code_block: |- 33 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 34 | 'https://chapi.cloudhealthtech.com/v1/price_book_account_assignments' 35 | title: Sample Request 36 | language: bash 37 | --- 38 | -------------------------------------------------------------------------------- /_reporting/get-report-query.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get Query for a Report 3 | type: example 4 | description: Retrieve the query string and parameters that produce a Standard or Custom OLAP report. 5 | position: 10 6 | parameters: 7 | - name: org_id 8 | required: no 9 | content: String that specifies the ID of the organization in which this query should run. See [How to Get Organization ID](#organization_how-to-get-organization-id). If not specified, this parameter assumes the ID of your default organization. 10 | content_markdown: |- 11 | Each CloudHealth report is produced by a combination of parameters that together compose a query string. 12 | You can retrieve the query string that produces a Standard or Custom report. 13 | 14 | Because the response is JSON, meta characters are Unicode encoded. 15 | {:.info} 16 | 17 | right_code_blocks: 18 | - code_block: |- 19 | curl -v -H 'Authorization: Bearer ' -H 'Accept: application/json' 'https://chapi.cloudhealthtech.com/olap_reports/custom/{report-id}?get_query=true' 20 | title: Request 21 | language: bash 22 | - code_block: |- 23 | { 24 | "query":"report=My Saved Report?dimensions[]=AWS-Account&dimensions[]=AWS-Service-Category&measures[]=cost&measures[]=cost_recurring&interval=monthly&filters[]=time:select:-1" 25 | } 26 | title: Response 27 | language: json 28 | --- 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CloudHealth API Guide 2 | Welcome to the CloudHealth API Guide ([http://apidocs.cloudhealthtech.com](http://apidocs.cloudhealthtech.com)). Here you'll find documentation for API services that programmatically retrieve data from the CloudHealth Platform. 3 | 4 | The CloudHealth API is organized around [REST](http://en.wikipedia.org/wiki/Representational_State_Transfer). The API has predictable, resource-oriented URLs, and it uses HTTP response codes to indicate API errors. All API responses, including errors, return JSON. 5 | 6 | The goal of the CloudHealth API is to let you write your own applications that leverage and extend CloudHealth functionality. 7 | 8 | This API continues to be under development and will evolve. CloudHealth sends information on additions and changes to the API in the Product Updates emails that go out to all customers. 9 | 10 | ## Getting Help 11 | The CloudHealth API's issue tracker is not a support forum. 12 | 13 | If you’re looking for support on the CloudHealth Platform, here are some options: 14 | * Read [CloudHealth Documentation](https://help.cloudhealthtech.com). 15 | * Create a [Support Ticket](https://support.cloudhealthtech.com/). 16 | * Browse [CloudHealth Academy](https://apps.cloudhealthtech.com/docebo/sso_login). 17 | 18 | ## Report a Bug 19 | If you think you’ve found a bug within the documentation, open an issue in this repository. 20 | -------------------------------------------------------------------------------- /_gcp-account/gcp-account-delete.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Delete GCP Billing Account 3 | position: 9 4 | description: Remove a GCP billing account from the CloudHealth Platform. 5 | type: delete 6 | endpoint: https://chapi.cloudhealthtech.com/v1/gcp_billing_accounts/:cloudhealth_billing_account_id 7 | parameters: 8 | - name: cloudhealth_billing_account_id 9 | required: yes 10 | content: The CloudHealth billing account ID of the GCP billing account. For more information, see [How to Get CloudHealth Billing Account ID](#gcp-account_how-to-get-cloudhealth-billing-account-id). 11 | - name: client_api_id 12 | required: no 13 | content: The client API ID of the partner customer whose billing account is being added. Required for partners configuring a partner customer's billing account. 14 | right_code_blocks: 15 | - code_block: |- 16 | { 17 | "cloudhealth_billing_account_id": "6116033430514", 18 | "billing_account_name": "Chayan Test BA", 19 | "billing_account_id": "00807B-DFFF5B-2DAAB8", 20 | } 21 | title: Response Body 22 | language: json 23 | - code_block: |- 24 | curl --request DELETE -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 25 | 'https://chapi.cloudhealthtech.com/v1/gcp_billing_accounts/' 26 | title: Sample Request 27 | language: bash 28 | --- 29 | -------------------------------------------------------------------------------- /_partner/linkage-post-data-format.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Understand Format of GovCloud Linkage Payload 3 | description: Learn how to format the relationship that establishes a GovCloud linkage. 4 | position: 17 5 | content_markdown: |- 6 | Familiarize yourself with the format of the payload that you can post to define the linkage between a GovCloud Commercial Account and a GovCloud Asset Account. 7 | 8 | **GovCloud Commercial Account:** The proxy account that contains the costs for the account in the Detailed Billing Record. 9 | 10 | **GovCloud Asset Account:** The account that owns the AWS assets. 11 | 12 | Express a linkage between two of these accounts in the following format: 13 | 14 | ``` 15 | { 16 | "govcloud_acct_id": 1, 17 | "commercial_acct_id": 2 18 | } 19 | ``` 20 | 21 | In order to get the values of `govcloud_acct_id` and `commercial_acct_id` use these steps: 22 | 1. Make a GET request as shown in [AWS Accounts in CloudHealth](#account_aws-accounts-in-cloudhealth). 23 | 2. From the response, which contains all AWS accounts associated with the customer, isolate the GovCloud Commercial Account and the GovCloud Asset Account. 24 | 3. Copy the value of the `id` field for both accounts. 25 | 4. Use the `id` of the GovCloud Commercial Account as the value of `govcloud_acct_id` and the `id` of the GovCloud Asset Account as the value of `commercial_acct_id`. 26 | --- 27 | -------------------------------------------------------------------------------- /_azure-partner/add-subscriptions-to-msp-client.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Add Subscriptions to MSP Client 3 | position: 10 4 | description: Assign subscriptions to a MSP client. 5 | type: put 6 | endpoint: https://chapi.cloudhealthtech.com/v1/azure_subscriptions/add/db_msp_client_id 7 | content_markdown: |- 8 | | Response Code | Description | 9 | | -------------------------- | ----------------------------------------------------------------------------- | 10 | | `401` | API key is wront or the request is not made by the partner | 11 | | `500` | Internal server error | 12 | | `422` | Azure ID is not found or is invalid or already assigned to a MSP client | 13 | | `404` | MSP client ID not found | 14 | | `403` | API key provided is invalid | 15 | 16 | right_code_blocks: 17 | - code_block: |- 18 | curl --request PUT -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 19 | 'https://chapi.cloudhealthtech.com/v1/azure_subscriptions/add/db_msp_client_id' 20 | title: Sample Request 21 | language: bash 22 | --- -------------------------------------------------------------------------------- /_azure-partner/get-all-subscriptions-from-msp-client.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get all MSP Client Subscriptions 3 | position: 11 4 | description: List all subscriptions associated with MSP clients. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/azure_subscriptions/list/db_msp_client_id 7 | content_markdown: |- 8 | | Response Code | Description | 9 | | -------------------------- | ----------------------------------------------------------------------------- | 10 | | `401` | API key is wront or the request is not made by the partner | 11 | | `500` | Internal server error | 12 | | `422` | Azure ID is not found or is invalid or already assigned to a MSP client | 13 | | `404` | MSP client ID not found | 14 | | `403` | API key provided is invalid | 15 | 16 | right_code_blocks: 17 | - code_block: |- 18 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 19 | 'https://chapi.cloudhealthtech.com/v1/azure_subscriptions/list/db_msp_client_id' 20 | title: Sample Request 21 | language: bash 22 | --- -------------------------------------------------------------------------------- /_price-book/price-book-assign-customer.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Assign Price Book to Customer 3 | position: 11 4 | description: Assign a custom price book to a customer or customers. 5 | type: post 6 | endpoint: https://chapi.cloudhealthtech.com/v1/price_book_assignments 7 | parameters: 8 | - name: price_book_id 9 | required: yes 10 | content: Integer that specifies which custom price book to use. 11 | - name: target_client_api_id 12 | required: yes 13 | content: Integer that specifies the assigned customer's client_api_id. 14 | 15 | right_code_blocks: 16 | - code_block: |- 17 | { 18 | "price_book_id": XXXX, 19 | "target_client_api_id": 20 | } 21 | title: Request Body 22 | language: json 23 | - code_block: |- 24 | { 25 | "id": , 26 | "target_client_api_id": , 27 | "price_book_id": XXXX, 28 | "created_at": "2018-01-01", 29 | "updated_at": "2018-01-01" 30 | } 31 | title: Response Body 32 | language: json 33 | - code_block: |- 34 | curl --request POST -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 35 | '{ 36 | "price_book_id": XXXX, 37 | "target_client_api_id": 38 | }' 39 | 'https://chapi.cloudhealthtech.com/v1/price_book_assignments' 40 | title: Sample Request 41 | language: bash 42 | --- 43 | -------------------------------------------------------------------------------- /_azure-partner/delete-subscriptions-from-msp-client.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Remove Subscription from MSP Client 3 | position: 12 4 | description: Removes all subscriptions associated with a MSP client. 5 | type: put 6 | endpoint: https://chapi.cloudhealthtech.com/v1/azure_subscriptions/remove/db_msp_client_id 7 | content_markdown: |- 8 | | Response Code | Description | 9 | | -------------------------- | ----------------------------------------------------------------------------- | 10 | | `401` | API key is wront or the request is not made by the partner | 11 | | `500` | Internal server error | 12 | | `422` | Azure ID is not found or is invalid or already assigned to a MSP client | 13 | | `404` | MSP client ID not found | 14 | | `403` | API key provided is invalid | 15 | 16 | 17 | right_code_blocks: 18 | - code_block: |- 19 | curl --request PUT -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 20 | 'https://chapi.cloudhealthtech.com/v1/azure_subscriptions/remove/db_msp_client_id' 21 | title: Sample Request 22 | language: bash 23 | --- -------------------------------------------------------------------------------- /_reporting/intro-to-reporting-api.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction to Reporting API 3 | position: 1 4 | description: An introduction to the Reporting API and common terminology. 5 | parameters: 6 | - name: 7 | content: 8 | content_markdown: |- 9 | The Reporting API allows REST-based access to data presented in OLAP CloudHealth Reports through this endpoint. 10 | 11 | https://chapi.cloudhealthtech.com/olap_reports 12 | 13 | #### Which Reports are Queryable 14 | You can only retrieve data presented in OLAP reports. These are reports that are: 15 | * available at the `/olap_reports` endpoint (including the Container Cost History report), and 16 | * present data visually through charts and graphs 17 | 18 | #### Reporting Terminology 19 | Familiarize yourself with the terminology specific to this API. 20 | 21 | - **Report name:** The display name of the report (e.g., Instance Usage). 22 | - **Dimensions:** Available members for the X-axis and categorization (e.g. by Days categorized by Reservation Type). 23 | - **Intervals:** The granularity of the report (e.g., monthly, weekly, or hourly). 24 | - **Measures:** Selected measures (e.g. # Instances). 25 | - **Filters:** User-defined filters for the report. 26 | - **Data:** The data that is returned when requesting a report. 27 | 28 | See how these terms match to elements of the Report interface in the CloudHealth Platform. 29 | 30 | ![](images/report-terms.png) 31 | --- 32 | -------------------------------------------------------------------------------- /_assignment/aws-account-assignment-read.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Read All AWS Account Assignments (Version 1) 3 | position: 10 4 | description: Get information on all AWS account assignments. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/aws_account_assignments 7 | content_markdown: |- 8 | #### Response header 9 | * `X-Total`: The total number of AWS account assignments 10 | * `X-Per-Page`: The number of AWS account assignments that are returned per page 11 | * `Link`: A list of pages if the response content is truncated due to paging 12 | 13 | #### Response content 14 | A JSON object with one field, `aws_account_assignments`, whose value is an array of objects with the following fields: 15 | * `id`: The ID of an AWS account assignment 16 | * `owner_id`: The AWS ID of the assigned account 17 | * `customer_id`: The ID of the customer to whom the account is assigned 18 | * `payer_account_owner_id`: The AWS ID of the account whose bills receive the billing line items for the assigned account 19 | 20 | The response content is paged if the total number of AWS account assignments is greater than the number that is returned per page. 21 | 22 | right_code_blocks: 23 | - code_block: |- 24 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 25 | 'https://chapi.cloudhealthtech.com/v1/aws_account_assignments/' 26 | title: Sample Request 27 | language: bash 28 | --- 29 | -------------------------------------------------------------------------------- /_assignment/about-assignment-api.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction to Partner AWS Account Assignment API 3 | description: An introduction to the Account Assignment API. 4 | position: 1 5 | parameters: 6 | - name: 7 | content: 8 | content_markdown: |- 9 | Use this API to administer AWS accounts that belong to CloudHealth partners and to assign AWS accounts to partner customers for partner-generated billing purposes. 10 | 11 | Partner AWS Account Assignment API is available in two versions: 12 | * **[Version 2](#assignment_how-aws-account-assignments-are-validated-version-2):** This API supports partner billing blocks and allows partners to assign AWS accounts in billing blocks to partner customers programmatically. Once you have assigned AWS accounts to a partner customer using Version 2 API, you can no longer use Version 1 API to assign, modify, get, or delete account assignments for that partner customer. 13 | * **[Version 1](#assignment_how-aws-account-assignments-are-validated-version-1)**: This legacy API was created prior to the release of the partner billing block feature, which allows partners to quickly and easily assign multiple accounts in different billing configurations to partner customers at the same time. Consequently, Version 1 API does not support billing blocks. 14 | 15 | CloudHealth recommends using Version 2 API to create new account assignments for partner customers and switching Version 1 partner customers to Version 2. 16 | --- 17 | -------------------------------------------------------------------------------- /_documentation/errors.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Error Codes 3 | category: documentation 4 | position: 4 5 | description: Types of response codes that indicate the success or failure of a CloudHealth API request. 6 | parameters: 7 | - name: 8 | content: 9 | content_markdown: |- 10 | CloudHealth uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the `2xx` range indicate success, codes in the `4xx` range indicate an error that failed given the information provided, and codes in the rare `5xx` range indicate an error with CloudHealth's servers. 11 | 12 | | Code | Name | Description | 13 | | --- | --- | --- | 14 | | 200 | OK | Success | 15 | | 201 | OK | Success | 16 | | 204 | OK | Success | 17 | | 400 | Bad Request | Header missing | 18 | | 401 | Unauthorized | Currently logged out | 19 | | 403 | Forbidden | Bad API Key | 20 | | 404 | Not Found | Bad endpoint | 21 | | 408 | Request Timeout | Exceeding read timeout | 22 | | 422 | Unprocessable Entity | Input format error | 23 | | 429 | Too many requests | Exceeding post rate limit | 24 | | 500 | Internal Service Error | General error | 25 | | 503 | Service not available | Back end capped out | 26 | 27 | All errors return JSON in the following format: 28 | left_code_blocks: 29 | - code_block: |- 30 | { 31 | "error": "error message here" 32 | } 33 | title: Error Response Structure 34 | language: json 35 | --- 36 | -------------------------------------------------------------------------------- /_tagging/how-tags-are-processed.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: How Tags are Processed 3 | position: 2 4 | description: Understand the process through which CloudHealth updates tags. 5 | parameters: 6 | - name: 7 | content: 8 | content_markdown: |- 9 | You can use the Tagging API to add new tags as well update existing ones. For either operation, you pass a tagging payload with the API request. Here is an example of the payload structure. 10 | 11 | ``` 12 | { 13 | "tag_groups": [ 14 | { 15 | "asset_type": "AwsAccount", 16 | "ids": [12345, 56789], 17 | "tags": [{"key": "owner", "value": "Fred"}] 18 | }, 19 | { 20 | "asset_type": "AwsInstance", 21 | "ids": [1511831925873], 22 | "tags": [{"key": "environment", "value": "Test"}, {"key": "owner", "value": "Mary"}] 23 | }, 24 | { 25 | "asset_type": "AwsRdsInstance", 26 | "ids": [206158446754], 27 | "tags": [{"key": "environment", "value": "Production"}, {"key": "owner", "value": "Mary"}] 28 | } 29 | ] 30 | } 31 | ``` 32 | 33 | - `asset_type` is an asset that you can tag in the CloudHealth Platform. 34 | - `ids` is a list of CloudHealth IDs 35 | - `tags` is a list of key-value tag pairs 36 | 37 | CloudHealth runs through the following process when it receives the payload. The entire payload is processed. If failures occur, they are identified and processing continues. 38 | 39 | ![](images/tagging-workflow.png) 40 | --- 41 | -------------------------------------------------------------------------------- /_organization/org-allowed-account-get-v2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get All Allowed Accounts 3 | position: 10 4 | description: Used in FlexOrgs only. Retrieves a list of accounts that belong to an organization and can be assigned to potential child organizations. Make a GET request to the parent organization of the organization you want to add accounts to. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v2/organizations/:org_id/available_accounts 7 | parameters: 8 | - name: type 9 | required: yes 10 | content: Specify the cloud account type as `aws_accounts` for AWS, `azure_subscriptions` for Azure, `gcp_compute_projects` for GCP, `data_center_accounts` for Data Center, or `vmware_csp_organizations` for VMware Cloud. 11 | right_code_blocks: 12 | - code_block: |- 13 | { 14 | "aws_accounts": [ 15 | { 16 | "id": "656265534892", 17 | "name": "CloudHealth NG Dev", 18 | "owner_id": "foo", 19 | "account_type": "standalone", 20 | "authentication_type": "role", 21 | "status": "healthy", 22 | "tags": { "foo": "bar", "baz": "bang" } 23 | } 24 | ] 25 | } 26 | title: Response Body 27 | language: json 28 | - code_block: |- 29 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 30 | 'https://chapi.cloudhealthtech.com/v2/organizations//available_accounts?type=aws_accounts' 31 | title: Sample Request 32 | language: bash 33 | --- 34 | -------------------------------------------------------------------------------- /_organization/org-modify-v2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Modify Existing Organization 3 | position: 6 4 | description: Modify an existing organization that already exists in the CloudHealth Platform. 5 | type: put 6 | endpoint: https://chapi.cloudhealthtech.com/v2/organizations/:org_id 7 | parameters: 8 | - name: name 9 | required: no 10 | content: String that specifies the unique name of the organization. 11 | - name: description 12 | required: no 13 | content: String that specifies a description of the organization. 14 | right_code_blocks: 15 | - code_block: |- 16 | { 17 | "description": "abc 123" 18 | } 19 | title: Request Body 20 | language: json 21 | - code_block: |- 22 | { 23 | "id":"6116033432624", 24 | "name": "abc", 25 | "description": "abc 123", 26 | "idp_name": "abc", 27 | "flex_org": false, 28 | "default_organization": true, 29 | "assigned_users_count": 124, 30 | "num_aws_accounts": 118, 31 | "num_azure_subscriptions": 25, 32 | "num_gcp_compute_projects": 15, 33 | "num_data_center_accounts": 84, 34 | "num_vmware_csp_organizations": 1 35 | } 36 | title: Response Body 37 | language: json 38 | - code_block: |- 39 | curl --request PUT -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 40 | '{ 41 | "description": "abc 123" 42 | }' 43 | 'https://chapi.cloudhealthtech.com/v2/organizations/' 44 | title: Sample Request 45 | language: bash 46 | --- 47 | -------------------------------------------------------------------------------- /_price-book/price-book-add.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Create New Price Book 3 | position: 2 4 | description: Create a new custom price book in the CloudHealth Platform that specifies custom billing rules for your customers. 5 | type: post 6 | endpoint: https://chapi.cloudhealthtech.com/v1/price_books 7 | parameters: 8 | - name: book_name 9 | required: yes 10 | content: String that specifies the unique display name of the custom price book. 11 | - name: specification 12 | required: yes 13 | content: XML-formatted string that specifies the custom billing rules of the price book. See [Understand Format of Price Book Specification](#price-book_understand-format-of-price-book-specification). 14 | 15 | right_code_blocks: 16 | - code_block: |- 17 | { 18 | "book_name": "Gold tier", 19 | "specification": 20 | } 21 | title: Request Body 22 | language: json 23 | - code_block: |- 24 | { 25 | "price_book": { 26 | "id": XXXX, 27 | "book_name": "Gold tier", 28 | "file_hash": "0aa0d13204c2bb", 29 | "created_at": "2018-01-01", 30 | "updated_at": "2018-01-01" 31 | } 32 | } 33 | title: Response Body 34 | language: json 35 | - code_block: |- 36 | curl --request POST -H 'Content-Type: application/json' -d 37 | '{ 38 | "book_name": "Gold tier", 39 | "specification": 40 | }' 41 | 'https://chapi.cloudhealthtech.com/v1/price_books?api_key=' 42 | title: Sample Request 43 | language: bash 44 | --- 45 | -------------------------------------------------------------------------------- /_metrics/about-metrics-api.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction to Metrics API 3 | position: 1 4 | description: An introduction to the Metrics API and its limitations. 5 | parameters: 6 | - name: 7 | content: 8 | content_markdown: |- 9 | The Metrics API allows REST-based access to performance metrics, such as CPU, Memory, and Disk for AWS assets. 10 | 11 | The Metrics API allows you to read and write various performance metrics at this endpoint. 12 | ``` 13 | https://chapi.cloudhealthtech.com/metrics/v1 14 | ``` 15 | Once you have uploaded metrics, you have improved insight into the health and performance of your cloud environment. In addition, the CloudHealth Platform is able to generate better rightsizing recommendations based on these metrics. 16 | 17 | #### Limitations 18 | - You can only post CPU, memory, and file system metrics. 19 | - You can only post up to 8 days of historical metrics data. 20 | - Metrics must have an hourly resolution. 21 | - An active AWS Instance associated with the metrics must already be present and active in the CloudHealth Platform and not be Chef-managed. 22 | - Metric retrieval is for individual assets only, that is, for AWS EC2 Instances or file systems of AWS EC2 Instances. 23 | - The payload can contain a max of 1000 data points. If there are more than 1000 data points, the entire request is rejected with a `422` response. 24 | - When posting to file systems, the associated instance must be present and active. However, if a file system object does not currently exist, a new one is automatically created and linked to the instance. 25 | --- 26 | -------------------------------------------------------------------------------- /_account/aws-account-read-multiple.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AWS Accounts in CloudHealth 3 | position: 2 4 | description: Get a list of all AWS Accounts that are enabled in the CloudHealth Platform. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/aws_accounts 7 | content_markdown: |- 8 | The results of this API call are paginated. 9 | parameters: 10 | - name: page 11 | content: Specify the page number for results 12 | - name: per_page 13 | content: Specify how many results should be displayed per page. Default value is 30. Maximum value is 100. 14 | - name: org_id 15 | required: no 16 | content: String that specifies the ID of the organization in which this query should run. See [How to Get Organization ID](#organization_how-to-get-organization-id). If not specified, this parameter assumes the ID of your default organization. 17 | right_code_blocks: 18 | - code_block: |- 19 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' "https://chapi.cloudhealthtech.com/v1/aws_accounts" 20 | title: All results 21 | language: bash 22 | - code_block: |- 23 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' "https://chapi.cloudhealthtech.com/v1/aws_accounts?page=2" 24 | title: Specific page 25 | language: bash 26 | - code_block: |- 27 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' "https://chapi.cloudhealthtech.com/v1/aws_accounts?page=3&per_page=100" 28 | title: Results per page 29 | language: bash 30 | --- 31 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | addressable (2.5.2) 5 | public_suffix (>= 2.0.2, < 4.0) 6 | colorator (1.1.0) 7 | ffi (1.9.18) 8 | ffi (1.9.18-java) 9 | forwardable-extended (2.6.0) 10 | jekyll (3.6.2) 11 | addressable (~> 2.4) 12 | colorator (~> 1.0) 13 | jekyll-sass-converter (~> 1.0) 14 | jekyll-watch (~> 1.1) 15 | kramdown (~> 1.14) 16 | liquid (~> 4.0) 17 | mercenary (~> 0.3.3) 18 | pathutil (~> 0.9) 19 | rouge (>= 1.7, < 3) 20 | safe_yaml (~> 1.0) 21 | jekyll-sass-converter (1.5.1) 22 | sass (~> 3.4) 23 | jekyll-seo-tag (2.4.0) 24 | jekyll (~> 3.3) 25 | jekyll-sitemap (1.1.1) 26 | jekyll (~> 3.3) 27 | jekyll-watch (1.5.1) 28 | listen (~> 3.0) 29 | kramdown (1.16.2) 30 | liquid (4.0.0) 31 | listen (3.1.5) 32 | rb-fsevent (~> 0.9, >= 0.9.4) 33 | rb-inotify (~> 0.9, >= 0.9.7) 34 | ruby_dep (~> 1.2) 35 | mercenary (0.3.6) 36 | pathutil (0.16.1) 37 | forwardable-extended (~> 2.6) 38 | public_suffix (3.0.1) 39 | rb-fsevent (0.10.2) 40 | rb-inotify (0.9.10) 41 | ffi (>= 0.5.0, < 2) 42 | rouge (2.2.1) 43 | ruby_dep (1.5.0) 44 | safe_yaml (1.0.4) 45 | sass (3.5.5) 46 | sass-listen (~> 4.0.0) 47 | sass-listen (4.0.0) 48 | rb-fsevent (~> 0.9, >= 0.9.4) 49 | rb-inotify (~> 0.9, >= 0.9.7) 50 | 51 | PLATFORMS 52 | java 53 | ruby 54 | 55 | DEPENDENCIES 56 | jekyll (= 3.6.2) 57 | jekyll-seo-tag (= 2.4.0) 58 | jekyll-sitemap (= 1.1.1) 59 | 60 | BUNDLED WITH 61 | 2.2.4 62 | -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |

15 | 16 | {{ site.title }} logo 17 |

18 | 19 |
20 | 21 | 22 |
23 | 24 | {% include sidebar.html %} 25 | 26 | 29 | 32 |
33 |
34 | {{ content }} 35 |
36 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /_assignment/aws-account-assignment-read-v2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get All AWS Account Billing Blocks (Version 2) 3 | position: 4 4 | description: Retrieve a list of all AWS billing blocks and their account assignments. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v2/aws_account_assignments 7 | parameters: 8 | - name: target_client_api_id 9 | content: The client API ID of the customer. 10 | content_markdown: |- 11 | #### Response header 12 | * `X-Total`: The total number of AWS account assignments 13 | * `X-Per-Page`: The number of AWS account assignments that are returned per page 14 | 15 | #### Response content 16 | A JSON object with one field, `aws_account_assignments`, whose value is an array of objects with the following fields: 17 | * `id`: The ID of an AWS account assignment 18 | * `owner_id`: The AWS ID of the assigned account 19 | * `payer_account_owner_id`: The AWS ID of the account whose bills receive the billing line items for the assigned account 20 | * `billing_family_owner_id`: The AWS ID of the billing family of the assigned account 21 | * `billing_block_type`: The type of billing block 22 | * `billing_block_name`: The name of the billing block 23 | 24 | The response content is paged if the total number of AWS account assignments is greater than the number that is returned per page. 25 | 26 | right_code_blocks: 27 | - code_block: |- 28 | curl --request GET \ 29 | 'https://chapi.cloudhealthtech.com/v2/aws_account_assignments/' \ 30 | -H 'Content-Type: application/json' 31 | -H 'Authorization: Bearer ' 32 | title: Sample Request 33 | language: bash 34 | --- 35 | -------------------------------------------------------------------------------- /_documentation/authentication.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Getting Your API Key 3 | category: documentation 4 | position: 3 5 | description: Instructions on how to get your unique API Key for authenticating CloudHealth API calls. 6 | parameters: 7 | - name: 8 | content: 9 | content_markdown: |- 10 | #### How CloudHealth Validates API Requests 11 | You need an API Key in order to make authenticated requests to the CloudHealth API service. 12 | 13 | An API Key is a globally unique identifier (GUID) that CloudHealth generates for each user in the platform. When you make an API request, this GUID uniquely identifies and authenticates you as the originator of the request. 14 | 15 | To request an API key, click on My Profile in your user settings. 16 | 17 | ![](images/user-profile.png) 18 | 19 | In your profile settings, scroll to the API Key section and click **Get API Key**. Then click **Save Profile Changes**. 20 | 21 | ![](images/generate-api-key.png) 22 | 23 | Include this GUID with each API request to authenticate into the CloudHealth platform. 24 | 25 | #### Periodic Key Rotation 26 | While securing your API Key is important, it is also essential to periodically rotate your API key for security reasons. To update your key, return to your profile settings and click **Get API Key** to create a new one. Then click **Save Profile Changes**. When you generate an API Key, the previous key becomes invalid. 27 | 28 | The API enforces all the same authentication and authorization checks as the CloudHealth Platform. Therefore, users in an organization can only see data scoped to their organization. Additionally, the API enforces any restrictions to user roles. 29 | --- 30 | -------------------------------------------------------------------------------- /search.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: Search 3 | sitemap: false 4 | permalink: /search.html 5 | --- 6 | 7 |
8 |

Search Results

9 | 10 |

Loading results

11 |
    12 |
    13 | 14 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /_partner/list-govcloud-linkages.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: List All GovCloud Linkages Owned by Current Customer 3 | position: 14 4 | description: Get all GovCloud linkages that are owned by the current customer. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/api/v1/govcloud_linkages 7 | parameters: 8 | - name: client_api_id 9 | required: yes 10 | content: String that specifies the unique customer API Key that CloudHealth generates. See [How to Get Client API ID](#partner_how-to-get-client-api-id). 11 | right_code_blocks: 12 | - code_block: |- 13 | curl -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 'https://chapi.cloudhealthtech.com/api/v1/govcloud_linkages? 14 | client_api_id=' 15 | title: Request 16 | language: bash 17 | - code_block: |- 18 | [ 19 | { 20 | "id": 8, 21 | "customer_id": XXXX, 22 | "govcloud_acct": 1, 23 | "commercial_acct": 2, 24 | "created_at": "2018-05-16T20:18:58Z", 25 | "updated_at": "2018-05-16T20:18:58Z" 26 | }, 27 | { 28 | "id": 17, 29 | "customer_id": YYYY, 30 | "govcloud_acct": 3, 31 | "commercial_acct": 6, 32 | "created_at": "2018-05-16T20:18:58Z", 33 | "updated_at": "2018-05-16T20:18:58Z" 34 | }, 35 | { 36 | "id": 25, 37 | "customer_id": ZZZZ, 38 | "govcloud_acct": 5, 39 | "commercial_acct": 8, 40 | "created_at": "2018-05-16T20:18:58Z", 41 | "updated_at": "2018-05-16T20:18:58Z" 42 | } 43 | ] 44 | title: Response 45 | language: bash 46 | --- 47 | -------------------------------------------------------------------------------- /_partner/cust-statement-read-multiple.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Statements for All Customers 3 | position: 12 4 | description: Retrieve billing statements for all partner customers. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/customer_statements 7 | parameters: 8 | - name: status 9 | required: no 10 | content: String that specifies the status of the statement. Valid values are `Final` or `Estimated`. 11 | - name: billing_period 12 | required: no 13 | content: String that specifies the billing_period of the statement. The date is specified in the format `YYYY-MM`. 14 | - name: per_page 15 | required: no 16 | content: Integer that specifies the number of assets to return per page. 17 | - name: page 18 | required: no 19 | content: Integer that specifies the page to display when results run over multiple pages. 20 | right_code_blocks: 21 | - code_block: |- 22 | curl -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 'https://chapi.cloudhealthtech.com/v1/customer_statements/?page=1&status=Final&billing_period=2020-12&per_page=2' 23 | title: Request 24 | language: bash 25 | - code_block: |- 26 | { 27 | cloud: "AWS", 28 | billing_period : "2020-12", 29 | total_amount : 211,523.09, 30 | status : "Final", 31 | detailed_billing_records_generation_time : "2020-12-23 23:59:11", 32 | statement_generation_time : "2020-12-23 23:59:41", 33 | statement_summary_generation_time : "2020-12-23 23:59:53", 34 | currency: { 35 | name: "USD", 36 | symbol: "$" 37 | } 38 | } 39 | title: Response 40 | language: bash 41 | --- 42 | -------------------------------------------------------------------------------- /_perspectives/get-all-perspectives.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Retrieve All Perspectives 3 | position: 4 4 | description: Retrieve a list of all Perspectives you have created in the CloudHealth Platform. 5 | content_markdown: |- 6 | The response contains the list in the form of a hash that includes the Perspective ID, Perspective name, and a flag field that indicates whether the Perspective is active. 7 | type: get 8 | endpoint: https://chapi.cloudhealthtech.com/v1/perspective_schemas 9 | parameters: 10 | - name: active_only 11 | required: no 12 | content: Boolean that specifies whether only active Perspectives are returned in the response. 13 | - name: org_id 14 | required: no 15 | content: String that specifies the ID of the organization in which this query should run. See [How to Get Organization ID](#organization_how-to-get-organization-id). If not specified, this parameter assumes the ID of your default organization. 16 | right_code_blocks: 17 | - code_block: |- 18 | curl -s -H "Accept: application/json" "https://chapi.cloudhealthtech.com/v1/perspective_schemas?api_key=" 19 | title: Request 20 | language: bash 21 | - code_block: |- 22 | { 23 | "206159639971": { "name": "DDE Test", "active": false }, 24 | "206159351171": { "name": "Environment ", "active": true }, 25 | "206159659286": { "name": "Environment-tmp", "active": false }, 26 | "206159657643": { "name": "Efe Test", "active": false }, 27 | "206159708697": { "name": "Sidd test", "active": true }, 28 | "181": { "name": "Function", "active": true }, 29 | "650": { "name": "Finance Costs", "active": true } 30 | } 31 | title: Response 32 | language: bash 33 | --- 34 | -------------------------------------------------------------------------------- /_azure-assignment/azure-account-assignment-read-single.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get Single Azure Account Assignment 3 | position: 4 4 | description: Retrieve information on a single Azure account assignment. 5 | type: get 6 | endpoint: /v1/azure_partner_customer_accounts/list/:client_api_id 7 | 8 | content_markdown: |- 9 | 10 | | Response Code | Description | 11 | | -------------------------- | ------------------------ | 12 | | `200 OK` | Operation was successful | 13 | | `401 Unauthorized` | Unauthorized entry | 14 | | `500 Internal Service Error` | General error | 15 | 16 | right_code_blocks: 17 | - code_block: |- 18 | "azure_partner_customer_accounts":[{ 19 | "customer_tenant_name":"arriva", 20 | "azure_partner_customer_account":{ 21 | "name":"abacus", 22 | "domain":"abacus.onmicrosoft.com", 23 | "azure_customer_id":"dfg234", 24 | "created_at": "2018-12-27T17:36:36Z", 25 | "updated_at": "2019-04-26T20:49:59Z" 26 | } 27 | },{ 28 | "customer_tenant_name":"arriva", 29 | "azure_partner_customer_account":{ 30 | "name":"card technologies" 31 | "domain":"card.onmicrosoft.com", 32 | "azure_customer_id":"xof194", 33 | "created_at": "2018-12-27T17:36:36Z", 34 | "updated_at": "2019-04-26T20:49:59Z" 35 | } 36 | }] 37 | title: Response Body 38 | language: json 39 | - code_block: |- 40 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 41 | 'https://chapi.cloudhealthtech.com/v1/azure_partner_customer_accounts/list/' 42 | title: Sample Request 43 | language: bash 44 | --- 45 | -------------------------------------------------------------------------------- /_partner/customer-account-modify.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Modify Existing Customer 3 | position: 7 4 | description: Modify a partner customer tenant that already exists in the CloudHealth Platform. 5 | type: put 6 | endpoint: https://chapi.cloudhealthtech.com/v1/customers/:customer_id 7 | right_code_blocks: 8 | - code_block: |- 9 | { 10 | "name": "Acme Corporation", 11 | "classification": "managed_with_access" 12 | } 13 | title: Request Body 14 | language: json 15 | - code_block: |- 16 | { 17 | "id": XXXX, 18 | "name": "Acme Corporation", 19 | "classification": "managed_with_access", 20 | "billing_contact": "john.doe@acmecorp.com", 21 | "margin_percentage": 0.0, 22 | "created_at": "2016-09-15T13:10:47Z", 23 | "updated_at": "2016-09-15T16:46:34Z", 24 | "generated_external_id": "1a2b3c4d5e6f", 25 | "partner_billing_configuration": { 26 | "enabled": true, 27 | "folder": "" 28 | }, 29 | "address": { 30 | "street1": "1 Main St", 31 | "street2": "", 32 | "city": "Springfield", 33 | "State": "MA", 34 | "zipcode": "01234", 35 | "Country": "US" 36 | }, 37 | "_links": { 38 | "self": { 39 | "href": "/v1/customers/XXXX" 40 | } 41 | } 42 | } 43 | title: Response Body 44 | language: json 45 | - code_block: |- 46 | curl --request PUT -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 47 | '{ 48 | "name": "Acme Corporation", 49 | "classification": "managed_with_access" 50 | }' 51 | 'https://chapi.cloudhealthtech.com/v1/customers/' 52 | title: Sample Request 53 | language: bash 54 | --- 55 | -------------------------------------------------------------------------------- /_assignment/aws-account-assignment-update.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Update AWS Account Assignment (Version 1) 3 | position: 12 4 | description: Update an existing AWS account assignment. 5 | type: put 6 | endpoint: https://chapi.cloudhealthtech.com/v1/aws_account_assignments 7 | parameters: 8 | - name: id 9 | required: yes 10 | content: The ID of the AWS account assignment 11 | - name: owner_id 12 | required: yes 13 | content: The AWS ID of the assigned account. 14 | - name: customer_id 15 | required: yes 16 | content: The ID of the customer to whom the account is assigned. For information on how to get this ID, see [Create Partner Customer](#partner_create-partner-customer). 17 | - name: payer_account_owner_id 18 | required: no 19 | content: The AWS ID of the account whose bills should receive the billing line items for the assigned account. 20 | content_markdown: |- 21 | | Response Code | Description | 22 | | -------------------------- | ------------------------ | 23 | | `200 OK` | Operation was successful | 24 | | `422 Unprocessable Entity` | Unprocessable entity | 25 | 26 | #### Response header 27 | * `Location`: The location of the created AWS account assignment. 28 | 29 | #### Response content 30 | A JSON object that contains these fields: 31 | * All the fields in the request 32 | * `id`: The ID of the account assignment that was created 33 | 34 | right_code_blocks: 35 | - code_block: |- 36 | curl --request PUT -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 37 | '{ 38 | "owner_id": "000000000001", 39 | "customer_id": 1, 40 | "payer_account_owner_id": "000000000001" 41 | }' 42 | 'https://chapi.cloudhealthtech.com/v1/aws_account_assignments/' 43 | title: Sample Request 44 | language: bash 45 | --- 46 | -------------------------------------------------------------------------------- /_organization/create-org-v2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Create Organization 3 | position: 4 4 | description: Add a new organization to the CloudHealth Platform. 5 | type: post 6 | endpoint: https://chapi.cloudhealthtech.com/v2/organizations 7 | parameters: 8 | - name: name 9 | required: yes 10 | content: String that specifies the unique name of the new organization. 11 | - name: description 12 | required: no 13 | content: String that specifies a description of the organization. 14 | - name: parent_organization_id 15 | required: no 16 | content: String that specifies the ID of the parent organization. Applies only for organizations in FlexOrgs. 17 | right_code_blocks: 18 | - code_block: |- 19 | { 20 | "name": "abc", 21 | "description": "abc desc", 22 | "parent_organization_id": "24" 23 | } 24 | title: Request Body 25 | language: json 26 | - code_block: |- 27 | { 28 | "id":"6116033432624", 29 | "parent_organization_id": "24", 30 | "name": "abc", 31 | "description": "abc desc", 32 | "idp_name": "abc", 33 | "flex_org": false, 34 | "default_organization": true, 35 | "assigned_users_count": 124, 36 | "num_aws_accounts": 118, 37 | "num_azure_subscriptions": 25, 38 | "num_gcp_compute_projects": 15, 39 | "num_data_center_accounts": 84, 40 | "num_vmware_csp_organizations": 1 41 | } 42 | title: Response Body 43 | language: json 44 | - code_block: |- 45 | curl --request POST -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 46 | '{ 47 | "name": "abc", 48 | "description": "abc desc", 49 | "parent_organization_id": "24" 50 | }' 51 | 'https://chapi.cloudhealthtech.com/v2/organizations' 52 | title: Sample Request 53 | language: bash 54 | --- 55 | -------------------------------------------------------------------------------- /_azure-partner/customer-account-modify.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Modify Existing Partner Customer 3 | position: 7 4 | description: Modify a partner customer tenant that already exists in the CloudHealth Platform. This endpoint can be used for both AWS and Azure customer tenants. 5 | type: put 6 | endpoint: https://chapi.cloudhealthtech.com/v2/customers/:client_api_id 7 | right_code_blocks: 8 | - code_block: |- 9 | { 10 | "name": "Acme Corporation", 11 | "classification": "managed_with_access" 12 | } 13 | title: Request Body 14 | language: json 15 | - code_block: |- 16 | { 17 | "id": XXXX, 18 | "name": "Acme Corporation", 19 | "classification": "managed_with_access", 20 | "billing_contact": "john.doe@acmecorp.com", 21 | "margin_percentage": 0.0, 22 | "created_at": "2016-09-15T13:10:47Z", 23 | "updated_at": "2016-09-15T16:46:34Z", 24 | "generated_external_id": "1a2b3c4d5e6f", 25 | "partner_billing_configuration": { 26 | "enabled": true, 27 | "folder": "" 28 | }, 29 | "address": { 30 | "street1": "1 Main St", 31 | "street2": "", 32 | "city": "Springfield", 33 | "State": "MA", 34 | "zipcode": "01234", 35 | "Country": "US" 36 | }, 37 | "_links": { 38 | "self": { 39 | "href": "/v1/customers/XXXX" 40 | } 41 | } 42 | } 43 | title: Response Body 44 | language: json 45 | - code_block: |- 46 | curl --request PUT -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 47 | '{ 48 | "name": "Acme Corporation", 49 | "classification": "managed_with_access" 50 | }' 51 | 'https://chapi.cloudhealthtech.com/v2/customers/' 52 | title: Sample Request 53 | language: bash 54 | --- 55 | -------------------------------------------------------------------------------- /_partner/cust-statement-read-single.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Statement for Single Customer 3 | position: 11 4 | description: Retrieve the billing statement for a specific partner customer. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/customer_statements 7 | parameters: 8 | - name: client_api_id 9 | required: yes 10 | content: String that specifies the unique customer API Key that CloudHealth generates. See [How to Get Client API ID](#partner_how-to-get-client-api-id) 11 | - name: status 12 | required: no 13 | content: String that specifies the status of the statement. Valid values are `Final` or `Estimated`. 14 | - name: billing_period 15 | required: no 16 | content: String that specifies the billing_period of the statement. The date is specified in the format `YYYY-MM`. 17 | - name: per_page 18 | required: no 19 | content: Integer that specifies the number of assets to return per page. 20 | - name: page 21 | required: no 22 | content: Integer that specifies the page to display when results run over multiple pages. 23 | right_code_blocks: 24 | - code_block: |- 25 | curl -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 'https://chapi.cloudhealthtech.com/v1/customer_statements/?client_api_id=&page=1&status=Final&billing_period=2020-12&per_page=2' 26 | title: Request 27 | language: bash 28 | - code_block: |- 29 | { 30 | customer_id : 1211, 31 | cloud: "AWS", 32 | billing_period : "2020-12", 33 | total_amount : 211,523.09, 34 | status : "Final", 35 | detailed_billing_records_generation_time : "2020-12-23 23:59:11", 36 | statement_generation_time : "2020-12-23 23:59:41", 37 | statement_summary_generation_time : "2020-12-23 23:59:53", 38 | currency: { 39 | name: "USD", 40 | symbol: "$" 41 | } 42 | } 43 | title: Response 44 | language: bash 45 | --- 46 | -------------------------------------------------------------------------------- /_reporting/add-filters-to-report-query.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Add Filters to Report Query 3 | type: example 4 | description: Use filters in conjunction with dimensions and measures to build complex queries. 5 | position: 12 6 | parameters: 7 | - name: 8 | content: 9 | content_markdown: |- 10 | Report filters help you reduce the data that is returned by a report query. You can use filters in conjunction with dimensions and measures to build complex queries. 11 | 12 | For example, to get the EC2 Compute Cost in `us-east-1a`, you can apply a filter in this way. 13 | ``` 14 | curl -H 'Authorization: Bearer ' -H 'Accept: application/json' 'https://chapi.cloudhealthtech.com/olap_reports/usage/instance? 15 | dimensions\[\]=time 16 | &dimensions\[\]=AWS-Availability-Zones 17 | &measures\[\]=ec2_cost_compute 18 | &filters\[\]=AWS-Availability-Zones:select:us-east-1a 19 | &interval=monthly' 20 | ``` 21 | 22 | In the query, each filter is represented using the `filters[]` parameter. this parameter has the this structure. 23 | `dimension-name:select|reject:member-name,member-name` 24 | 25 | The `select` operator indicates which dimension members that you want to include and the `reject`, the dimension members that you want to exclude. 26 | 27 | For example, to get the EC2 Compute Costs for all Availability Zones except `us-east-1b` and `us-east-1d`, you can apply a filter in this way. 28 | ``` 29 | curl -H 'Authorization: Bearer ' -H 'Accept: application/json' 'https://chapi.cloudhealthtech.com/olap_reports/usage/instance 30 | ?dimensions\[\]=time 31 | &dimensions\[\]=AWS-Availability-Zones 32 | &measures\[\]=ec2_cost_compute 33 | &filters\[\]=AWS-Availability-Zones:reject:us-east-1b,us-east-1d 34 | &interval=monthly' 35 | ``` 36 | 37 | For more information on how to filter by time, see [Understand Time Filters](#Reportingunderstand-time-filters). 38 | --- 39 | -------------------------------------------------------------------------------- /_organization/about-org-api.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction to Organization API 3 | position: 1 4 | description: An introduction to the Organization API. 5 | parameters: 6 | - name: 7 | content: 8 | content_markdown: |- 9 | Organizations allow customers to limit the visibility of the data available to users in the CloudHealth Console. Using organizations, you can grant multiple stakeholders access to CloudHealth without providing them access to data you do not wish them to see (e.g. the marketing department should see only the infrastructure running on behalf of marketing). 10 | 11 | To create an organization, you associate it with one or more accounts containing the data you want visible. Classic organizations may have overlapping data (e.g. both your Engineering and DevOps organizations might have access to a common set of accounts). FlexOrg organizations can be associated only with accounts belonging to their parent organizations. 12 | 13 | By default, every company has one default organization that contains all accounts and their corresponding assets. You can modify and assign accounts to the default organization only through the CloudHealth Platform. 14 | 15 | For more information on organizations, see the [Organizations, Users, and Roles](https://help.cloudhealthtech.com/administration/users-and-roles.html) topic. 16 | 17 | The Organization API allows admin users to create, modify, and delete organizations and assign AWS, Azure, GCP, and Data Center accounts to organizations. Users can assign Chef and Datadog accounts to an organization only through the CloudHealth Platform. In order to use some Organization endpoints, you need to provide the `org_id`. CloudHealth generates a unique ID for each organization. See [How to Get Organization ID](#organization_how-to-get-organization-id). 18 | 19 | Organization API is available in two versions. Version 2 is documented in the endpoints below. To access documentation for Version 1 (Legacy) API, contact support@cloudhealthtech.com. 20 | --- 21 | -------------------------------------------------------------------------------- /_asset/get-asset-list.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: List of Queryable Assets 3 | type: get 4 | description: Retrieve the API names of all AWS, Azure, Data Center, and Google Cloud asset objects that you can query in the CloudHealth Platform. 5 | position: 2 6 | endpoint: https://chapi.cloudhealthtech.com/api 7 | parameters: 8 | - name: org_id 9 | required: no 10 | content: String that specifies the ID of the organization in which this query should run. See [How to Get Organization ID](#organization_how-to-get-organization-id). If not specified, this parameter assumes the ID of your default organization. 11 | content_markdown: |- 12 | The response to this query contains a list of JSON objects that represent all the AWS, Azure, Data Center, and Google Cloud assets that CloudHealth has discovered in your environment. 13 | right_code_blocks: 14 | - code_block: | 15 | curl -H 'Authorization: Bearer ' 'https://chapi.cloudhealthtech.com/api' 16 | title: Request 17 | language: bash 18 | - code_block: |- 19 | [ 20 | "AwsInstanceType", 21 | ... 22 | "AwsCloudtrailTrail", 23 | "AwsConfigRuleEvaluationResult", 24 | "AwsConfigRule", 25 | "AwsIamRole", 26 | "AwsIamServerCertificate", 27 | ... 28 | "IntegrationNode", 29 | "IntegrationTag", 30 | "JiraAccount", 31 | "NewrelicAccount", 32 | "GcpComputeInstance", 33 | ... 34 | "AzureResourceGroup", 35 | "AzureSearchService", 36 | "AzureSqlDatabase", 37 | "AzureSqlServer", 38 | "AzureStorSimpleDeviceManager", 39 | ... 40 | "AlertlogicAccount", 41 | "DataCenterServerCpu", 42 | "DataCenterTag", 43 | "VmwareHost", 44 | "VmwareVirtualMachine", 45 | ... 46 | "AwsInstanceReservationListing", 47 | "AwsInstanceReservationModificationItem", 48 | "AwsInstanceReservationModification", 49 | "AwsInstanceReservation", 50 | ... 51 | ] 52 | title: Response 53 | language: json 54 | --- 55 | -------------------------------------------------------------------------------- /_price-book/price-book-aggregation-format.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Understand Price Book Test Results 3 | description: Learn how to review the results of the custom price book XML specification test. 4 | position: 10 5 | 6 | content_markdown: |- 7 | Familiarize yourself with the format of the custom price book XML specification test results that you can verify whether the custom price book is accurate before you assign the price book to customers. 8 | 9 | **Test Result Formats:** Test results are returned in aggregations that contain the calculated discounts and rates according to the custom price book XML specification. Three aggregations are provided in the following hierarchy: 10 | - Product-level 11 | - Usage type-level 12 | - Operation level 13 | 14 | **Review and Revise:** 15 | Review the three aggregations and verify whether all discounts, rates, and adjustments for each product appear as expected. If any of the discounts, rates, or adjustments are incorrect, then there are mistakes present in the XML specification that must be corrected. There are several possible reasons why the XML specification is incorrect: 16 | - The data was incorrectly entered into the XML specification. Review the XML specification and verify that all discount, rate, and adjustment amounts are correct for each product. 17 | - The order is incorrect. The XML specification evaluates each rule in top-down order. Once a product has a discount, rate, or adjustment applied to it, the XML specification ignores all further price adjustments applied to that product. Verify that the rule order is correct in the XML specification. 18 | - The product name is misspelled. The productName attribute must exactly match the product name in the billing file and is case sensitive. For example, a discount to `Amazon Elastic Compute cloud` will be ignored because the last word in the product name isn't properly capitalized. Verify that all product names in the XML specification are correctly spelled and formatted. 19 | 20 | Once you have corrected the XML specification, modify the custom price book in CloudHealth and rerun the test. 21 | --- 22 | -------------------------------------------------------------------------------- /_azure-assignment/azure-account-assignment-delete.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Delete Azure Account Assignment 3 | position: 5 4 | description: Remove the relationship between an Azure customer account and the partner customer that it was assigned to. 5 | type: put 6 | endpoint: /v1/azure_partner_customer_accounts/remove/:client_api_id 7 | parameters: 8 | - name: azure_customer_ids 9 | required: yes 10 | content: An array of the customer IDs of the Azure customer accounts that should be removed from the partner customer tenant. 11 | content_markdown: |- 12 | 13 | | Response Code | Description | 14 | | -------------------------- | ------------------------ | 15 | | `207 OK` | Operation was successful | 16 | | `401 Unauthorized` | Unauthorized entry | 17 | | `404 Not Found` | Bad endpoint | 18 | | `422 Unprocessable Entity` | Unprocessable entity | 19 | | `500 Internal Service Error` | General error | 20 | 21 | right_code_blocks: 22 | - code_block: |- 23 | { 24 | "azure_customer_ids": ["ab123", "fgh345"] 25 | } 26 | title: Request Body 27 | language: json 28 | - code_block: |- 29 | “azure_partner_customer_accounts”:[{ 30 | "azure_partner_customer_account":{ 31 | "name":"arriva", 32 | "domain":"arriva.onmicrosoft.com", 33 | "azure_customer_id":"ab123", 34 | "created_at": "2018-12-27T17:36:36Z", 35 | "updated_at": "2019-04-26T20:49:59Z" 36 | }, 37 | {"http_status": 422 38 | "error": "azure_customer_id not found" 39 | "azure_customer_id": "fgh345" 40 | } 41 | }] 42 | title: Response Body 43 | language: json 44 | - code_block: |- 45 | curl --request PUT -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 46 | { 47 | "azure_customer_ids": ["ab123", "fgh345"] 48 | } 49 | 'https://chapi.cloudhealthtech.com/v1/azure_partner_customer_accounts/remove/' 50 | title: Sample Request 51 | language: bash 52 | --- 53 | -------------------------------------------------------------------------------- /_service-principal/about-service-principal-api.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction to Azure Service Principal API 3 | position: 1 4 | description: An introduction to the Azure Service Principal API. 5 | parameters: 6 | - name: 7 | content: 8 | content_markdown: |- 9 | The Azure service principal defines the access an application such as CloudHealth has to your Azure Portal data. Use this API to connect an Azure service principal to the CloudHealth Platform. 10 | 11 | Depending on your account type, you need to complete different kinds of setup prior to using the Azure service principal API. 12 | * Enterprise Agreement/GovCloud direct customer: 13 | * Complete steps 1-5 in the [Enable Azure Accounts in CloudHealth](https://help.cloudhealthtech.com/administration/config-ea-azure-account) topic. 14 | * Replace step 6 with the [Connect Service Principal endpoint](#service-principal_connect-service-principal-in-cloudhealth). 15 | * Pay As You Go direct customer: 16 | * Complete steps 1-2 in the [Enable Azure Accounts in CloudHealth](https://help.cloudhealthtech.com/administration/config-payg-azure-account) topic. 17 | * Replace step 3 with the [Connect Service Principal endpoint](#service-principal_connect-service-principal-in-cloudhealth). 18 | * Partner customer: 19 | * Complete steps 1-2 in the [Configure Microsoft CSP Partner Customer](https://help.cloudhealthtech.com/partners/configure-microsoft-csp-partners-and-customers#config-csp-cust-account) topic. 20 | * Replace steps 3 and 4 with the [Connect Service Principal endpoint](#service-principal_connect-service-principal-in-cloudhealth) to connect the service principal with both the partner and the partner customer. 21 | 22 | The Azure Service Principal API allows direct customers, partners, and partner customers to connect their service principal to CloudHealth. partners to get reports, metrics, and assets for their customers. In order to use some of the Azure Service Principal endpoints, you need to provide the `sp_id`. CloudHealth generates a unique ID for each service principal. See [How to Get Service Principal ID](#service-principal_how-to-get-service-principal-id). 23 | --- 24 | -------------------------------------------------------------------------------- /_reporting/get-report-list.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: List of Queryable Reports 3 | type: get 4 | description: Retrieve a list of Standard OLAP reports that you can query. 5 | position: 5 6 | endpoint: https://chapi.cloudhealthtech.com/olap_reports 7 | parameters: 8 | - name: org_id 9 | required: no 10 | content: String that specifies the ID of the organization in which this query should run. See [How to Get Organization ID](#organization_how-to-get-organization-id). If not specified, this parameter assumes the ID of your default organization. 11 | content_markdown: |- 12 | The response to this query contains a list of endpoints that provide Standard CloudHealth reports of specific types. The following endpoints are returned. 13 | * `/cost` 14 | * `/custom` 15 | * `/performace` 16 | * `/usage` 17 | 18 | These endpoints are hierarchical. For example the `/cost` endpoint branches out into specific reports of that type 19 | 20 | | Branch | Report name in CloudHealth Platform | 21 | |---|---| 22 | | `history` | Cost History | 23 | | `current` | Current Cost | 24 | | `instance` | EC2 Instance Cost | 25 | 26 | right_code_blocks: 27 | - code_block: | 28 | curl -H 'Authorization: Bearer ' -H 'Accept: application/json' 'https://chapi.cloudhealthtech.com/olap_reports' 29 | title: Basic Request 30 | language: bash 31 | - code_block: |- 32 | curl -H 'Authorization: Bearer ' -H 'Accept: application/json' https://chapi.cloudhealthtech.com/olap_reports' | python -m json.tool 33 | title: Pretty print results 34 | language: bash 35 | - code_block: |- 36 | { 37 | "links": { 38 | "cost": { 39 | "href": "https://chapi.cloudhealthtech.com/olap_reports/cost" 40 | }, 41 | "custom": { 42 | "href": "https://chapi.cloudhealthtech.com/olap_reports/custom" 43 | }, 44 | "performance": { 45 | "href": "https://chapi.cloudhealthtech.com/olap_reports/performance" 46 | }, 47 | "usage": { 48 | "href": "https://chapi.cloudhealthtech.com/olap_reports/usage" 49 | } 50 | } 51 | } 52 | title: Response 53 | language: json 54 | --- 55 | -------------------------------------------------------------------------------- /_azure-assignment/azure-account-assignment-read.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get All Azure Account Assignments 3 | position: 3 4 | description: Retrieve a list of all Azure customer accounts assigned to a partner customer tenant. 5 | type: get 6 | endpoint: /v1/azure_partner_customer_accounts/list 7 | 8 | content_markdown: |- 9 | 10 | | Response Code | Description | 11 | | -------------------------- | ------------------------ | 12 | | `200 OK` | Operation was successful | 13 | | `401 Unauthorized` | Unauthorized entry | 14 | | `500 Internal Service Error` | General error | 15 | 16 | right_code_blocks: 17 | - code_block: |- 18 | "azure_partner_customer_accounts": [ 19 | { 20 | "customer_tenant_name": "arriva" 21 | "azure_partner_customer_account": { 22 | "name":"abacus", 23 | "domain": "abacus.onmicrosoft.com", 24 | "azure_customer_id": "dfg234", 25 | "created_at": "2018-12-27T17:36:36Z", 26 | "updated_at": "2019-04-26T20:49:59Z" 27 | } 28 | },{ 29 | "customer_tenant_name":"arriva", 30 | "azure_partner_customer_account":{ 31 | "name":"card technologies", 32 | "domain":"card.onmicrosoft.com", 33 | "azure_customer_id":"xof194", 34 | "created_at": "2018-12-27T17:36:36Z", 35 | "updated_at": "2019-04-26T20:49:59Z" 36 | } 37 | },{ 38 | "customer_tenant_name":"Acme Accounts Corp", 39 | "azure_partner_customer_account":{ 40 | "name":"acme accounts 1", 41 | "domain":"acmeaccounts.onmicrosoft.com", 42 | "azure_customer_id":"rtq683", 43 | "created_at": "2019-01-25T12:33:31Z", 44 | "updated_at": "2019-05-01T15:32:11Z" 45 | } 46 | }] 47 | title: Response Body 48 | language: json 49 | - code_block: |- 50 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' 51 | 'https://chapi.cloudhealthtech.com/v1/azure_partner_customer_accounts/list' 52 | title: Sample Request 53 | language: bash 54 | --- 55 | -------------------------------------------------------------------------------- /_tagging/post-tags-for-assets.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Update Tags for Single Asset 3 | type: post 4 | description: Add, remove, or update tags that are associated with an asset. 5 | position: 3 6 | endpoint: https://chapi.cloudhealthtech.com/v1/custom_tags 7 | parameters: 8 | - name: JSON document 9 | required: yes 10 | content: Payload containing the tags that you want to post. See [How Tags are Processed](#tagging_how-tags-are-processed). 11 | content_markdown: |- 12 | The response to the post request is JSON. 13 | * Each successful update is shown to the `updates` array in the response. 14 | * Each partial failure is returned with an indication of which object or tag failed. Where possible, a descriptive message is also provided. 15 | * If there is a mix of updates and errors, the HTTP response code will still be `200 OK`. 16 | right_code_blocks: 17 | - code_block: |- 18 | curl -H 'Authorization: Bearer ' -H "Accept: application/json" -H 'Content-Type: application/json' -XPOST 'https://chapi.cloudhealthtech.com/v1/custom_tags' 19 | -d '{ 20 | "tag_groups":[ 21 | { 22 | "asset_type": "AwsAccount", 23 | "ids": [90], 24 | "tags": [ 25 | { 26 | "key": "testtag1", 27 | "value": null 28 | } 29 | ] 30 | } 31 | ] 32 | }' 33 | title: Post 34 | language: bash 35 | - code_block: |- 36 | { 37 | "updates": [ 38 | { 39 | "asset_type": "AwsAccount", 40 | "asset_id": 12345, 41 | "tag_key": "owner", 42 | "tag_value": "Fred" 43 | }, 44 | { 45 | "asset_type": "AwsAccount", 46 | "asset_id": 56789, 47 | "tag_key": "owner", 48 | "tag_value": "Fred" 49 | }, 50 | { 51 | ... 52 | } 53 | ], 54 | "errors": [ 55 | { 56 | "message": "Asset does not exist or user does not have access", 57 | "asset_type": "AwsRdsInstance", 58 | "asset_id": 206158446754 59 | } 60 | ] 61 | } 62 | title: Response 63 | language: json 64 | --- 65 | -------------------------------------------------------------------------------- /_reporting/understand-time-filters.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Understand Time Filters 3 | position: 3 4 | description: Familiarize yourself with how time filters work when used with the Reporting API. 5 | parameters: 6 | - name: 7 | content: 8 | content_markdown: |- 9 | Filtering on the time dimension is a common technique for reducing the data returned from a report query. For example, you might want to get report data for last month, this quarter, or the previous year. 10 | 11 | The time dimension is unique because it is ordinal. So one way to filter by this dimension is to provide an index value that indicates position. You can specify an Absolute Time Index (positive integers) or a Relative Time Index (negative integers). 12 | 13 | ![](images/time-indexes.png) 14 | 15 | #### Example: Get Data for Current Month 16 | * Using Relative Time Index 17 | ``` 18 | &interval=monthly&filters[]=time:select:-1 19 | ``` 20 | * Using Absolute Time Index 21 | ``` 22 | &interval=monthly&filters[]=time:select:12 23 | ``` 24 | 25 | #### Example: Get Data for Past Three Months 26 | * Using Relative Time Index 27 | ``` 28 | &interval=monthly&filters[]=time:select:-1,-2,-3 29 | ``` 30 | * Using Absolute Time Index 31 | ``` 32 | &interval=monthly&filters[]=time:select:12,11,10 33 | ``` 34 | 35 | If you are only `select`-ing months (not weeks, days, or hours) and not `reject`-ing months, you can specify the dimension as a date string instead of an index. The date string has the format `YYYY-MM`. You can use this approach to filter out all months except for the current month. 36 | ``` 37 | &interval=monthly&filters[]=time:select:2014-12 38 | ``` 39 | 40 | You cannot mix and match date strings and indexes in a single filter. 41 | {:.warning} 42 | 43 | Weekly, daily, and hourly (for reports that provide this interval) intervals work similarly. However, the amount of data retrieved for each interval is different. 44 | 45 | | Interval | Units | Relative Index | 46 | |----|----|----| 47 | | `monthly` | 12 months | `-1` returns Current month | 48 | | `weekly` | 52 weeks | `-1` returns the previous full week | 49 | | `daily` | 31 days | `-1` returns the previous full day | 50 | | `hourly` | 84 hours | `-1` returns from 10 PM to 11:59 PM UTC the day before (each member has two hours of data) | 51 | --- 52 | -------------------------------------------------------------------------------- /_azure-assignment/azure-account-assignment-create.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Create Azure Account Assignment 3 | position: 2 4 | description: Assign Azure accounts to Partner Customers for partner-generated billing purposes. 5 | type: put 6 | endpoint: /v1/azure_partner_customer_accounts/add/:client_api_id 7 | parameters: 8 | - name: azure_customer_ids 9 | required: yes 10 | content: An array of the customer IDs of the assigned Azure customer accounts. 11 | content_markdown: |- 12 | If the corresponding Azure account does not exist in the customer’s CloudHealth account, it is created. If there is an error associated with one Azure account, none of the accounts in the request are assigned. 13 | 14 | | Response Code | Description | 15 | | -------------------------- | ------------------------ | 16 | | `207 OK` | Operation was successful but may contain error messages | 17 | | `401 Unauthorized` | Unauthorized entry | 18 | | `404 Not Found` | Bad endpoint | 19 | | `422 Unprocessable Entity` | Unprocessable entity | 20 | | `500 Internal Service Error` | General error | 21 | 22 | right_code_blocks: 23 | - code_block: |- 24 | { 25 | "azure_customer_ids": ["ab123", "fgh345"] 26 | } 27 | title: Request Body 28 | language: json 29 | - code_block: |- 30 | "azure_partner_customer_accounts": [ 31 | { 32 | "customer_tenant_name": "Azure Two", 33 | "azure_partner_customer_account": { 34 | "name": "Indigo Montoya Inc", 35 | "domain": "chazureteam.onmicrosoft.com", 36 | "azure_customer_id": "ab123" 37 | "created_at": "2018-12-27T17:36:36Z", 38 | "updated_at": "2019-04-26T20:49:59Z" 39 | } 40 | }, 41 | { 42 | "http_status": 422 43 | "error": "azure_customer_id not found" 44 | "azure_customer_id": "fgh345" 45 | }] 46 | title: Response Body 47 | language: json 48 | - code_block: |- 49 | curl --request PUT -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 50 | { 51 | "azure_customer_ids": ["ab123", "fgh345"] 52 | } 53 | 'https://chapi.cloudhealthtech.com/v1/azure_partner_customer_accounts/add/' 54 | title: Sample Request 55 | language: bash 56 | --- 57 | -------------------------------------------------------------------------------- /_partner/post-govcloud-account-linkage.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Connect GovCloud Commercial Account to GovCloud Asset Account 3 | position: 13 4 | description: Link a GovCloud account that receives the Detailed Billing Record with the GovCloud account that owns AWS assets. 5 | type: post 6 | endpoint: https://chapi.cloudhealthtech.com/api/v1/govcloud_linkages 7 | parameters: 8 | - name: client_api_id 9 | required: yes 10 | content: String that specifies the unique customer API Key that CloudHealth generates. See [How to Get Client API ID](#partner_how-to-get-client-api-id) 11 | - name: JSON document 12 | required: yes 13 | content: Payload containing a single relationship between a GovCloud Commercial Account and a GovCloud Asset Account. See [Understand Format of GovCloud Linkage Payload](#partner_understand-format-of-govcloud-linkage-payload). 14 | content_markdown: |- 15 | **GovCloud Commercial Account:** The proxy account that contains the costs for the account in the Detailed Billing Record. 16 | 17 | **GovCloud Asset Account:** The account that owns the AWS assets. 18 | 19 | The CloudHealth Platform validates the relationship between these two accounts as expressed by the JSON payload by using these considerations. 20 | * Both accounts are owned by the customer associated with the logged in user. 21 | * Neither account is in an existing GovCloud relation 22 | * The GovCloud Asset Account specified must have `is_govcloud` set to `true`, indicating that it is associated with a GovCloud region. 23 | * The GovCloud Commercial account is the opposite, must not be in the AWS GovCloud Region. 24 | 25 | If any of these validations fails, a list of errors is returned. 26 | 27 | right_code_blocks: 28 | - code_block: |- 29 | curl -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -XPOST 'https://chapi.cloudhealthtech.com/api/v1/govcloud_linkages? 30 | client_api_id=' -d 31 | { 32 | "govcloud_acct_id": 1, 33 | "commercial_acct_id": 2 34 | } 35 | title: Request 36 | language: bash 37 | - code_block: |- 38 | '{ 39 | "id": 8, 40 | "customer_id": XXXX, 41 | "govcloud_acct": 1, 42 | "commercial_acct": 2, 43 | "created_at": "2018-05-16T20:18:58Z", 44 | "updated_at": "2018-05-16T20:18:58Z" 45 | }' 46 | title: Response 47 | language: bash 48 | --- 49 | -------------------------------------------------------------------------------- /_asset/asset-query-examples.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Asset Query Examples 3 | type: example 4 | description: Multiple examples that demonstrate how you can use the Asset API. 5 | position: 5 6 | parameters: 7 | - name: 8 | content: 9 | content_markdown: |- 10 | #### List API names for all asset types 11 | ``` 12 | curl -H 'Authorization: Bearer ' 13 | "https://chapi.cloudhealthtech.com/api" 14 | ``` 15 | 16 | #### List available fields for AWS RDS Instances 17 | ``` 18 | curl -H 'Authorization: Bearer ' 19 | "https://chapi.cloudhealthtech.com/api/AwsRdsInstance" 20 | ``` 21 | 22 | #### List available fields for Azure Virtual Machines 23 | ``` 24 | curl -H 'Authorization: Bearer ' 25 | "https://chapi.cloudhealthtech.com/api/AzureVm" 26 | ``` 27 | 28 | #### List available fields for AWS Load Balancer 29 | ``` 30 | curl -H 'Authorization: Bearer ' 31 | "https://chapi.cloudhealthtech.com/api/AwsLoadBalancer" 32 | ``` 33 | 34 | #### Filter AWS Load Balancers by name 35 | ``` 36 | curl -H 'Authorization: Bearer ' "https://chapi.cloudhealthtech.com/api/search? 37 | &name=AwsLoadBalancer 38 | &query=name='a45075XXXXXXYYYYYYZZZZZ96f99'" 39 | ``` 40 | 41 | #### Filter RDS Instances by instance ID and only display the instance IDs in the response 42 | ``` 43 | curl -H 'Authorization: Bearer ' "https://chapi.cloudhealthtech.com/api/search? 44 | &name=AwsRdsInstance 45 | &api_version=2 46 | &fields=instance_id 47 | &instance_id=" 48 | ``` 49 | 50 | #### List active AWS Volumes and only display their Perspective Groups and Accounts in the response 51 | ``` 52 | curl -H 'Authorization: Bearer ' https://chapi.cloudhealthtech.com/api/search? 53 | &api_version=2 54 | &page=1 55 | &per_page=5 56 | &query=is_active=1 57 | &name=AwsVolume 58 | &fields=in_use,attr_group__33XXSSDDYYYY,account.name 59 | ``` 60 | 61 | #### Include only instance as related object when searching for AWS Volumes 62 | ``` 63 | curl -H 'Authorization: Bearer ' 'https://chapi.cloudhealthtech.com/api/search? 64 | &api_version=2 65 | &page=1 66 | &per_page=5 67 | &name=AwsVolume 68 | &include=instance 69 | ``` 70 | --- 71 | -------------------------------------------------------------------------------- /_assignment/how-assignments-are-validated.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: How AWS Account Assignments are Validated (Version 1) 3 | position: 8 4 | description: Understand the criteria through which CloudHealth validates Partner AWS Account assignments. 5 | parameters: 6 | - name: 7 | content: 8 | content_markdown: |- 9 | CloudHealth uses the following criteria to validate AWS Account assignments. 10 | * All required parameters are provided when you create an AWS account assignment. Review [Required Parameters](#assignment_create-aws-account-assignment). 11 | * The `owner_id` matches the `owner_id` of an [AWS account](#account_enable-aws-account) in the partner’s CloudHealth account. 12 | * This `owner_id` does not belong to any other AWS account assignment for the partner. 13 | * In AWS, the partner’s corresponding AWS account belongs to another account’s consolidated billing family. 14 | * The `customer_id` matches the `id` of a [customer](#partner_create-partner-customer) that belongs to the partner. 15 | * This customer has partner billing enabled by setting `enabled` to `true` in its `partner_billing_configuration`. 16 | * For each customer identified by `customer_id`, all AWS account assignments follow one of these patterns: 17 | * All of the customer’s AWS accounts are standalone, each corresponding assignment’s `payer_account_owner_id` matches its 18 | `owner_id`. 19 | * Only one of the customer’s AWS accounts is assigned as a consolidated account. Its assignment’s `payer_account_owner_id` 20 | matches its `owner_id`. All other accounts are assigned as being linked to it. Each corresponding assignment’s `payer_account_owner_id` 21 | matches the consolidated account’s `owner_id`. 22 | * If this is a linked account assignment, where the `payer_account_owner_id` does not match the `owner_id`, then the `payer_account_owner_id` matches the `owner_id` of a prior AWS account assignment for the same `customer_id`. These additional criteria apply: 23 | * The prior AWS account assignment for the payer account, the one whose `owner_id` matches this assignment’s 24 | `payer_account_owner_id`—satisfies the following criteria: 25 | * The `owner_id` matches the `payer_account_owner_id`. 26 | * In AWS, both accounts belong to the same consolidated billing account family—the partner has a single account whose consolidated billing configuration contains both customer accounts as linked accounts. 27 | --- 28 | -------------------------------------------------------------------------------- /_assignment/aws-account-assignment-create.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Create AWS Account Assignment (Version 1) 3 | position: 9 4 | description: Assign AWS accounts to Partner Customers for partner-generated billing purposes. 5 | type: post 6 | endpoint: https://chapi.cloudhealthtech.com/v1/aws_account_assignments 7 | parameters: 8 | - name: owner_id 9 | required: yes 10 | content: The AWS ID of the assigned account. 11 | - name: customer_id 12 | required: yes 13 | content: The ID of the customer to whom the account is assigned. For information on how to get this ID, see [Create Partner Customer](#partner_create-partner-customer). 14 | - name: payer_account_owner_id 15 | required: no 16 | content: The AWS ID of the account whose bills should receive the billing line items for the assigned account. 17 | content_markdown: |- 18 | If the corresponding AWS account does not exist in the customer’s CloudHealth account, it is created. 19 | 20 | | Response Code | Description | 21 | | -------------------------- | ------------------------ | 22 | | `200 OK` | Operation was successful | 23 | | `422 Unprocessable Entity` | Unprocessable entity | 24 | 25 | #### Response header 26 | * `Location`: The location of the created AWS account assignment. 27 | 28 | #### Response content 29 | A JSON object that contains these fields: 30 | * All the fields in the request 31 | * `id`: The ID of the AWS account assignment that was created 32 | 33 | right_code_blocks: 34 | - code_block: |- 35 | { 36 | "owner_id": "000000000001", 37 | "customer_id": 1, 38 | "payer_account_owner_id": "000000000001" 39 | } 40 | title: Request Body 41 | language: json 42 | - code_block: |- 43 | { 44 | "customer_id": 1, 45 | "id": 1, 46 | "owner_id": "000000000001", 47 | "payer_account_owner_id": "000000000001" 48 | } 49 | title: Response Body 50 | language: json 51 | - code_block: |- 52 | curl --request POST 53 | -H 'Authorization: Bearer ' 54 | -H 'Content-Type: application/json' -d 55 | '{ 56 | "owner_id": "000000000001", 57 | "customer_id": 1, 58 | "payer_account_owner_id": "000000000001" 59 | }' 60 | 'https://chapi.cloudhealthtech.com/v1/aws_account_assignments' 61 | title: Sample Request 62 | language: bash 63 | --- 64 | -------------------------------------------------------------------------------- /_perspectives/get-perspective-schema.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Retrieve Perspective Schema 3 | position: 5 4 | description: Retrieve the schema that defines a specific Perspective. Identify the specific Perspective by its ID. See [How to Get Perspective ID](#perspectivesget-perspective-id). 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/perspective_schemas/:perspective-id 7 | parameters: 8 | - name: include_version 9 | required: no 10 | content: Boolean that defines whether the current version of the perspective is returned in the response. 11 | - name: org_id 12 | required: no 13 | content: String that specifies the ID of the organization in which this query should run. See [How to Get Organization ID](#organization_how-to-get-organization-id). If not specified, this parameter assumes the ID of your default organization. 14 | right_code_blocks: 15 | - code_block: |- 16 | curl -s -H "Accept: application/json" "https://chapi.cloudhealthtech.com/v1/perspective_schemas/?api_key=" 17 | title: Request 18 | language: bash 19 | - code_block: |- 20 | { 21 | "schema": { 22 | "name": "Environment", 23 | "include_in_reports": "true", 24 | "rules": [ 25 | { 26 | "type": "categorize", 27 | "asset": "AwsAsset", 28 | "tag_field": [ 29 | "cht_env" 30 | ], 31 | "ref_id": "5841XXXXXXX853", 32 | "name": "AWS Assets" 33 | }, 34 | {...} 35 | ], 36 | "merges": [ 37 | { 38 | "type": "Group", 39 | "to": "584XXXXX39263", 40 | "from": [ 41 | "584YYYYYY9283" 42 | ] 43 | }, 44 | {...} 45 | ], 46 | "constants": [ 47 | { 48 | "type": "Dynamic Group Block", 49 | "list": [ 50 | { 51 | "ref_id": "ABCDEFG522853", 52 | "name": "AWS Assets" 53 | }, 54 | {...} 55 | ] 56 | }, 57 | {...} 58 | ] 59 | } 60 | } 61 | title: Response 62 | language: bash 63 | - code_block: |- 64 | curl -s -H "Accept: application/json" "https://chapi.cloudhealthtech.com/v1/perspective_schemas/?api_key=" | python -m json.tool 65 | title: Pretty print results 66 | language: bash 67 | --- 68 | -------------------------------------------------------------------------------- /_assignment/aws-account-assignment-update-v2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Update AWS Account Billing Block (Version 2) 3 | position: 6 4 | description: Update which AWS account is the designated payer account in an existing consolidated billing block. 5 | type: put 6 | endpoint: https://chapi.cloudhealthtech.com/v2/aws_account_assignments/:target_client_api_id 7 | parameters: 8 | - name: billing_block_name 9 | required: yes 10 | content: String that specifies the name of the consolidated billing block. 11 | - name: payer_account_owner_id 12 | required: yes 13 | content: specify the owner ID of the designated payer account for the consolidated billing block. 14 | content_markdown: |- 15 | | Response Code | Description | 16 | | -------------------------- | ------------------------ | 17 | | `200 OK` | Operation was successful | 18 | | `422 Unprocessable Entity` | Unprocessable entity | 19 | 20 | right_code_blocks: 21 | - code_block: |- 22 | { 23 | "billing_block_name": "block name2", 24 | "payer_account_owner_id":"000000000003" 25 | } 26 | title: Request Body 27 | language: bash 28 | - code_block: |- 29 | { 30 | "aws_account_assignments": [ 31 | { 32 | "id": 123333333334, 33 | "owner_id": "000000000002", 34 | "target_client_api_id": 1234, 35 | "payer_account_owner_id": "000000000003", 36 | "billing_family_owner_id": "000000000001", 37 | "billing_block_type": "Consolidated", 38 | "billing_block_name": "block name2", 39 | "errors": {} 40 | }, 41 | { 42 | "id": 123333333335, 43 | "owner_id": "000000000003", 44 | "target_client_api_id": 1234, 45 | "payer_account_owner_id": "000000000003", 46 | "billing_family_owner_id": "000000000001", 47 | "billing_block_type": "Consolidated", 48 | "billing_block_name": "block name2", 49 | "errors": {} 50 | } 51 | ] 52 | } 53 | title: Response Body 54 | language: bash 55 | - code_block: |- 56 | curl --request PUT -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d\ 57 | '{ 58 | "billing_block_name": "block name2", 59 | "payer_account_owner_id":"000000000003" 60 | }'\ 61 | 'https://chapi.cloudhealthtech.com/v2/aws_account_assignments/' 62 | title: Sample Request 63 | language: bash 64 | --- 65 | -------------------------------------------------------------------------------- /_perspectives/delete-perspective-schema.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Delete Perspective Schema 3 | position: 8 4 | description: Remove a specific Perspective from the CloudHealth Platform. You can perform a soft (default), forced, or hard deletion. 5 | type: delete 6 | endpoint: https://chapi.cloudhealthtech.com/v1/perspective_schemas/:perspective-id 7 | parameters: 8 | - name: force 9 | required: no 10 | content: Boolean that specifies whether the Force Delete option is exercised. See [Force Delete](#force-delete). 11 | - name: hard_delete 12 | required: no 13 | content: Boolean that specifies whether the Hard Delete option is exercised. See [Hard Delete](#hard-delete). 14 | - name: org_id 15 | required: no 16 | content: String that specifies the ID of the organization in which this query should run. See [How to Get Organization ID](#organization_how-to-get-organization-id). If not specified, this parameter assumes the ID of your default organization. 17 | content_markdown: |- 18 | There are three levels of Perspective deletion. 19 | #### Soft Delete (default) 20 | This option deletes the Perspective and archives it only if there are no Perspective dependencies such as Policies and Report Subscriptions. You can restore the deleted Perspective. 21 | 22 | ``` 23 | curl -s -H "Accept: application/json" -XDELETE "https://chapi.cloudhealthtech.com/v1/perspective_schemas/?api_key=" 24 | ``` 25 | 26 | #### Force Delete 27 | This option deletes and archives the Perspective irrespective of whether any dependencies exist in Policies or Report Subscriptions. You can restore the deleted Perspective, but you will need to recreate the Policies and Report Subscriptions that depended on the Perspective. 28 | 29 | ``` 30 | curl -s -H "Accept: application/json" -XDELETE "https://chapi.cloudhealthtech.com/v1/perspective_schemas/ 31 | ?api_key= 32 | &force=true" 33 | ``` 34 | ##### Hard Delete 35 | This option deletes the Perspective without archiving it. You cannot restore a Perspective that was deleted using this option. 36 | 37 | ``` 38 | curl -s -H "Accept: application/json" -XDELETE "https://chapi.cloudhealthtech.com/v1/perspective_schemas/ 39 | ?api_key= 40 | &force=true 41 | &hard_delete=true" 42 | ``` 43 | right_code_blocks: 44 | - code_block: |- 45 | curl -s -H "Accept: application/json" -XDELETE "https://chapi.cloudhealthtech.com/v1/perspective_schemas/ 46 | ?api_key=" 47 | title: Delete 48 | language: bash 49 | --- 50 | -------------------------------------------------------------------------------- /_partner/get-customer-reports.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Specific Customer Report 3 | position: 4 4 | description: Retrieve a specific Standard Report for a specific customer tenant. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/olap_reports/:report-type/:report-id 7 | parameters: 8 | - name: client_api_id 9 | required: yes 10 | content: String that specifies the unique customer API Key that CloudHealth generates. See [How to Get Client API ID](#partner_how-to-get-client-api-id). 11 | content_markdown: |- 12 | Refer to [Data for Standard Report](#reporting_data-for-standard-report) for more information on retrieving data from a standard report. 13 | right_code_blocks: 14 | - code_block: |- 15 | curl -H 'Authorization: Bearer ' -H 'Accept: application/json' 'https://chapi.cloudhealthtech.com/olap_reports/cost/history?client_api_id=' 16 | title: Bash Request 17 | language: bash 18 | - code_block: |- 19 | #!/usr/bin/env ruby 20 | 21 | require "rubygems" 22 | require "net/https" 23 | require "uri" 24 | require "json" 25 | 26 | API_ENDPOINT = "https://chapi.cloudhealthtech.com/olap_reports/cost/history" 27 | API_KEY = "" 28 | CLIENT_API_ID = "" 29 | 30 | # Returns json for requested assets. 31 | def get_report(api_key, client_api_id, interval, query = "") 32 | uri = URI(API_ENDPOINT) + URI.escape("?api_key=#{api_key}&client_api_id=#{client_api_id}&interval=#{interval}&query=#{query}") 33 | http = Net::HTTP.new(uri.host, uri.port) 34 | http.use_ssl = true 35 | request = Net::HTTP::Get.new(uri.request_uri) 36 | response = http.request(request) 37 | raise "Server returned error #{response.code} processing your API request" if response.code != "200" 38 | JSON.parse(response.body) 39 | end 40 | 41 | # Fetch all CostHistory objects for the current month 42 | month = Time.now.strftime '%Y-%m-01' 43 | cost_history = get_report(API_KEY, CLIENT_API_ID, 'monthly') 44 | months = cost_history["dimensions"][0]["time"].collect{ |t| t["label"] } 45 | puts "| Month:\tCost" 46 | puts "|----------------------------------|" 47 | months.each_with_index do | month, i | 48 | costs = cost_history["data"].collect{ |month_cost| month_cost[0][0] } 49 | row = "| %12s | %12s | %12s | %12s | %12s | %12s | %12s | %12s | %12s | %12s | %12s | %12s |" 50 | puts "| #{month}:\t#{cost_history["data"][i][0][0]}" 51 | end 52 | title: Ruby Request 53 | language: ruby 54 | --- 55 | -------------------------------------------------------------------------------- /_sso/configure-sso.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Configure SSO 3 | position: 1 4 | description: Create or update SSO configuration in the CloudHealth platform. 5 | type: put 6 | endpoint: https://chapi.cloudhealthtech.com/v1/sso/configure 7 | parameters: 8 | - name: client_api_id 9 | required: no 10 | content: String that specifies the unique customer API Key that CloudHealth generates. See [How to Get Client API ID](#partner_how-to-get-client-api-id). 11 | - name: sso_provider 12 | required: yes 13 | content: String that specifies the unique display name of an AWS account. Specify `ah-saml` (AuthHub SAML), or `ah-waad` (AuthHub Azure AD). 14 | - name: issuer 15 | required: yes 16 | content: String that specifies the SAML Issuer or Entity ID. 17 | - name: domains 18 | required: yes 19 | content: Array that specifies SSO domains, with each domain specified in `company.com` format. 20 | - name: default_organization_id 21 | required: no 22 | content: Number that specifies the ID of the default organization to which new users should be assigned. 23 | - name: sign_in_endpoint 24 | required: yes, if `sso_provider == saml` 25 | content: String that specifies the SAML 2.0 Endpoint from your IdP. 26 | - name: signing_cert 27 | required: yes, if `sso_provider == saml` 28 | content: String that specifies the contents of the X.509 certificate from your IdP. 29 | - name: sso_ignore_idp_organization 30 | required: yes, if `sso_provider == saml` 31 | content: Boolean that specifies whether the IdP does not support passing the organization to which a new user should be assigned. Default value is `false`. 32 | - name: azure_ad_roles_protocol 33 | required: yes, if `sso_provider == waad` 34 | content: Boolean that specifies whether the Azure Roles protocol is used to pass roles to the CloudHealth platform. Default value is `true`. 35 | right_code_blocks: 36 | - code_block: |- 37 | curl -X PUT -H 'Authorization: Bearer API_KEY' -H 'Content-Type: application/json' -d '{"sso_provider": <"ah-samlp"|"ah-waad">, "domains": [",...,"], "signing_cert": "", "sign_in_endpoint": "", "issuer": "", "sso_ignore_idp_organization": }' 'https://chapi.cloudhealthtech.com/v1/sso/configure' 38 | title: Request Body 39 | language: bash 40 | - code_block: |- 41 | {"identityProviderId":"","verifyCertAlias":"cloudhealth-","samlMDidpRedirectBindingURL":"","issuer":"","cert":"","message":"SSO configured for "} 42 | title: Response 43 | language: json 44 | --- 45 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: API Docs 3 | --- 4 | {% assign sorted_collections = site.collections | sort: "position" %} 5 | {% for collection in sorted_collections %} 6 | {% assign sorted_docs = collection.docs | sort: "position" %} 7 | {% for doc in sorted_docs %} 8 |
    9 |
    10 | {% if forloop.first == true %}

    {{ collection.title }}

    {% endif %} 11 |

    12 | 13 | {{ doc.title }} 14 | {% if doc.type %}{% endif %} 15 | {% if doc.required %}{% endif %} 16 | 17 |

    18 | {% if doc.description %} 19 |

    {{ doc.description | markdownify }}

    20 | {% endif %} 21 | {% if doc.endpoint %} 22 |

    {{ doc.endpoint }}

    23 | {% endif %} 24 | 25 | {% if doc.parameters and doc.parameters[0].name %} 26 |

    Parameters

    27 |
      28 | {% for parameter in doc.parameters %} 29 |
    • 30 |

      {{ parameter.name }}{% if parameter.required %}required{% endif %}

      31 |

      {{ parameter.content | markdownify | remove: '

      ' | remove: '

      ' }}

      32 | {% if parameter.sub-fields %} 33 |
        34 | {% for field in parameter.sub-fields %} 35 |
      • 36 |

        {{ field.name }}{% if field.required %}required{% endif %}

        37 |

        {{ field.content | markdownify | remove: '

        ' | remove: '

        ' }}

        38 |
      • 39 | {% endfor %} 40 |
      41 | {% endif %} 42 |
    • 43 | {% endfor %} 44 |
    45 | {% endif %} 46 | 47 | {{ doc.content_markdown | markdownify | replace: "
    ", "
    Parameters
    " }} 48 | 49 | {% if doc.left_code_blocks and doc.left_code_blocks[0].code_block %} 50 | {% for block in doc.left_code_blocks %} 51 | {% include syntax-highlight.html block=block %} 52 | {% endfor %} 53 | {% endif %} 54 |
    55 | {% if doc.right_code_blocks and doc.right_code_blocks[0].code_block %} 56 |
    57 | {% for block in doc.right_code_blocks %} 58 | {% include syntax-highlight.html block=block %} 59 | {% endfor %} 60 |
    61 | {% endif %} 62 |
    63 | {% endfor %} 64 | {% endfor %} 65 | -------------------------------------------------------------------------------- /_policies/get-policy-block.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get All Policy Blocks 3 | position: 3 4 | description: Retrieve a list of all policy blocks for a policy. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/policies/:policy_id/policy_blocks 7 | parameters: 8 | - name: policy_id 9 | required: yes 10 | content: The policy ID of the policy. The policy ID can be retrieved using the [Get All Policies](#policies_get-all-policies) endpoint. 11 | - name: api_key 12 | required: no 13 | content: String that specifies the unique customer API Key, or Client API ID, that CloudHealth generates. Use this parameter if you are a partner who wants to retrieve a list of all policies belonging to a partner customer. See [How to Get Client API ID](#partner_how-to-get-client-api-id). 14 | - name: per_page 15 | required: no 16 | content: Specify how many results should be displayed per page. Default value is 30. 17 | - name: page 18 | required: no 19 | content: Specify the page number for results. 20 | content_markdown: |- 21 | | Response Code | Description | 22 | | -------------------------- | ------------------------ | 23 | | `403 Forbidden` | Missing API Key
    Unable to find Client ID from Partner Customers
    User does not have role permission to use this endpoint | 24 | | `404 Not Found` | Policy ID not found
    Policy ID corresponds to a rightsizing policy. Policy API cannot retrieve policy blocks for a rightsizing policy. | 25 | | `422 Unprocessable Entity` | Exceeded maximum 30 per page
    Page parameters must be greater than zero | 26 | right_code_blocks: 27 | - code_block: |- 28 | { 29 | "policy_blocks":[ 30 | { "id": 1511828492778, "name": "Block 1", "last_evaluated": "2019-05-28 11:11:23 UTC"}, 31 | { "id": 1511828492779, "name": "Block 2", "last_evaluated": "2019-05-28 11:11:23 UTC"}, 32 | { "id": 1511828492780, "name": "Block 3", "last_evaluated": "2019-05-28 11:11:23 UTC"}, 33 | { "id": 1511828492781, "name": "Block 4", "last_evaluated": "2019-05-28 11:11:23 UTC"}, 34 | { "id": 1511828492782, "name": "Block 5", "last_evaluated": "2019-05-28 11:11:23 UTC"} 35 | ], 36 | "_links": {} 37 | } 38 | title: Response Body 39 | language: json 40 | - code_block: |- 41 | curl --request GET \ 42 | 'https://chapi.cloudhealthtech.com/v1/policies//policy_blocks?api_key=&per_page=&page=' \ 43 | -H 'Authorization: Bearer ' 44 | -H 'Content-Type: application/json' 45 | title: Sample Request 46 | language: bash 47 | --- 48 | -------------------------------------------------------------------------------- /_asset/get-specific-asset.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Attributes of Single Asset 3 | type: get 4 | endpoint: https://chapi.cloudhealthtech.com/api/:asset 5 | position: 3 6 | description: Retrieve the attributes and related assets for a single asset object. 7 | parameters: 8 | - name: org_id 9 | required: no 10 | content: String that specifies the ID of the organization in which this query should run. See [How to Get Organization ID](#organization_how-to-get-organization-id). If not specified, this parameter assumes the ID of your default organization. 11 | content_markdown: |- 12 | The response to this query contains two arrays: `attributes` and `relations`. 13 | 14 | The first array, `attributes`, lists the primary attributes of the AWS, Azure, Data Center, or Google Cloud asset that you want to explore. For example, an AWS Instance has attributes such as Account ID, Instance ID, Public IP, and Private IP. The `attributes` array also includes the Perspective Groups to which the AWS Instance belongs. 15 | 16 | The `relations` array contains related assets. In the case of an AWS Instance, the `relations` array lists objects such as `AwsAccount`, `AWSInstanceType`, `AwsAvailabilityZone`, and `ChefNode` objects. 17 | right_code_blocks: 18 | - code_block: | 19 | curl -H 'Authorization: Bearer ' 'https://chapi.cloudhealthtech.com/api/AwsInstance' 20 | title: Request 21 | language: bash 22 | - code_block: |- 23 | { 24 | "name":"AwsInstance", 25 | "attributes":[ 26 | { "name":"id" }, 27 | { "name":"instance_id" }, 28 | { "name":"public_ip" }, 29 | ... 30 | { "name":"usage_percentage_per_month" }, 31 | ... 32 | { 33 | "name": "attr_group__XXXXX3562234", 34 | "perspective_name": "Environment" 35 | }, 36 | { 37 | "name": "attr_group__XXXXX3562234", 38 | "perspective_name": "Owner" 39 | }, 40 | ... 41 | { 42 | "name": "attr_group__XXXXX35623434", 43 | "perspective_name": "Team" 44 | } 45 | ], 46 | "relations":[ 47 | { 48 | "name": "account", 49 | "object_type": "AwsAccount", 50 | "has_many": false 51 | }, 52 | { 53 | "name": "instance_type", 54 | "object_type": "AwsInstanceType", 55 | "has_many": false 56 | }, 57 | ... 58 | { 59 | "name": "auto_scaling_group", 60 | "object_type": "AwsAutoScalingGroup", 61 | "has_many": false 62 | }, 63 | ... 64 | ] 65 | title: Response 66 | language: json 67 | --- 68 | -------------------------------------------------------------------------------- /js/main.js: -------------------------------------------------------------------------------- 1 | jQuery(function() { 2 | var $sidebar = $('#sidebar'), 3 | $nav = $('.nav'), 4 | $main = $('.main'); 5 | 6 | var found = true; 7 | 8 | var $el; 9 | 10 | $sidebar.find('a').click(function() { 11 | $('body').removeClass('nav-open'); 12 | }); 13 | 14 | $("section > div.highlighter-rouge:first-of-type").each(function(i) { 15 | 16 | var $this = $(this).before("
      "), 17 | $languages = $this.prev(), 18 | $notFirst = $this.nextUntil(":not(div.highlighter-rouge)"), 19 | $all = $this.add($notFirst); 20 | 21 | $all.add($languages).wrapAll("
      "); 22 | 23 | listLanguages($all, $languages); 24 | 25 | $this.css('display', 'block'); 26 | $notFirst.css('display', 'none'); 27 | 28 | $languages.find('a').first().addClass('active'); 29 | 30 | $languages.find('a').click(function() { 31 | $all.css('display', 'none'); 32 | $all.eq($(this).parent().index()).css('display', 'block'); 33 | 34 | $languages.find('a').removeClass('active'); 35 | $(this).addClass('active'); 36 | return false; 37 | }); 38 | 39 | if ($languages.children().length === 0) { 40 | $languages.remove(); 41 | } 42 | }); 43 | 44 | function listLanguages($el, $insert) { 45 | $el.each(function(i) { 46 | var title = $(this).attr('title'); 47 | if (title) { 48 | $insert.append("
    • " + title + "
    • "); 49 | } 50 | }); 51 | } 52 | 53 | var href = $('.sidebar a').first().attr("href"); 54 | 55 | if (href !== undefined && href.charAt(0) === "#") { 56 | setActiveSidebarLink(); 57 | 58 | $(window).on("scroll", function(evt) { 59 | setActiveSidebarLink(); 60 | }); 61 | } 62 | 63 | function setActiveSidebarLink() { 64 | $('.sidebar a').removeClass('active'); 65 | var $closest = getClosestHeader(); 66 | $closest.addClass('active'); 67 | document.title = $closest.text(); 68 | } 69 | }); 70 | 71 | function getClosestHeader() { 72 | var $links = $('.sidebar a'), 73 | top = window.scrollY, 74 | $last = $links.first(); 75 | 76 | if (top < 300) { 77 | return $last; 78 | } 79 | 80 | if (top + window.innerHeight >= $(".main").height()) { 81 | return $links.last(); 82 | } 83 | 84 | for (var i = 0; i < $links.length; i++) { 85 | var $link = $links.eq(i), 86 | href = $link.attr("href"); 87 | 88 | if (href !== undefined && href.charAt(0) === "#" && href.length > 1) { 89 | var $anchor = $(href); 90 | 91 | if ($anchor.length > 0) { 92 | var offset = $anchor.offset(); 93 | 94 | if (top < offset.top - 300) { 95 | return $last; 96 | } 97 | 98 | $last = $link; 99 | } 100 | } 101 | } 102 | return $last; 103 | } 104 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # ---- 2 | # Site 3 | 4 | title: CloudHealth API Guide 5 | description: The official API guide for the CloudHealth Platform. 6 | # baseurl: "" 7 | url: http://apidocs.cloudhealthtech.com 8 | google_analytics_key: 9 | permalink: pretty 10 | repository: https://github.com/CloudHealth/cht_api_guide 11 | 12 | collections: 13 | documentation: 14 | title: Getting Started 15 | position: 1 16 | account: 17 | title: AWS Accounts in CloudHealth 18 | position: 2 19 | sso: 20 | title: SSO Configuration 21 | position: 3 22 | perspectives: 23 | title: Perspectives 24 | position: 4 25 | reporting: 26 | title: Reporting 27 | position: 5 28 | asset: 29 | title: Assets 30 | position: 6 31 | metrics: 32 | title: Metrics 33 | position: 7 34 | tagging: 35 | title: Tagging 36 | position: 8 37 | organization: 38 | title: Organization 39 | position: 9 40 | policies: 41 | title: Policies 42 | position: 10 43 | partner: 44 | title: Partner 45 | position: 11 46 | assignment: 47 | title: Partner AWS Account Assignment 48 | position: 12 49 | price-book: 50 | title: Partner Custom Price Books 51 | position: 13 52 | billing-rules: 53 | title: Partner Billing Rules 54 | position: 14 55 | service-principal: 56 | title: Azure Service Principals 57 | position: 15 58 | azure-partner: 59 | title: Azure Partner 60 | position: 16 61 | azure-assignment: 62 | title: Partner Azure Account Assignment 63 | position: 17 64 | gcp-account: 65 | title: GCP Billing Accounts 66 | position: 18 67 | 68 | plugins: 69 | - jekyll-sitemap 70 | - jekyll-seo-tag 71 | 72 | exclude: 73 | - readme.md 74 | - LICENSE 75 | 76 | defaults: 77 | - 78 | scope: 79 | path: "" 80 | values: 81 | layout: default 82 | - 83 | scope: 84 | type: "documentation" 85 | values: 86 | _hide_content: true 87 | - 88 | scope: 89 | type: "api" 90 | values: 91 | _hide_content: true 92 | 93 | types: 94 | - get 95 | - put 96 | - delete 97 | - post 98 | - patch 99 | - example 100 | 101 | languages: 102 | bash: Bash 103 | c: C 104 | css: CSS 105 | html: HTML 106 | java: Java 107 | javascript: JavaScript 108 | json: JSON 109 | php: PHP 110 | python: Python 111 | ruby: Ruby 112 | 113 | _options: 114 | content_markdown: 115 | format: p h4 h5 h6 116 | bold: true 117 | italic: true 118 | link: true 119 | bulletedlist: true 120 | numberedlist: true 121 | image: true 122 | table: true 123 | styles: /css/editor.css 124 | 125 | # theme: jekyll-theme-cayman 126 | -------------------------------------------------------------------------------- /_organization/org-account-assignment-get-v2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get Organization Account Assignment 3 | position: 9 4 | description: Retrieve a list of all accounts assigned to an organization. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v2/organizations/:org_id/:cloud_account 7 | parameters: 8 | - name: cloud_account 9 | required: yes 10 | content: Specify the cloud account as `aws_accounts` for AWS, `azure_subscriptions` for Azure, `gcp_compute_projects` for GCP, `data_center_accounts` for Data Center, or `vmware_csp_organizations` for VMware Cloud. 11 | - name: page 12 | required: no 13 | content: Specify the page number for results. 14 | - name: per_page 15 | required: no 16 | content: Specify how many results should be displayed per page. Default value is 30. Maximum value is 100. 17 | - name: query 18 | required: no 19 | content: Specify a keyword to filter accounts by. For example, specify `Production` to filter accounts by field and tag for the keyword Production. 20 | - name: sort 21 | required: no 22 | content: Specify an attribute to sort accounts by. For example, specify `amazon_name` to sort accounts by the Amazon Name attribute. 23 | - name: is_down 24 | required: no 25 | content: Boolean field that specifies whether accounts should be sorted in ascending or descending order. Specify `true` to sort accounts in descending order and `false` to sort accounts in ascending order. Default value is `false`. 26 | 27 | right_code_blocks: 28 | - code_block: |- 29 | { 30 | "accounts": [ 31 | { 32 | "name": "Example Subscription", 33 | "region": "global", 34 | "created_at": "2017-10-19T17:36:10Z", 35 | "updated_at": "2019-04-03T04:49:49Z", 36 | "account_type": "Unknown", 37 | "status": "Critical", 38 | "authentication_type": "Role Based", 39 | "tags": [] 40 | }, 41 | { 42 | "name": "Production Account", 43 | "region": "global", 44 | "created_at": "2018-05-02T05:51:20Z", 45 | "updated_at": "2018-05-04T16:36:55Z", 46 | "account_type": "Unknown", 47 | "status": "Critical", 48 | "authentication_type": "User Based", 49 | "tags": [ 50 | { 51 | "key": "Environment", 52 | "value": "Production" 53 | } 54 | ] 55 | } 56 | ], 57 | "_links": { 58 | "next": { 59 | "href": "/v2/organizations/:org_id/aws_accounts?page=2&per_page=30" 60 | } 61 | } 62 | } 63 | title: Response Body 64 | language: json 65 | - code_block: |- 66 | curl --request GET -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 67 | 'https://chapi.cloudhealthtech.com/v2/organizations//' 68 | title: Sample Request 69 | language: bash 70 | --- 71 | -------------------------------------------------------------------------------- /_organization/org-account-assignment-remove-v2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Delete Existing Organization Account Assignment 3 | position: 12 4 | description: Remove one of more accounts from an organization. 5 | type: patch 6 | endpoint: https://chapi.cloudhealthtech.com/v2/organizations/:org_id/accounts 7 | parameters: 8 | - name: accounts 9 | required: yes 10 | content: Enter `remove` to remove accounts assigned to the organization. 11 | - name: aws_accounts 12 | required: no 13 | content: Enter a comma-separated list of AWS account IDs (also known as the owner ID) that should be removed from the organization. The account IDs can be retrieved using the [Search for Assets](#asset_search-for-assets) endpoint. You can remove up to 500 AWS accounts per endpoint. 14 | - name: azure_subscriptions 15 | required: no 16 | content: Enter a comma-separated list of Azure subscription GUIDs that should be removed from the organization. The subscription GUIDs can be retrieved using the [Search for Assets](#asset_search-for-assets) endpoint. You can remove up to 500 Azure accounts per endpoint. 17 | - name: gcp_compute_projects 18 | required: no 19 | content: Enter a comma-separated list of GCP project IDs that should be removed from the organization. The project IDs can be retrieved using the [Search for Assets](#asset_search-for-assets) endpoint. You can remove up to 500 GCP projects per endpoint. 20 | - name: data_center_accounts 21 | required: no 22 | content: Enter a comma-separated list of Data Center account names that should be removed from the organization. The account names can be retrieved using the [Search for Assets](#asset_search-for-assets) endpoint. You can remove up to 500 Data Center accounts per endpoint. 23 | right_code_blocks: 24 | - code_block: |- 25 | { 26 | "accounts":"remove", 27 | "aws_accounts":["12345"], 28 | "azure_subscriptions":["151f9055-7a93-4bbb"], 29 | "gcp_compute_projects":["gcp-project-name"], 30 | "data_center_accounts":["myplace-datacenter"] 31 | } 32 | title: Request Body 33 | language: json 34 | - code_block: |- 35 | { 36 | "id":"6116033432624", 37 | "name": "abc", 38 | "description": "abc 123", 39 | "idp_name": "abc", 40 | "flex_org": false, 41 | "default_organization": true, 42 | "assigned_users_count": 124, 43 | "num_aws_accounts": 118, 44 | "num_azure_subscriptions": 25, 45 | "num_gcp_compute_projects": 15, 46 | "num_data_center_accounts": 84, 47 | "num_vmware_csp_organizations": 1 48 | } 49 | title: Response Body 50 | language: json 51 | - code_block: |- 52 | curl --request PATCH -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 53 | '{ 54 | "accounts":"remove", 55 | "aws_accounts":["12345"], 56 | "azure_subscriptions":["151f9055-7a93-4bbb"], 57 | "gcp_compute_projects":["gcp-project-name"], 58 | "data_center_accounts":["myplace-datacenter"] 59 | }' 60 | 'https://chapi.cloudhealthtech.com/v2/organizations//accounts' 61 | title: Sample Request 62 | language: bash 63 | --- 64 | -------------------------------------------------------------------------------- /_organization/org-account-assignment-replace-v2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Replace Existing Organization Account Assignment 3 | position: 11 4 | description: Replace an organization's current account assignments with a new list of accounts. This endpoint removes all accounts currently assigned to the organization and replaces them with the new accounts. 5 | type: put 6 | endpoint: https://chapi.cloudhealthtech.com/v2/organizations/:org_id/accounts 7 | parameters: 8 | - name: aws_accounts 9 | required: no 10 | content: Enter a comma-separated list of AWS account IDs (also known as the owner ID) that should be assigned to the organization. The account IDs can be retrieved using the [Search for Assets](#asset_search-for-assets) endpoint. You can assign up to 500 AWS accounts per endpoint. 11 | - name: azure_subscriptions 12 | required: no 13 | content: Enter a comma-separated list of Azure subscription GUIDs that should be assigned to the organization. The subscription GUIDs can be retrieved using the [Search for Assets](#asset_search-for-assets) endpoint. You can assign up to 500 Azure accounts per endpoint. 14 | - name: gcp_compute_projects 15 | required: no 16 | content: Enter a comma-separated list of GCP project IDs that should be assigned to the organization. The project IDs can be retrieved using the [Search for Assets](#asset_search-for-assets) endpoint. You can assign up to 500 GCP projects per endpoint. 17 | - name: data_center_accounts 18 | required: no 19 | content: Enter a comma-separated list of Data Center account names that should be assigned to the organization. The account names can be retrieved using the [Search for Assets](#asset_search-for-assets) endpoint. You can assign up to 500 Data Center accounts per endpoint. 20 | right_code_blocks: 21 | - code_block: |- 22 | { 23 | "aws_accounts":["12345","67890"], 24 | "azure_subscriptions":["151f9055-7a93-4bbb","700f3a5c-8c56-44b9"], 25 | "gcp_compute_projects":["gcp-project-name","gcp-new-project"], 26 | "data_center_accounts":["myplace-datacenter"] 27 | } 28 | title: Request Body 29 | language: json 30 | - code_block: |- 31 | [{ 32 | "id":"6116033432624", 33 | "name": "abc", 34 | "description": "abc 123", 35 | "idp_name": "abc", 36 | "flex_org": false, 37 | "default_organization": true, 38 | "assigned_users_count": 124, 39 | "num_aws_accounts": 118, 40 | "num_azure_subscriptions": 25, 41 | "num_gcp_compute_projects": 15, 42 | "num_data_center_accounts": 84, 43 | "num_vmware_csp_organizations": 1 44 | }] 45 | title: Response Body 46 | language: json 47 | - code_block: |- 48 | curl --request PUT -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 49 | '{ 50 | "aws_accounts":["12345","67890"], 51 | "azure_subscriptions":["151f9055-7a93-4bbb","700f3a5c-8c56-44b9"], 52 | "gcp_compute_projects":["gcp-project-name","gcp-new-project"], 53 | "data_center_accounts":["myplace-datacenter"] 54 | }' 55 | 'https://chapi.cloudhealthtech.com/v2/organizations//accounts>' 56 | title: Sample Request 57 | language: bash 58 | --- 59 | -------------------------------------------------------------------------------- /_organization/org-account-assignment-append.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Add Accounts to Existing Organization Account Assignment 3 | position: 8 4 | description: Add one of more accounts to an organization. 5 | type: patch 6 | endpoint: https://chapi.cloudhealthtech.com/v2/organizations/:org_id/accounts 7 | parameters: 8 | - name: accounts 9 | required: yes 10 | content: Enter `add` to append accounts to the organization. 11 | - name: aws_accounts 12 | required: no 13 | content: Enter a comma-separated list of AWS account IDs (also known as the owner ID) that should be assigned to the organization. The account IDs can be retrieved using the [Search for Assets](#asset_search-for-assets) endpoint. You can assign up to 500 AWS accounts per endpoint. 14 | - name: azure_subscriptions 15 | required: no 16 | content: Enter a comma-separated list of Azure subscription GUIDs that should be assigned to the organization. The subscription GUIDs can be retrieved using the [Search for Assets](#asset_search-for-assets) endpoint. You can assign up to 500 Azure accounts per endpoint. 17 | - name: gcp_compute_projects 18 | required: no 19 | content: Enter a comma-separated list of GCP project IDs that should be assigned to the organization. The project IDs can be retrieved using the [Search for Assets](#asset_search-for-assets) endpoint. You can assign up to 500 GCP projects per endpoint. 20 | - name: data_center_accounts 21 | required: no 22 | content: Enter a comma-separated list of Data Center account names that should be assigned to the organization. The account names can be retrieved using the [Search for Assets](#asset_search-for-assets) endpoint. You can assign up to 500 Data Center accounts per endpoint. 23 | right_code_blocks: 24 | - code_block: |- 25 | { 26 | "accounts":"add", 27 | "aws_accounts":["12345","67890"], 28 | "azure_subscriptions":["151f9055-7a93-4bbb","700f3a5c-8c56-44b9"], 29 | "gcp_compute_projects":["gcp-project-name","gcp-new-project"], 30 | "data_center_accounts":["myplace-datacenter"] 31 | } 32 | title: Request Body 33 | language: json 34 | - code_block: |- 35 | [{ 36 | "id":"6116033432624", 37 | "name": "abc", 38 | "description": "abc 123", 39 | "idp_name": "abc", 40 | "flex_org": false, 41 | "default_organization": true, 42 | "assigned_users_count": 124, 43 | "num_aws_accounts": 118, 44 | "num_azure_subscriptions": 25, 45 | "num_gcp_compute_projects": 15, 46 | "num_data_center_accounts": 84, 47 | "num_vmware_csp_organizations": 1 48 | }] 49 | title: Response Body 50 | language: json 51 | - code_block: |- 52 | curl --request PATCH -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d 53 | '{ 54 | "accounts":"add", 55 | "aws_accounts":["12345","67890"], 56 | "azure_subscriptions":["151f9055-7a93-4bbb","700f3a5c-8c56-44b9"], 57 | "gcp_compute_projects":["gcp-project-name","gcp-new-project"], 58 | "data_center_accounts":["myplace-datacenter"] 59 | }' 60 | 'https://chapi.cloudhealthtech.com/v2/organizations//accounts' 61 | title: Sample Request 62 | language: bash 63 | --- 64 | -------------------------------------------------------------------------------- /_perspectives/create-perspective-schema.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Create Perspective Schema 3 | position: 6 4 | description: Create a Perspective and associate it with a new schema. The ID of the new Perspective is returned in the message field in the POST response. 5 | type: post 6 | endpoint: https://chapi.cloudhealthtech.com/v1/perspective_schemas/ 7 | parameters: 8 | - name: include_version 9 | required: no 10 | content: Boolean that defines whether the current version of the perspective is returned in the response. 11 | - name: org_id 12 | required: no 13 | content: String that specifies the ID of the organization in which this query should run. See [How to Get Organization ID](#organization_how-to-get-organization-id). If not specified, this parameter assumes the ID of your default organization. 14 | - name: client_api_id 15 | required: no 16 | content: String that specifies the unique customer API Key that CloudHealth generates. See [How to Get Client API ID](#partner_how-to-get-client-api-id). 17 | content_markdown: |- 18 | #### How to Duplicate a Perspective 19 | To duplicate a Perspective, retrieve the schema from the source Perspective (e.g., Perspective A) and POST that schema with a new name (e.g., Perspective B) to create a duplicate of Perspective A. All references in the schema rules to existing groups and blocks in Perspective A are seen as directives to create corresponding groups in Perspective B. Perspective A and its Groups remain unchanged. 20 | 21 | #### How to Add a Perspective Group 22 | When creating a Perspective, if your schema contains a reference to a Group that does not exist within the Perspective, the POST call creates that Group in the Perspective. Therefore, if there are rules in your schema that reference a Group that does not exist in the Perspective, the POST call creates that new Group and associates those rules with the newly created Group. 23 | 24 | For example, this POST call creates a Perspective: 25 | ``` 26 | curl -H 'Content-Type: application/json' -XPOST "https://chapi.cloudhealthtech.com/v1/perspective_schemas?api_key=" -d '{"schema":{"name":"Test 1000002","rules":[{"type":"filter","asset":"AwsInstance","to":"new group 1","condition":{"clauses":[{"field":["Active?"],"op":"=","val":"true"}]}},{"type":"filter","asset":"AwsInstance","to":"new group 1","condition":{"clauses":[{"field":["First Discovered"],"op":">","val":"2016-01-04T23:19:34+00:00"}]}}],"constants":[],"merges":[]}' 27 | ``` 28 | 29 | When you make a subsequent GET call to retrieve this schema, a new group (Group-1) is created and displayed in the response. All references to `new group 1` in the schema are converted into references to the newly created group. 30 | right_code_blocks: 31 | - code_block: |- 32 | curl -s -H 'Content-Type: application/json' -XPOST "https://chapi.cloudhealthtech.com/v1/perspective_schemas/?api_key=" -d '{"schema": {"name": "Environment","include_in_reports": "true", 33 | "rules": [{"type": "categorize","asset": "AwsAsset","tag_field": ["cht_env"],"ref_id": "5841XXXXXXX853","name": "AWS Assets"}], 34 | "merges": [{"type": "Group","to": "584XXXXX39263","from": ["584YYYYYY9283"]}], 35 | "constants": [{"type": "Dynamic Group Block","list": [{"ref_id": "ABCDEFG522853","name": "AWS Assets"}], 36 | }}' 37 | title: Post 38 | language: bash 39 | --- 40 | -------------------------------------------------------------------------------- /_policies/get-policy-summary.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get All Policies 3 | position: 2 4 | description: Retrieve a list of all policies in your organization or in the specified partner customer's default organization. 5 | type: get 6 | endpoint: https://chapi.cloudhealthtech.com/v1/policies 7 | parameters: 8 | - name: api_key 9 | required: no 10 | content: String that specifies the unique customer API Key, or Client API ID, that CloudHealth generates. Use this parameter if you are a partner who wants to retrieve a list of all policies belonging to a partner customer. See [How to Get Client API ID](#partner_how-to-get-client-api-id). 11 | - name: per_page 12 | required: no 13 | content: Specify how many results should be displayed per page. Default value is 30. 14 | - name: page 15 | required: no 16 | content: Specify the page number for results. 17 | content_markdown: |- 18 | | Response Code | Description | 19 | | -------------------------- | ------------------------ | 20 | | `403 Forbidden` | Missing API Key
      Unable to find Client ID from Partner Customers
      User does not have role permission to use this endpoint | 21 | | `422 Unprocessable Entity` | Exceeded maximum 30 per page
      Page parameters must be greater than zero | 22 | right_code_blocks: 23 | - code_block: |- 24 | { 25 | "policies": [ 26 | { 27 | "id": 152, 28 | "name": "Missing cht_owner Tag", 29 | "description": "A block for each asset type", 30 | "user_defined": true, 31 | "creator": "John Doe", 32 | "creator_email": "jdoe@cloudhealthtech.com", 33 | "last_editor": "John Doe", 34 | "last_editor_email": "jdoe@cloudhealthtech.com", 35 | "enabled": true, 36 | "last_evaluation": "2019-05-23 20:19:42 UTC", 37 | "created_at": "2017-08-02 17:39:56 UTC", 38 | }, 39 | { 40 | "id": 151, 41 | "name": "CIS AWS Foundations", 42 | "description": "Center for Internet Security (CIS) security benchmark providing best practices securing AWS environments. This policy can be used to validate your adherence to important security recommendations.", 43 | "user_defined": true, 44 | "creator": null, 45 | "creator_email": null, 46 | "last_editor": null, 47 | "last_editor_email": null, 48 | "enabled":true, 49 | "last_evaluation": "2019-05-23 20:19:42 UTC", 50 | "created_at": "2016-11-28 03:57:14 UTC" 51 | } 52 | ], 53 | "_links" : { 54 | "next" : { 55 | "href": "cloudhealthtech.com/v1/policies?api_key=4760&per_page=20&page=3" 56 | }, 57 | "prev" : { 58 | "href": "cloudhealthtech.com/v1/policies?api_key=4760&per_page=20&page=1" 59 | } 60 | } 61 | } 62 | title: Response Body 63 | language: json 64 | - code_block: |- 65 | curl --request GET \ 66 | 'https://chapi.cloudhealthtech.com/v1/policies?api_key=&per_page=&page=' \ 67 | -H 'Authorization: Bearer ' 68 | -H 'Content-Type: application/json' 69 | title: Sample Request 70 | language: bash 71 | --- 72 | -------------------------------------------------------------------------------- /_sass/_borland.scss: -------------------------------------------------------------------------------- 1 | code .hll { background-color: #ffffcc } 2 | code .c { color: #aaaaaa; font-style: italic } /* Comment */ 3 | code .err { color: #F00000; background-color: #F0A0A0 } /* Error */ 4 | code .k { color: #0000aa } /* Keyword */ 5 | code .cm { color: #aaaaaa; font-style: italic } /* Comment.Multiline */ 6 | code .cp { color: #4c8317 } /* Comment.Preproc */ 7 | code .c1 { color: #aaaaaa; font-style: italic } /* Comment.Single */ 8 | code .cs { color: #0000aa; font-style: italic } /* Comment.Special */ 9 | code .gd { color: #aa0000 } /* Generic.Deleted */ 10 | code .ge { font-style: italic } /* Generic.Emph */ 11 | code .gr { color: #aa0000 } /* Generic.Error */ 12 | code .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 13 | code .gi { color: #00aa00 } /* Generic.Inserted */ 14 | code .go { color: #888888 } /* Generic.Output */ 15 | code .gp { color: #555555 } /* Generic.Prompt */ 16 | code .gs { font-weight: bold } /* Generic.Strong */ 17 | code .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 18 | code .gt { color: #aa0000 } /* Generic.Traceback */ 19 | code .kc { color: #0000aa } /* Keyword.Constant */ 20 | code .kd { color: #0000aa } /* Keyword.Declaration */ 21 | code .kn { color: #0000aa } /* Keyword.Namespace */ 22 | code .kp { color: #0000aa } /* Keyword.Pseudo */ 23 | code .kr { color: #0000aa } /* Keyword.Reserved */ 24 | code .kt { color: #00aaaa } /* Keyword.Type */ 25 | code .m { color: #009999 } /* Literal.Number */ 26 | code .s { color: #aa5500 } /* Literal.String */ 27 | code .na { color: #1e90ff } /* Name.Attribute */ 28 | code .nb { color: #00aaaa } /* Name.Builtin */ 29 | code .nc { color: #00aa00; text-decoration: underline } /* Name.Class */ 30 | code .no { color: #aa0000 } /* Name.Constant */ 31 | code .nd { color: #888888 } /* Name.Decorator */ 32 | code .ni { color: #800000; font-weight: bold } /* Name.Entity */ 33 | code .nf { color: #00aa00 } /* Name.Function */ 34 | code .nn { color: #00aaaa; text-decoration: underline } /* Name.Namespace */ 35 | code .nt { color: #1e90ff; font-weight: bold } /* Name.Tag */ 36 | code .nv { color: #aa0000 } /* Name.Variable */ 37 | code .ow { color: #0000aa } /* Operator.Word */ 38 | code .w { color: #bbbbbb } /* Text.Whitespace */ 39 | code .mf { color: #009999 } /* Literal.Number.Float */ 40 | code .mh { color: #009999 } /* Literal.Number.Hex */ 41 | code .mi { color: #009999 } /* Literal.Number.Integer */ 42 | code .mo { color: #009999 } /* Literal.Number.Oct */ 43 | code .sb { color: #aa5500 } /* Literal.String.Backtick */ 44 | code .sc { color: #aa5500 } /* Literal.String.Char */ 45 | code .sd { color: #aa5500 } /* Literal.String.Doc */ 46 | code .s2 { color: #aa5500 } /* Literal.String.Double */ 47 | code .se { color: #aa5500 } /* Literal.String.Escape */ 48 | code .sh { color: #aa5500 } /* Literal.String.Heredoc */ 49 | code .si { color: #aa5500 } /* Literal.String.Interpol */ 50 | code .sx { color: #aa5500 } /* Literal.String.Other */ 51 | code .sr { color: #009999 } /* Literal.String.Regex */ 52 | code .s1 { color: #aa5500 } /* Literal.String.Single */ 53 | code .ss { color: #0000aa } /* Literal.String.Symbol */ 54 | code .bp { color: #00aaaa } /* Name.Builtin.Pseudo */ 55 | code .vc { color: #aa0000 } /* Name.Variable.Class */ 56 | code .vg { color: #aa0000 } /* Name.Variable.Global */ 57 | code .vi { color: #aa0000 } /* Name.Variable.Instance */ 58 | code .il { color: #009999 } /* Literal.Number.Integer.Long */ 59 | -------------------------------------------------------------------------------- /_reporting/get-standard-reports.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: List Reports of Specific Type 3 | type: get 4 | description: Retrieve the list of available Standard OLAP reports of a specify type. 5 | position: 6 6 | endpoint: https://chapi.cloudhealthtech.com/olap_reports/:report-type 7 | parameters: 8 | - name: org_id 9 | required: no 10 | content: String that specifies the ID of the organization in which this query should run. See [How to Get Organization ID](#organization_how-to-get-organization-id). If not specified, this parameter assumes the ID of your default organization. 11 | content_markdown: |- 12 | Retrieving a list of all reports of a specific type, such as `/cost`, `/custom`, `/performance`, or `/usage` is a two-step process. 13 | 14 | 1. Get the endpoints for all types of Standard reports. 15 | 16 | `curl -H 'Authorization: Bearer ' -H 'Accept: application/json' 'https://chapi.cloudhealthtech.com/olap_reports'` 17 | 18 | This query returns the following response. 19 | 20 | ``` 21 | { 22 | "links": { 23 | "cost": { 24 | "href": "https://chapi.cloudhealthtech.com/olap_reports/cost" 25 | }, 26 | "custom": { 27 | "href": "https://chapi.cloudhealthtech.com/olap_reports/custom" 28 | }, 29 | "performance": { 30 | "href": "https://chapi.cloudhealthtech.com/olap_reports/performance" 31 | }, 32 | "usage": { 33 | "href": "https://chapi.cloudhealthtech.com/olap_reports/usage" 34 | } 35 | } 36 | } 37 | ``` 38 | 39 | 2. Query the endpoint for the type of report from this response and get a list of all reports of that type. 40 | 41 | `curl -H 'Authorization: Bearer ' -H 'Accept: application/json' 'https://chapi.cloudhealthtech.com/olap_reports/cost'` 42 | right_code_blocks: 43 | - code_block: |- 44 | curl -H 'Authorization: Bearer ' -H 'Accept: application/json' 'https://chapi.cloudhealthtech.com/olap_reports' 45 | 46 | curl -H 'Authorization: Bearer ' -H 'Accept: application/json' 'https://chapi.cloudhealthtech.com/olap_reports/cost'` 47 | title: Request 48 | language: bash 49 | - code_block: |- 50 | { 51 | "links": { 52 | "amortized": { 53 | "href": "https://chapi.cloudhealthtech.com/olap_reports/cost/amortized" 54 | }, 55 | "current": { 56 | "href": "https://chapi.cloudhealthtech.com/olap_reports/cost/current" 57 | }, 58 | "history": { 59 | "href": "https://chapi.cloudhealthtech.com/olap_reports/cost/history" 60 | }, 61 | "instance": { 62 | "href": "https://chapi.cloudhealthtech.com/olap_reports/cost/instance" 63 | }, 64 | "rds": { 65 | "href": "https://chapi.cloudhealthtech.com/olap_reports/cost/rds" 66 | }, 67 | "ri_amortization": { 68 | "href": "https://chapi.cloudhealthtech.com/olap_reports/cost/ri_amortization" 69 | }, 70 | "s3": { 71 | "href": "https://chapi.cloudhealthtech.com/olap_reports/cost/s3" 72 | }, 73 | "volume": { 74 | "href": "https://chapi.cloudhealthtech.com/olap_reports/cost/volume" 75 | } 76 | } 77 | } 78 | title: Response 79 | language: json 80 | --- 81 | -------------------------------------------------------------------------------- /_price-book/price-book-test.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Test New Price Book 3 | position: 9 4 | description: Test a customer's new custom price book without impacting the customer's CloudHealth environment. The test results are emailed to the email address specified in the partner CloudHealth account profile. For more details, see [Understand Price Book Test Results](#price-book_understand-price-book-test-results).
      **note:** Enclose each parameter in double quotes. 5 | 6 | type: put 7 | endpoint: https://chapi.cloudhealthtech.com/v1/price_books/dry_run 8 | parameters: 9 | - name: price_book_id 10 | required: yes 11 | content: String that specifies which custom price book to use. 12 | - name: target_client_api_id 13 | required: yes 14 | content: String that specifies which customer's client_api_id to test the custom price book on. 15 | - name: month 16 | required: yes 17 | content: String that specifies the bill month to test the custom price book on. 18 | - name: billing_account_owner_id 19 | required: yes 20 | content: String that specifies which account to test the custom price book on. 21 | - name: upload_to_s3 22 | optional: yes 23 | content: If set to true, the test results will be uploaded to the Bill Generation S3 bucket configured in the UI under **Setup** > **Admin** > **Settings**, within the ‘cpb-dryrun-results' directory. The default value is false. 24 | 25 | right_code_blocks: 26 | - code_block: |- 27 | { 28 | "price_book_id": XXXX, 29 | "customer_id": , 30 | "month": "2018-01", 31 | "billing_account_owner_id": 1234 32 | } 33 | title: Request Body 34 | language: json 35 | - code_block: |- 36 | curl --request PUT -H 'Content-Type: application/json' -d 37 | '{ 38 | "price_book_id": XXXX, 39 | "target_client_api_id": , 40 | "month": "2018-01", 41 | "billing_account_owner_id": 1234 42 | }' 43 | 'https://chapi.cloudhealthtech.com/v1/price_books/dry_run?api_key=' 44 | title: Sample Request 45 | language: bash 46 | - code_block: |- 47 | Success (200): 48 | { 49 | "message": Dry run request processing, you will receive an email with your results in a few minutes. Current rate limit job count equals 2 out of 4000 per hour" 50 | } 51 | title: Response Body 52 | language: json 53 | - code_block: |- 54 | { 55 | "price_book_id": XXXX, 56 | "customer_id": , 57 | "month": "2018-01", 58 | "billing_account_owner_id": 1234 59 | "upload_to_s3": true 60 | } 61 | title: Request Body 62 | language: json 63 | - code_block: |- 64 | curl --request PUT -H 'Content-Type: application/json' -d 65 | '{ 66 | "price_book_id": XXXX, 67 | "target_client_api_id": , 68 | "month": "2018-01", 69 | "billing_account_owner_id": 1234 70 | "upload_to_s3": true 71 | }' 72 | 'https://chapi.cloudhealthtech.com/v1/price_books/dry_run?api_key=' 73 | title: Sample Request 74 | language: bash 75 | - code_block: |- 76 | Success (200): 77 | { 78 | "message": "Dry run request processing, results will be uploaded to your Bill Generation S3 Bucket in a few minutes. Current rate limit job count equals 1 out of 4000 per hour" 79 | } 80 | title: Response Body 81 | language: json 82 | --- 83 | --------------------------------------------------------------------------------