Introduction

The IBM Cloud™ Usage Reports API provides details about the usage quantity and cost of resources in an account. Usage details are reported by the month in which they were incurred. Usage quantities and their corresponding costs are aggregated at the following levels:

  • Individual resource instances
  • Cloud Foundry organization or resource group
  • Entire account (all resources)

Endpoint

You access the Usage Reports API by sending requests to the https://billing.cloud.ibm.com endpoint.

Error handling

This API uses standard HTTP response codes to indicate whether a method completed successfully. A 200 response always indicates success. A 400 type response is some sort of failure, and a 500 type response usually indicates an internal system error.

Authentication

Access to the Usage Reporting API is enforced through both IBM Cloud Identity and Access Management (IAM) access tokens and Cloud Foundry access roles. For more information, see Managing access in IBM Cloud.

To work with the API, authenticate your app or service by including your IBM Cloud IAM access token in the API request authentication header:

-H 'Authorization: Bearer <IAM_TOKEN>'

You can retrieve an access token by first creating an API key, and then exchanging your API key for a IBM Cloud IAM token. For more information, see Getting an IBM Cloud IAM token by using an API key.

Methods

Get account billing summary

Returns the billing summary for the account for a given month. Users with the Administrator role on the Billing service can access this report.

GET /v4/accounts/{account_id}/summary/{billingmonth}
Request

Path Parameters

  • Account ID for which the summary is requested

  • Billing month for which the summary is requested in yyyy-mm format.

    Constraints: Value must match regular expression ^\d{4}\-(0?[1-9]|1[012])$

Response

Summary for the account for a given month.

Status Code

  • Account Summary

  • Unauthenticated

  • Unauthorized

  • Unexpected errors

Example responses
  • {
      "account_id": "test-account",
      "month": "2017-08",
      "resources": {
        "billable_cost": 52.829999980555556,
        "non_billable_cost": 0
      },
      "offers": [
        {
          "offer_id": "offer1",
          "credits_total": 4576,
          "offer_template": "",
          "valid_from": "2017-01-09T00:00:00.000Z",
          "expires_on": "2017-08-31T00:00:00.000Z",
          "is_recurring": false,
          "credits": {
            "starting_balance": 4500.26754230695,
            "balance": 4447.437542326395,
            "used": 52.829999980555556
          }
        }
      ],
      "subscription": {
        "overage": 0,
        "subscriptions": [
          {
            "subscription_id": "sub1",
            "charge_agreement_number": "0123445",
            "type": "SUBSCRIPTION",
            "subscription_amount": 100,
            "start": "2017-02-24T14:07:04.883Z",
            "end": "2019-01-24T14:07:04.882Z",
            "terms": [
              {
                "start": "2017-02-24T14:07:04.883Z",
                "end": "2018-02-24T14:07:04.000Z",
                "credits": {
                  "total": 1200,
                  "starting_balance": 1200,
                  "used": 0,
                  "balance": 1200
                }
              },
              {
                "start": "2018-02-24T14:07:04.000Z",
                "end": "2019-01-24T14:07:04.882Z",
                "credits": {
                  "total": 1100,
                  "starting_balance": 1100,
                  "used": 0,
                  "balance": 1100
                }
              }
            ],
            "credits_total": 2300
          }
        ]
      },
      "support": [
        {
          "cost": 10000,
          "type": "PREMIUM",
          "overage": 0
        }
      ],
      "billing_country_code": "USA",
      "billing_currency_code": "USD"
    }

Get account usage

Returns aggregated usage for all of the resources and plans in an account in a given month. Users with the Administrator role on the Billing service can access this report.

GET /v4/accounts/{account_id}/usage/{billingmonth}
Request

Path Parameters

  • Account ID for which the usage is requested

  • Month for which the usage is requested

    Constraints: Value must match regular expression ^\d{4}\-(0?[1-9]|1[012])$

Response

Aggregated usage and charges for all the plans in the account

Status Code

  • Status 200

  • Unauthenticated

  • Unauthorized

  • Unexpected errors

Example responses
  • {
        "pricing_country": "USA",
        "currency_code": "USD",
        "resources": [
            {
                "resource_id": "dff97f5c-bc5e-4455-b470-411c3edbe49c",
                "billable_cost": 0,
                "non_billable_cost": 0.006890350634753705,
                "plans": [
                    {
                        "plan_id": "744bfc56-d12c-4866-88d5-dac9139e0e5d",
                        "billable": false,
                        "pricing_region": "us",
                        "cost": 0.006890350634753705,
                        "usage": [
                            {
                                "metric": "STANDARD_STORAGE",
                                "unit": "GIGABYTE",
                                "price": [
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Step Tier",
                                        "price": 0.03,
                                        "quantity_tier": "499999"
                                    },
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Step Tier",
                                        "price": 0.026,
                                        "quantity_tier": "999999999"
                                    }
                                ],
                                "quantity": 0.10801757220178844,
                                "rateable_quantity": 0.10801757220178844,
                                "cost": 0.003240527166053653
                            },
                            {
                                "metric": "VAULT_STORAGE",
                                "unit": "GIGABYTE",
                                "price": [
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Step Tier",
                                        "price": 0.02,
                                        "quantity_tier": "499999"
                                    },
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Step Tier",
                                        "price": 0.018,
                                        "quantity_tier": "999999999"
                                    }
                                ],
                                "quantity": 0.16923565417528152,
                                "rateable_quantity": 0.16923565417528152,
                                "cost": 0.0033847130835056305
                            },
                            {
                                "metric": "COLD_VAULT_STORAGE",
                                "unit": "GIGABYTE",
                                "price": [
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Step Tier",
                                        "price": 0.011,
                                        "quantity_tier": "499999"
                                    },
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Step Tier",
                                        "price": 0.011,
                                        "quantity_tier": "999999999"
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "FLEX_STORAGE",
                                "unit": "GIGABYTE",
                                "price": [
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Step Tier",
                                        "price": 0.014,
                                        "quantity_tier": "499999"
                                    },
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Step Tier",
                                        "price": 0.014,
                                        "quantity_tier": "999999999"
                                    }
                                ],
                                "quantity": 0.0008602831512689587,
                                "rateable_quantity": 0.0008602831512689587,
                                "cost": 0.000012043964117765422
                            },
                            {
                                "metric": "FLEX_MAX_CAP",
                                "unit": "GIGABYTE",
                                "price": [
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Granular Tier",
                                        "price": 0.034,
                                        "quantity_tier": "1"
                                    }
                                ],
                                "quantity": 0.0008602831512689587,
                                "rateable_quantity": 0.0008602831512689587,
                                "cost": 0.000029249627143144596,
                                "non_chargeable": true
                            },
                            {
                                "metric": "STANDARD_BANDWIDTH",
                                "unit": "GIGABYTE",
                                "price": [
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Step Tier",
                                        "price": 0.09,
                                        "quantity_tier": "50000"
                                    },
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Step Tier",
                                        "price": 0.07,
                                        "quantity_tier": "150000"
                                    },
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Step Tier",
                                        "price": 0.05,
                                        "quantity_tier": "999999999"
                                    }
                                ],
                                "quantity": 0.00000491086393594742,
                                "rateable_quantity": 0.00000491086393594742,
                                "cost": 4.419777542352678e-7
                            },
                            {
                                "metric": "VAULT_BANDWIDTH",
                                "unit": "GIGABYTE",
                                "price": [
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Step Tier",
                                        "price": 0.09,
                                        "quantity_tier": "50000"
                                    },
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Step Tier",
                                        "price": 0.07,
                                        "quantity_tier": "150000"
                                    },
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Step Tier",
                                        "price": 0.05,
                                        "quantity_tier": "999999999"
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "COLD_VAULT_BANDWIDTH",
                                "unit": "GIGABYTE",
                                "price": [
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Step Tier",
                                        "price": 0.09,
                                        "quantity_tier": "50000"
                                    },
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Step Tier",
                                        "price": 0.07,
                                        "quantity_tier": "150000"
                                    },
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Step Tier",
                                        "price": 0.05,
                                        "quantity_tier": "999999999"
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "FLEX_BANDWIDTH",
                                "unit": "GIGABYTE",
                                "price": [
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Step Tier",
                                        "price": 0.09,
                                        "quantity_tier": "50000"
                                    },
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Step Tier",
                                        "price": 0.07,
                                        "quantity_tier": "150000"
                                    },
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Step Tier",
                                        "price": 0.05,
                                        "quantity_tier": "999999999"
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "VAULT_RETRIEVAL",
                                "unit": "GIGABYTE",
                                "price": [
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Granular Tier",
                                        "price": 0.01,
                                        "quantity_tier": "1"
                                    }
                                ],
                                "quantity": 0.00001244433224201202,
                                "rateable_quantity": 0.00001244433224201202,
                                "cost": 1.244433224201202e-7
                            },
                            {
                                "metric": "COLD_VAULT_RETRIEVAL",
                                "unit": "GIGABYTE",
                                "price": [
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Granular Tier",
                                        "price": 0.05,
                                        "quantity_tier": "1"
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "FLEX_RETRIEVAL",
                                "unit": "GIGABYTE",
                                "price": [
                                    {
                                        "unitQuantity": "1",
                                        "tier_model": "Granular Tier",
                                        "price": 0.029,
                                        "quantity_tier": "1"
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "STANDARD_CLASS_A_CALLS",
                                "unit": "API_CALLS",
                                "price": [
                                    {
                                        "unitQuantity": "1000",
                                        "tier_model": "Granular Tier",
                                        "price": 0.006,
                                        "quantity_tier": "1"
                                    }
                                ],
                                "quantity": 35,
                                "rateable_quantity": 35,
                                "cost": 0.00021
                            },
                            {
                                "metric": "VAULT_CLASS_A_CALLS",
                                "unit": "API_CALLS",
                                "price": [
                                    {
                                        "unitQuantity": "1000",
                                        "tier_model": "Granular Tier",
                                        "price": 0.0125,
                                        "quantity_tier": "1"
                                    }
                                ],
                                "quantity": 3,
                                "rateable_quantity": 3,
                                "cost": 0.0000375
                            },
                            {
                                "metric": "COLD_VAULT_CLASS_A_CALLS",
                                "unit": "API_CALLS",
                                "price": [
                                    {
                                        "unitQuantity": "1000",
                                        "tier_model": "Granular Tier",
                                        "price": 0.025,
                                        "quantity_tier": "1"
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "FLEX_CLASS_A_CALLS",
                                "unit": "API_CALLS",
                                "price": [
                                    {
                                        "unitQuantity": "1000",
                                        "tier_model": "Granular Tier",
                                        "price": 0.01,
                                        "quantity_tier": "1"
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "STANDARD_CLASS_B_CALLS",
                                "unit": "API_CALLS",
                                "price": [
                                    {
                                        "unitQuantity": "10000",
                                        "tier_model": "Granular Tier",
                                        "price": 0.005,
                                        "quantity_tier": "1"
                                    }
                                ],
                                "quantity": 10,
                                "rateable_quantity": 10,
                                "cost": 0.000005
                            },
                            {
                                "metric": "VAULT_CLASS_B_CALLS",
                                "unit": "API_CALLS",
                                "price": [
                                    {
                                        "unitQuantity": "10000",
                                        "tier_model": "Granular Tier",
                                        "price": 0.0125,
                                        "quantity_tier": "1"
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "COLD_VAULT_CLASS_B_CALLS",
                                "unit": "API_CALLS",
                                "price": [
                                    {
                                        "unitQuantity": "10000",
                                        "tier_model": "Granular Tier",
                                        "price": 0.025,
                                        "quantity_tier": "1"
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "FLEX_CLASS_B_CALLS",
                                "unit": "API_CALLS",
                                "price": [
                                    {
                                        "unitQuantity": "10000",
                                        "tier_model": "Granular Tier",
                                        "price": 0.01,
                                        "quantity_tier": "1"
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            }
                        ]
                    },
                    {
                        "plan_id": "2fdf0c08-2d32-4f46-84b5-32e0c92fffd8",
                        "billable": false,
                        "pricing_region": "global",
                        "cost": 0,
                        "usage": [
                            {
                                "metric": "STORAGE",
                                "unit": "GIGABYTE",
                                "price": [],
                                "quantity": 0.0004301415756344795,
                                "rateable_quantity": 0.0004301415756344795,
                                "cost": 0
                            },
                            {
                                "metric": "BANDWIDTH",
                                "unit": "GIGABYTE",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "RETRIEVAL",
                                "unit": "GIGABYTE",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "CLASS_A_CALLS",
                                "unit": "API_CALLS",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "CLASS_B_CALLS",
                                "unit": "API_CALLS",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            }
                        ]
                    }
                ]
            }
        ],
        "account_id": "b09edf5642ebfad587c594f4d4a354b0",
        "month": "2017-09"
    }
    

Get resource group usage

Returns aggregated usage for all of the resources and plans in a resource group in a given month. Users with the Administrator role on the Billing service can access this report.

GET /v4/accounts/{account_id}/resource_groups/{resource_group_id}/usage/{billingmonth}
Request

Path Parameters

  • Account ID containing the resource group

  • Resource group for which the usage is requested

  • Month for which the usage is requested

    Constraints: Value must match regular expression ^\d{4}\-(0?[1-9]|1[012])$

Response

Aggregated usage and charges for all the plans in the resource group

Status Code

  • Status 200

  • Unauthenticated

  • Unauthorized

  • Unexpected errors

Example responses
  • {
      "pricing_country": "USA",
      "currency_code": "USD",
      "resources": [
          {
              "resource_id": "dff97f5c-bc5e-4455-b470-411c3edbe49c",
              "billable_cost": 0,
              "non_billable_cost": 0.003452381490945816,
              "plans": [
                  {
                      "plan_id": "744bfc56-d12c-4866-88d5-dac9139e0e5d",
                      "billable": false,
                      "pricing_region": "us",
                      "cost": 0.003452381490945816,
                      "usage": [
                          {
                              "metric": "STANDARD_STORAGE",
                              "unit": "GIGABYTE",
                              "price": [
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Step Tier",
                                      "price": 0.03,
                                      "quantity_tier": "499999"
                                  },
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Step Tier",
                                      "price": 0.026,
                                      "quantity_tier": "999999999"
                                  }
                              ],
                              "quantity": 0,
                              "rateable_quantity": 0,
                              "cost": 0
                          },
                          {
                              "metric": "VAULT_STORAGE",
                              "unit": "GIGABYTE",
                              "price": [
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Step Tier",
                                      "price": 0.02,
                                      "quantity_tier": "499999"
                                  },
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Step Tier",
                                      "price": 0.018,
                                      "quantity_tier": "999999999"
                                  }
                              ],
                              "quantity": 0.16923565417528152,
                              "rateable_quantity": 0.16923565417528152,
                              "cost": 0.0033847130835056305
                          },
                          {
                              "metric": "COLD_VAULT_STORAGE",
                              "unit": "GIGABYTE",
                              "price": [
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Step Tier",
                                      "price": 0.011,
                                      "quantity_tier": "499999"
                                  },
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Step Tier",
                                      "price": 0.011,
                                      "quantity_tier": "999999999"
                                  }
                              ],
                              "quantity": 0,
                              "rateable_quantity": 0,
                              "cost": 0
                          },
                          {
                              "metric": "FLEX_STORAGE",
                              "unit": "GIGABYTE",
                              "price": [
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Step Tier",
                                      "price": 0.014,
                                      "quantity_tier": "499999"
                                  },
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Step Tier",
                                      "price": 0.014,
                                      "quantity_tier": "999999999"
                                  }
                              ],
                              "quantity": 0.0008602831512689587,
                              "rateable_quantity": 0.0008602831512689587,
                              "cost": 0.000012043964117765422
                          },
                          {
                              "metric": "FLEX_MAX_CAP",
                              "unit": "GIGABYTE",
                              "price": [
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Granular Tier",
                                      "price": 0.034,
                                      "quantity_tier": "1"
                                  }
                              ],
                              "quantity": 0.0008602831512689587,
                              "rateable_quantity": 0.0008602831512689587,
                              "cost": 0.000029249627143144596,
                              "non_chargeable": true
                          },
                          {
                              "metric": "STANDARD_BANDWIDTH",
                              "unit": "GIGABYTE",
                              "price": [
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Step Tier",
                                      "price": 0.09,
                                      "quantity_tier": "50000"
                                  },
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Step Tier",
                                      "price": 0.07,
                                      "quantity_tier": "150000"
                                  },
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Step Tier",
                                      "price": 0.05,
                                      "quantity_tier": "999999999"
                                  }
                              ],
                              "quantity": 0,
                              "rateable_quantity": 0,
                              "cost": 0
                          },
                          {
                              "metric": "VAULT_BANDWIDTH",
                              "unit": "GIGABYTE",
                              "price": [
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Step Tier",
                                      "price": 0.09,
                                      "quantity_tier": "50000"
                                  },
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Step Tier",
                                      "price": 0.07,
                                      "quantity_tier": "150000"
                                  },
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Step Tier",
                                      "price": 0.05,
                                      "quantity_tier": "999999999"
                                  }
                              ],
                              "quantity": 0,
                              "rateable_quantity": 0,
                              "cost": 0
                          },
                          {
                              "metric": "COLD_VAULT_BANDWIDTH",
                              "unit": "GIGABYTE",
                              "price": [
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Step Tier",
                                      "price": 0.09,
                                      "quantity_tier": "50000"
                                  },
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Step Tier",
                                      "price": 0.07,
                                      "quantity_tier": "150000"
                                  },
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Step Tier",
                                      "price": 0.05,
                                      "quantity_tier": "999999999"
                                  }
                              ],
                              "quantity": 0,
                              "rateable_quantity": 0,
                              "cost": 0
                          },
                          {
                              "metric": "FLEX_BANDWIDTH",
                              "unit": "GIGABYTE",
                              "price": [
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Step Tier",
                                      "price": 0.09,
                                      "quantity_tier": "50000"
                                  },
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Step Tier",
                                      "price": 0.07,
                                      "quantity_tier": "150000"
                                  },
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Step Tier",
                                      "price": 0.05,
                                      "quantity_tier": "999999999"
                                  }
                              ],
                              "quantity": 0,
                              "rateable_quantity": 0,
                              "cost": 0
                          },
                          {
                              "metric": "VAULT_RETRIEVAL",
                              "unit": "GIGABYTE",
                              "price": [
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Granular Tier",
                                      "price": 0.01,
                                      "quantity_tier": "1"
                                  }
                              ],
                              "quantity": 0.00001244433224201202,
                              "rateable_quantity": 0.00001244433224201202,
                              "cost": 1.244433224201202e-7
                          },
                          {
                              "metric": "COLD_VAULT_RETRIEVAL",
                              "unit": "GIGABYTE",
                              "price": [
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Granular Tier",
                                      "price": 0.05,
                                      "quantity_tier": "1"
                                  }
                              ],
                              "quantity": 0,
                              "rateable_quantity": 0,
                              "cost": 0
                          },
                          {
                              "metric": "FLEX_RETRIEVAL",
                              "unit": "GIGABYTE",
                              "price": [
                                  {
                                      "unitQuantity": "1",
                                      "tier_model": "Granular Tier",
                                      "price": 0.029,
                                      "quantity_tier": "1"
                                  }
                              ],
                              "quantity": 0,
                              "rateable_quantity": 0,
                              "cost": 0
                          },
                          {
                              "metric": "STANDARD_CLASS_A_CALLS",
                              "unit": "API_CALLS",
                              "price": [
                                  {
                                      "unitQuantity": "1000",
                                      "tier_model": "Granular Tier",
                                      "price": 0.006,
                                      "quantity_tier": "1"
                                  }
                              ],
                              "quantity": 3,
                              "rateable_quantity": 3,
                              "cost": 0.000018
                          },
                          {
                              "metric": "VAULT_CLASS_A_CALLS",
                              "unit": "API_CALLS",
                              "price": [
                                  {
                                      "unitQuantity": "1000",
                                      "tier_model": "Granular Tier",
                                      "price": 0.0125,
                                      "quantity_tier": "1"
                                  }
                              ],
                              "quantity": 3,
                              "rateable_quantity": 3,
                              "cost": 0.0000375
                          },
                          {
                              "metric": "COLD_VAULT_CLASS_A_CALLS",
                              "unit": "API_CALLS",
                              "price": [
                                  {
                                      "unitQuantity": "1000",
                                      "tier_model": "Granular Tier",
                                      "price": 0.025,
                                      "quantity_tier": "1"
                                  }
                              ],
                              "quantity": 0,
                              "rateable_quantity": 0,
                              "cost": 0
                          },
                          {
                              "metric": "FLEX_CLASS_A_CALLS",
                              "unit": "API_CALLS",
                              "price": [
                                  {
                                      "unitQuantity": "1000",
                                      "tier_model": "Granular Tier",
                                      "price": 0.01,
                                      "quantity_tier": "1"
                                  }
                              ],
                              "quantity": 0,
                              "rateable_quantity": 0,
                              "cost": 0
                          },
                          {
                              "metric": "STANDARD_CLASS_B_CALLS",
                              "unit": "API_CALLS",
                              "price": [
                                  {
                                      "unitQuantity": "10000",
                                      "tier_model": "Granular Tier",
                                      "price": 0.005,
                                      "quantity_tier": "1"
                                  }
                              ],
                              "quantity": 0,
                              "rateable_quantity": 0,
                              "cost": 0
                          },
                          {
                              "metric": "VAULT_CLASS_B_CALLS",
                              "unit": "API_CALLS",
                              "price": [
                                  {
                                      "unitQuantity": "10000",
                                      "tier_model": "Granular Tier",
                                      "price": 0.0125,
                                      "quantity_tier": "1"
                                  }
                              ],
                              "quantity": 0,
                              "rateable_quantity": 0,
                              "cost": 0
                          },
                          {
                              "metric": "COLD_VAULT_CLASS_B_CALLS",
                              "unit": "API_CALLS",
                              "price": [
                                  {
                                      "unitQuantity": "10000",
                                      "tier_model": "Granular Tier",
                                      "price": 0.025,
                                      "quantity_tier": "1"
                                  }
                              ],
                              "quantity": 0,
                              "rateable_quantity": 0,
                              "cost": 0
                          },
                          {
                              "metric": "FLEX_CLASS_B_CALLS",
                              "unit": "API_CALLS",
                              "price": [
                                  {
                                      "unitQuantity": "10000",
                                      "tier_model": "Granular Tier",
                                      "price": 0.01,
                                      "quantity_tier": "1"
                                  }
                              ],
                              "quantity": 0,
                              "rateable_quantity": 0,
                              "cost": 0
                          }
                      ]
                  },
                  {
                      "plan_id": "2fdf0c08-2d32-4f46-84b5-32e0c92fffd8",
                      "billable": false,
                      "pricing_region": "global",
                      "cost": 0,
                      "usage": [
                          {
                              "metric": "STORAGE",
                              "unit": "GIGABYTE",
                              "price": [],
                              "quantity": 0.0004301415756344795,
                              "rateable_quantity": 0.0004301415756344795,
                              "cost": 0
                          },
                          {
                              "metric": "BANDWIDTH",
                              "unit": "GIGABYTE",
                              "price": [],
                              "quantity": 0,
                              "rateable_quantity": 0,
                              "cost": 0
                          },
                          {
                              "metric": "RETRIEVAL",
                              "unit": "GIGABYTE",
                              "price": [],
                              "quantity": 0,
                              "rateable_quantity": 0,
                              "cost": 0
                          },
                          {
                              "metric": "CLASS_A_CALLS",
                              "unit": "API_CALLS",
                              "price": [],
                              "quantity": 0,
                              "rateable_quantity": 0,
                              "cost": 0
                          },
                          {
                              "metric": "CLASS_B_CALLS",
                              "unit": "API_CALLS",
                              "price": [],
                              "quantity": 0,
                              "rateable_quantity": 0,
                              "cost": 0
                          }
                      ]
                  }
              ]
          }
      ],
      "account_id": "b09edf5642ebfad587c594f4d4a354b0",
      "resource_group_id": "bce390f8721e46bdabd4ec34addecb06",
      "month": "2017-09"
    }
    

Get Cloud Foundry org usage

Returns aggregated usage for all the resources and plans in a Cloud Foundry organization in a given month. Users with the Administrator role on the Billing service or the Billing Manager role on the Cloud Foundry org can access this report.

GET /v4/accounts/{account_id}/organizations/{organization_id}/usage/{billingmonth}
Request

Path Parameters

  • ID of the account containing the organization

  • ID of the organization

  • Month for which the usage is requested

    Constraints: Value must match regular expression ^\d{4}\-(0?[1-9]|1[012])$

Response

Aggregated usage and charges for all the plans in the org

Status Code

  • Status 200

  • Unauthenticated

  • Unauthorized

  • Unexpected errors

Example responses
  • {
        "pricing_country": "USA",
        "currency_code": "USD",
        "resources": [
            {
                "resource_id": "platform-a495-4aa1-9ef9-40b88a42d776",
                "billable_cost": 0,
                "non_billable_cost": 686.9073718764323,
                "plans": [
                    {
                        "plan_id": "04082014.ibm.platform.default",
                        "billable": false,
                        "cost": 686.9073718764323,
                        "usage": [
                            {
                                "metric": "GB_HOURS_PER_MONTH",
                                "unit": "GB-HOURS",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "100",
                                        "price": 7
                                    }
                                ],
                                "quantity": 9812.962455377605,
                                "rateable_quantity": 9812.962455377605,
                                "cost": 686.9073718764323
                            }
                        ]
                    }
                ]
            },
            {
                "resource_id": "sdk-for-nodejs",
                "billable_cost": 0,
                "non_billable_cost": 25012.305433024216,
                "plans": [
                    {
                        "plan_id": "04082014.ibm.node.default",
                        "billable": false,
                        "cost": 25012.305433024216,
                        "usage": [
                            {
                                "metric": "GB_HOURS_PER_MONTH",
                                "unit": "GB-HOURS",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "100",
                                        "price": 7
                                    }
                                ],
                                "quantity": 357318.6490432031,
                                "rateable_quantity": 357318.6490432031,
                                "cost": 25012.305433024216
                            }
                        ]
                    }
                ]
            },
            {
                "resource_id": "liberty-for-java",
                "billable_cost": 0,
                "non_billable_cost": 190.7693471736111,
                "plans": [
                    {
                        "plan_id": "04082014.ibm.liberty.default",
                        "billable": false,
                        "cost": 190.7693471736111,
                        "usage": [
                            {
                                "metric": "GB_HOURS_PER_MONTH",
                                "unit": "GB-HOURS",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "100",
                                        "price": 7
                                    }
                                ],
                                "quantity": 2725.2763881944443,
                                "rateable_quantity": 2725.2763881944443,
                                "cost": 190.7693471736111
                            }
                        ]
                    }
                ]
            },
            {
                "resource_id": "5acdbc42-8965-48f9-8a3c-1c728b6ed2c4",
                "billable_cost": 0,
                "non_billable_cost": 720,
                "plans": [
                    {
                        "plan_id": "7f19407b-f9fd-4e74-8c75-3355eee89628",
                        "billable": false,
                        "cost": 720,
                        "usage": [
                            {
                                "metric": "INSTANCES_PER_MONTH",
                                "unit": "INSTANCE",
                                "price": [],
                                "quantity": 8,
                                "rateable_quantity": 8,
                                "cost": 0
                            },
                            {
                                "metric": "HOSTS_HOURS_PER_MONTH",
                                "unit": "HOUR",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "1",
                                        "price": 3.75
                                    }
                                ],
                                "quantity": 192,
                                "rateable_quantity": 192,
                                "cost": 720
                            }
                        ]
                    }
                ]
            },
            {
                "resource_id": "cloudant",
                "billable_cost": 0,
                "non_billable_cost": 77.05499999999999,
                "plans": [
                    {
                        "plan_id": "cloudant-shared",
                        "billable": false,
                        "cost": 0.3,
                        "usage": [
                            {
                                "metric": "STORAGE_PER_MONTH",
                                "unit": "GIGABYTE",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "100",
                                        "price": 100
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "LIGHT_API_CALLS_PER_MONTH",
                                "unit": "LIGHT_API_CALL",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "100",
                                        "price": 3
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "HEAVY_API_CALLS_PER_MONTH",
                                "unit": "HEAVY_API_CALL",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "100",
                                        "price": 15
                                    }
                                ],
                                "quantity": 1800,
                                "rateable_quantity": 2,
                                "cost": 0.3
                            },
                            {
                                "metric": "LOOKUPS_PER_MONTH",
                                "unit": "LOOKUP",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "WRITES_PER_MONTH",
                                "unit": "WRITE",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "QUERIES_PER_MONTH",
                                "unit": "QUERY",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "STORAGE_MANAGED_PER_MONTH",
                                "unit": "GIGABYTE",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            }
                        ]
                    },
                    {
                        "plan_id": "cloudant-standard",
                        "billable": false,
                        "cost": 76.755,
                        "usage": [
                            {
                                "metric": "STORAGE_PER_MONTH",
                                "unit": "GIGABYTE",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "LIGHT_API_CALLS_PER_MONTH",
                                "unit": "LIGHT_API_CALL",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "HEAVY_API_CALLS_PER_MONTH",
                                "unit": "HEAVY_API_CALL",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "LOOKUPS_PER_MONTH",
                                "unit": "LOOKUP",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Step Tier",
                                        "unitQuantity": "100",
                                        "price": 25
                                    }
                                ],
                                "quantity": 102.34,
                                "rateable_quantity": 102.34,
                                "cost": 25.585
                            },
                            {
                                "metric": "WRITES_PER_MONTH",
                                "unit": "WRITE",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Step Tier",
                                        "unitQuantity": "100",
                                        "price": 50
                                    }
                                ],
                                "quantity": 51.17,
                                "rateable_quantity": 51.17,
                                "cost": 25.585
                            },
                            {
                                "metric": "QUERIES_PER_MONTH",
                                "unit": "QUERY",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Step Tier",
                                        "unitQuantity": "100",
                                        "price": 500
                                    }
                                ],
                                "quantity": 5.117,
                                "rateable_quantity": 5.117,
                                "cost": 25.585
                            },
                            {
                                "metric": "STORAGE_MANAGED_PER_MONTH",
                                "unit": "GIGABYTE",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Step Tier",
                                        "unitQuantity": "100",
                                        "price": 100
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            }
                        ]
                    }
                ]
            },
            {
                "resource_id": "IBM-Performance-Hub-1.0",
                "billable_cost": 0,
                "non_billable_cost": 0,
                "plans": [
                    {
                        "plan_id": "Free-IBM-Performance-Hub-1.0",
                        "billable": false,
                        "cost": 0,
                        "usage": [
                            {
                                "metric": "DATA_POINTS_PER_MONTH",
                                "unit": "DATA_POINT",
                                "price": [],
                                "quantity": 123184,
                                "rateable_quantity": 123184,
                                "cost": 0
                            }
                        ]
                    }
                ]
            },
            {
                "resource_id": "DataCache-20140407WXS",
                "billable_cost": 0,
                "non_billable_cost": 0,
                "plans": [
                    {
                        "plan_id": "ibm.DataCache.free",
                        "billable": false,
                        "cost": 0,
                        "usage": [
                            {
                                "metric": "MB_PER_MONTH",
                                "unit": "MEGABYTE",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "INSTANCES_PER_MONTH",
                                "unit": "INSTANCE",
                                "price": [],
                                "quantity": 1,
                                "rateable_quantity": 1,
                                "cost": 0
                            }
                        ]
                    }
                ]
            },
            {
                "resource_id": "ibm-container",
                "billable_cost": 0,
                "non_billable_cost": 2,
                "plans": [
                    {
                        "plan_id": "06182015.ibm.containers",
                        "billable": false,
                        "cost": 2,
                        "usage": [
                            {
                                "metric": "GB_HOURS_PER_MONTH",
                                "unit": "GB-HOURS",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "100",
                                        "price": 2.8
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "IPS_PER_MONTH",
                                "unit": "IP",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "1",
                                        "price": 2
                                    }
                                ],
                                "quantity": 1,
                                "rateable_quantity": 1,
                                "cost": 2
                            },
                            {
                                "metric": "STORAGE_PER_MONTH",
                                "unit": "GIGABYTE",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "1",
                                        "price": 14
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "STORAGE_BRONZE_PER_MONTH",
                                "unit": "GIGABYTE",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "1",
                                        "price": 0.15
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "STORAGE_SILVER_PER_MONTH",
                                "unit": "GIGABYTE",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "1",
                                        "price": 0.35
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "STORAGE_GOLD_PER_MONTH",
                                "unit": "GIGABYTE",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "1",
                                        "price": 0.58
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            }
                        ]
                    }
                ]
            },
            {
                "resource_id": "api-connect",
                "billable_cost": 0,
                "non_billable_cost": 1338600,
                "plans": [
                    {
                        "plan_id": "api-connect-enterprise25m",
                        "billable": false,
                        "cost": 1178600,
                        "usage": [
                            {
                                "metric": "API_CALLS_PER_MONTH",
                                "unit": "API_CALL",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "1",
                                        "price": 100
                                    }
                                ],
                                "quantity": 1193530688,
                                "rateable_quantity": 1168600000,
                                "cost": 1168600
                            },
                            {
                                "metric": "INSTANCES_PER_MONTH",
                                "unit": "INSTANCE",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "1",
                                        "price": 10000
                                    }
                                ],
                                "quantity": 1,
                                "rateable_quantity": 1,
                                "cost": 10000
                            }
                        ]
                    },
                    {
                        "plan_id": "api-connect-enterprise1b",
                        "billable": false,
                        "cost": 160000,
                        "usage": [
                            {
                                "metric": "API_CALLS_PER_MONTH",
                                "unit": "API_CALL",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "1",
                                        "price": 16
                                    }
                                ],
                                "quantity": 777509147,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "INSTANCES_PER_MONTH",
                                "unit": "INSTANCE",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "1",
                                        "price": 160000
                                    }
                                ],
                                "quantity": 1,
                                "rateable_quantity": 1,
                                "cost": 160000
                            }
                        ]
                    }
                ]
            },
            {
                "resource_id": "iotf-service-id",
                "billable_cost": 0,
                "non_billable_cost": 0,
                "plans": [
                    {
                        "plan_id": "iotf-service-asp-id",
                        "billable": false,
                        "cost": 0,
                        "usage": [
                            {
                                "metric": "ACTIVE_DEVICES_PER_MONTH",
                                "unit": "ACTIVE_DEVICE",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "MEGABYTES_TRANSMITTED_PER_MONTH",
                                "unit": "MEGABYTE",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "10000",
                                        "price": 13
                                    },
                                    {
                                        "quantity_tier": "45.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "10000",
                                        "price": 9.1
                                    },
                                    {
                                        "quantity_tier": "700.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "10000",
                                        "price": 1.82
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "STORAGE_PER_MONTH",
                                "unit": "GIGABYTE",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "PLAN_PER_MONTH",
                                "unit": "PLAN",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "EDGE_ANALYSIS_PER_MONTH",
                                "unit": "EDGE_MEGABYTE",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "10000",
                                        "price": 5
                                    },
                                    {
                                        "quantity_tier": "45.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "10000",
                                        "price": 3.5
                                    },
                                    {
                                        "quantity_tier": "700.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "10000",
                                        "price": 0.7
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "RTI_ANALYSIS_PER_MONTH",
                                "unit": "RTI_MEGABYTE",
                                "price": [
                                    {
                                        "quantity_tier": "1.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "10000",
                                        "price": 30
                                    },
                                    {
                                        "quantity_tier": "45.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "10000",
                                        "price": 21
                                    },
                                    {
                                        "quantity_tier": "700.000",
                                        "tier_model": "Granular Tier",
                                        "unitQuantity": "10000",
                                        "price": 4.2
                                    }
                                ],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            }
                        ]
                    },
                    {
                        "plan_id": "iotf-service-free-id",
                        "billable": false,
                        "cost": 0,
                        "usage": [
                            {
                                "metric": "ACTIVE_DEVICES_PER_MONTH",
                                "unit": "ACTIVE_DEVICE",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "MEGABYTES_TRANSMITTED_PER_MONTH",
                                "unit": "MEGABYTE",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "STORAGE_PER_MONTH",
                                "unit": "GIGABYTE",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "PLAN_PER_MONTH",
                                "unit": "PLAN",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "EDGE_ANALYSIS_PER_MONTH",
                                "unit": "EDGE_MEGABYTE",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "RTI_ANALYSIS_PER_MONTH",
                                "unit": "RTI_MEGABYTE",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            }
                        ]
                    }
                ]
            },
            {
                "resource_id": "CloudEventManagement16a036f0-f1fc-11e6-a38d-394caee7d66d",
                "billable_cost": 0,
                "non_billable_cost": 0,
                "plans": [
                    {
                        "plan_id": "af0a953b-f647-4b0b-b099-8dcc61a910ed",
                        "billable": false,
                        "cost": 0,
                        "usage": [
                            {
                                "metric": "EVENTS_PER_MONTH",
                                "unit": "EVENT",
                                "price": [],
                                "quantity": 410822,
                                "rateable_quantity": 410822,
                                "cost": 0
                            }
                        ]
                    }
                ]
            },
            {
                "resource_id": "c466e218-9188-4562-9af5-fc7e0dc790c5",
                "billable_cost": 0,
                "non_billable_cost": 0,
                "plans": [
                    {
                        "plan_id": "d5b9d765-8ff5-4772-9aac-2d7017044ae9",
                        "billable": false,
                        "cost": 0,
                        "usage": [
                            {
                                "metric": "API_CALLS_PER_MONTH",
                                "unit": "API_CALL",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            },
                            {
                                "metric": "EVENTS_PER_MONTH",
                                "unit": "EVENT",
                                "price": [],
                                "quantity": 33,
                                "rateable_quantity": 33,
                                "cost": 0
                            },
                            {
                                "metric": "EVENTS_STORED_PER_MONTH",
                                "unit": "EVENTS_STORED",
                                "price": [],
                                "quantity": 0,
                                "rateable_quantity": 0,
                                "cost": 0
                            }
                        ]
                    }
                ]
            }
        ],
        "account_id": "265d9d22597d4ee589138929093f1246",
        "organization_id": "us-south:54257f98-83f0-4eca-ae04-9ea35277a538",
        "month": "2017-07"
    }
    

Get resource instance usage in an account

Returns instance-level usage for resources in an account. Filter the results with query parameters. Users with the Administrator role on the Billing service can access this report.

GET /v4/accounts/{account_id}/resource_instances/usage/{billingmonth}
Request

Path Parameters

  • Account ID to which the resource instances belong to

  • Month for which the usage is requested

    Constraints: Value must match regular expression ^\d{4}\-(0?[1-9]|1[012])$

Query Parameters

  • Number of usage records returned. The default value is 10. Maximum value is 20.

    Constraints: 1 ≤ value ≤ 20

    Default: 10

  • The offset from which the records must be fetched. Offset information is included in the response.

  • Filter by resource group

  • Filter by organization_id

  • Filter by resource instance id

  • Filter by resource_id

  • Filter by plan_id

  • Region in which the resource instance is provisioned

Response

List of instnace usage reports

Status Code

  • Status 200

  • Status 400

  • Status 401

  • Status 500

Example responses
  • {
        "limit": 5,
        "count": 951,
        "first": {
            "href": "/v4/accounts/265d9d22597d4ee589138929093f1246/resource_instances/usage/2017-07?_limit=5"
        },
        "resources": [
            {
                "account_id": "265d9d22597d4ee589138929093f1246",
                "organization_id": "us-south:54257f98-83f0-4eca-ae04-9ea35277a538",
                "space_id": "f3663bbe-e7ea-478c-8956-e3afee1087aa",
                "resource_instance_id": "cloud-foundry-application:d9a1a0bc-8f93-4b30-ac5d-566616c46f51",
                "consumer_id": "cloud-foundry-application:d9a1a0bc-8f93-4b30-ac5d-566616c46f51:name:sdk-for-nodejs",
                "month": "2017-07",
                "pricing_country": "USA",
                "currency_code": "USD",
                "plan_id": "04082014.ibm.node.default",
                "resource_id": "sdk-for-nodejs",
                "billable": false,
                "region": "us-south",
                "usage": [
                    {
                        "metric": "GB_HOURS_PER_MONTH",
                        "unit": "GB-HOURS",
                        "price": [
                            {
                                "quantity_tier": "1.000",
                                "tier_model": "Granular Tier",
                                "unitQuantity": "100",
                                "price": 7
                            }
                        ],
                        "quantity": 278.56333333333333,
                        "cost": 19.499433333333332,
                        "rateable_quantity": 278.56333333333333
                    }
                ]
            },
            {
                "account_id": "265d9d22597d4ee589138929093f1246",
                "organization_id": "us-south:54257f98-83f0-4eca-ae04-9ea35277a538",
                "space_id": "f3663bbe-e7ea-478c-8956-e3afee1087aa",
                "resource_instance_id": "cloud-foundry-application:c228eb21-46dd-4baf-bccf-ea8061ea0ff0",
                "consumer_id": "cloud-foundry-application:c228eb21-46dd-4baf-bccf-ea8061ea0ff0:name:ruby_buildpack",
                "month": "2017-07",
                "pricing_country": "USA",
                "currency_code": "USD",
                "plan_id": "04082014.ibm.platform.default",
                "resource_id": "platform-a495-4aa1-9ef9-40b88a42d776",
                "billable": false,
                "region": "us-south",
                "usage": [
                    {
                        "metric": "GB_HOURS_PER_MONTH",
                        "unit": "GB-HOURS",
                        "price": [
                            {
                                "quantity_tier": "1.000",
                                "tier_model": "Granular Tier",
                                "unitQuantity": "100",
                                "price": 7
                            }
                        ],
                        "quantity": 1.5527777777777778,
                        "cost": 0.10869444444444444,
                        "rateable_quantity": 1.5527777777777778
                    }
                ]
            },
            {
                "account_id": "265d9d22597d4ee589138929093f1246",
                "organization_id": "us-south:54257f98-83f0-4eca-ae04-9ea35277a538",
                "space_id": "1ca5fea5-1d93-405c-84cc-7b20c1c199f9",
                "resource_instance_id": "cloud-foundry-application:20af0b15-cab0-4862-9bc0-1833a1a7e759",
                "consumer_id": "cloud-foundry-application:20af0b15-cab0-4862-9bc0-1833a1a7e759:name:unknown",
                "month": "2017-07",
                "pricing_country": "USA",
                "currency_code": "USD",
                "plan_id": "04082014.ibm.platform.default",
                "resource_id": "platform-a495-4aa1-9ef9-40b88a42d776",
                "billable": false,
                "region": "us-south",
                "usage": [
                    {
                        "metric": "GB_HOURS_PER_MONTH",
                        "unit": "GB-HOURS",
                        "price": [
                            {
                                "quantity_tier": "1.000",
                                "tier_model": "Granular Tier",
                                "unitQuantity": "100",
                                "price": 7
                            }
                        ],
                        "quantity": 0.012777777777777779,
                        "cost": 0.0008944444444444446,
                        "rateable_quantity": 0.012777777777777779
                    }
                ]
            },
            {
                "account_id": "265d9d22597d4ee589138929093f1246",
                "organization_id": "us-south:54257f98-83f0-4eca-ae04-9ea35277a538",
                "space_id": "1ca5fea5-1d93-405c-84cc-7b20c1c199f9",
                "resource_instance_id": "cloud-foundry-application:3b5659e4-9821-47f4-a7ab-42ef1e092e24",
                "consumer_id": "cloud-foundry-application:3b5659e4-9821-47f4-a7ab-42ef1e092e24:name:unknown",
                "month": "2017-07",
                "pricing_country": "USA",
                "currency_code": "USD",
                "plan_id": "04082014.ibm.platform.default",
                "resource_id": "platform-a495-4aa1-9ef9-40b88a42d776",
                "billable": false,
                "region": "us-south",
                "usage": [
                    {
                        "metric": "GB_HOURS_PER_MONTH",
                        "unit": "GB-HOURS",
                        "price": [
                            {
                                "quantity_tier": "1.000",
                                "tier_model": "Granular Tier",
                                "unitQuantity": "100",
                                "price": 7
                            }
                        ],
                        "quantity": 0.014444444444444444,
                        "cost": 0.001011111111111111,
                        "rateable_quantity": 0.014444444444444444
                    }
                ]
            },
            {
                "account_id": "265d9d22597d4ee589138929093f1246",
                "organization_id": "us-south:54257f98-83f0-4eca-ae04-9ea35277a538",
                "space_id": "1ca5fea5-1d93-405c-84cc-7b20c1c199f9",
                "resource_instance_id": "cloud-foundry-application:73b50993-c545-4afe-a931-fd5ef389e497",
                "consumer_id": "cloud-foundry-application:73b50993-c545-4afe-a931-fd5ef389e497:name:unknown",
                "month": "2017-07",
                "pricing_country": "USA",
                "currency_code": "USD",
                "plan_id": "04082014.ibm.platform.default",
                "resource_id": "platform-a495-4aa1-9ef9-40b88a42d776",
                "billable": false,
                "region": "us-south",
                "usage": [
                    {
                        "metric": "GB_HOURS_PER_MONTH",
                        "unit": "GB-HOURS",
                        "price": [
                            {
                                "quantity_tier": "1.000",
                                "tier_model": "Granular Tier",
                                "unitQuantity": "100",
                                "price": 7
                            }
                        ],
                        "quantity": 0.015277777777777777,
                        "cost": 0.0010694444444444445,
                        "rateable_quantity": 0.015277777777777777
                    }
                ]
            }
        ],
        "next": {
            "href": "/v4/accounts/265d9d22597d4ee589138929093f1246/resource_instances/usage/2017-07?_limit=5&_start=g2wAAAABaANkACdkYmNvcmVAZGIzLmlibS1ic3NzdGFnZTAwMy5jbG91ZGFudC5uZXRsAAAAAm4EAAAAAOBuBAD_____amgCRkAits9gAAAAYgAAzA1q",
            "offset": "g2wAAAABaANkACdkYmNvcmVAZGIzLmlibS1ic3NzdGFnZTAwMy5jbG91ZGFudC5uZXRsAAAAAm4EAAAAAOBuBAD_____amgCRkAits9gAAAAYgAAzA1q"
        }
    }

Get resource instance usage in a resource group

Returns instance-level usage for resources in a resource group. Filter the results with query parameters. Users with the Administrator role on the Billing service can access this report.

GET /v4/accounts/{account_id}/resource_groups/{resource_group_id}/resource_instances/usage/{billingmonth}
Request

Path Parameters

  • ID of the account in which the resource group is present

  • ID of the resource group

  • Month for which the usage is requested

    Constraints: Value must match regular expression ^\d{4}\-(0?[1-9]|1[012])$

Query Parameters

  • Number of usage records returned. The default value is 10. Maximum value is 20.

    Constraints: 1 ≤ value ≤ 20

    Default: 10

  • The offset from which the records must be fetched. Offset information is included in the response.

  • Filter by resource instance id

  • Filter by resource_id

  • Filter by plan_id

  • Region in which the resource instance is provisioned

Response

List of instnace usage reports

Status Code

  • Status 200

  • Status 400

  • Status 401

  • Status 500

Example responses
  • {
        "limit": 3,
        "count": 8,
        "first": {
            "href": "/v4/accounts/b09edf5642ebfad587c594f4d4a354b0/resource_groups/bce390f8721e46bdabd4ec34addecb06/resource_instances/usage/2017-09?_limit=3"
        },
        "resources": [
            {
                "account_id": "b09edf5642ebfad587c594f4d4a354b0",
                "resource_group_id": "bce390f8721e46bdabd4ec34addecb06",
                "resource_instance_id": "2c2a192366c08c80e91720cc688a7f41",
                "month": "2017-09",
                "pricing_country": "USA",
                "currency_code": "USD",
                "plan_id": "744bfc56-d12c-4866-88d5-dac9139e0e5d",
                "resource_id": "dff97f5c-bc5e-4455-b470-411c3edbe49c",
                "billable": false,
                "pricing_region": "us",
                "region": "us",
                "usage": [
                    {
                        "metric": "STANDARD_STORAGE",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.03,
                                "quantity_tier": "499999"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.026,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "VAULT_STORAGE",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.02,
                                "quantity_tier": "499999"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.018,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "COLD_VAULT_STORAGE",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.011,
                                "quantity_tier": "499999"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.011,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "FLEX_STORAGE",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.014,
                                "quantity_tier": "499999"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.014,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "quantity": 0.0004301415756344795,
                        "cost": 0.000006021982058882713,
                        "rateable_quantity": 0.0004301415756344795
                    },
                    {
                        "metric": "FLEX_MAX_CAP",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Granular Tier",
                                "price": 0.034,
                                "quantity_tier": "1"
                            }
                        ],
                        "quantity": 0.0004301415756344795,
                        "cost": 0.000014624813571572303,
                        "rateable_quantity": 0.0004301415756344795,
                        "non_chargeable": true
                    },
                    {
                        "metric": "STANDARD_BANDWIDTH",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.09,
                                "quantity_tier": "50000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.07,
                                "quantity_tier": "150000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.05,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "VAULT_BANDWIDTH",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.09,
                                "quantity_tier": "50000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.07,
                                "quantity_tier": "150000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.05,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "COLD_VAULT_BANDWIDTH",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.09,
                                "quantity_tier": "50000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.07,
                                "quantity_tier": "150000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.05,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "FLEX_BANDWIDTH",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.09,
                                "quantity_tier": "50000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.07,
                                "quantity_tier": "150000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.05,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "quantity": 0,
                        "cost": 0,
                        "rateable_quantity": 0
                    },
                    {
                        "metric": "VAULT_RETRIEVAL",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Granular Tier",
                                "price": 0.01,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "COLD_VAULT_RETRIEVAL",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Granular Tier",
                                "price": 0.05,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "FLEX_RETRIEVAL",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Granular Tier",
                                "price": 0.029,
                                "quantity_tier": "1"
                            }
                        ],
                        "quantity": 0,
                        "cost": 0,
                        "rateable_quantity": 0
                    },
                    {
                        "metric": "STANDARD_CLASS_A_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "1000",
                                "tier_model": "Granular Tier",
                                "price": 0.006,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "VAULT_CLASS_A_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "1000",
                                "tier_model": "Granular Tier",
                                "price": 0.0125,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "COLD_VAULT_CLASS_A_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "1000",
                                "tier_model": "Granular Tier",
                                "price": 0.025,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "FLEX_CLASS_A_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "1000",
                                "tier_model": "Granular Tier",
                                "price": 0.01,
                                "quantity_tier": "1"
                            }
                        ],
                        "quantity": 0,
                        "cost": 0,
                        "rateable_quantity": 0
                    },
                    {
                        "metric": "STANDARD_CLASS_B_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "10000",
                                "tier_model": "Granular Tier",
                                "price": 0.005,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "VAULT_CLASS_B_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "10000",
                                "tier_model": "Granular Tier",
                                "price": 0.0125,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "COLD_VAULT_CLASS_B_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "10000",
                                "tier_model": "Granular Tier",
                                "price": 0.025,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "FLEX_CLASS_B_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "10000",
                                "tier_model": "Granular Tier",
                                "price": 0.01,
                                "quantity_tier": "1"
                            }
                        ],
                        "quantity": 0,
                        "cost": 0,
                        "rateable_quantity": 0
                    }
                ]
            },
            {
                "account_id": "b09edf5642ebfad587c594f4d4a354b0",
                "resource_group_id": "bce390f8721e46bdabd4ec34addecb06",
                "resource_instance_id": "c17b95cf455f41a6026f77fcdd761efc",
                "month": "2017-09",
                "pricing_country": "USA",
                "currency_code": "USD",
                "plan_id": "744bfc56-d12c-4866-88d5-dac9139e0e5d",
                "resource_id": "dff97f5c-bc5e-4455-b470-411c3edbe49c",
                "billable": false,
                "pricing_region": "us",
                "region": "us",
                "usage": [
                    {
                        "metric": "STANDARD_STORAGE",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.03,
                                "quantity_tier": "499999"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.026,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "quantity": 0,
                        "cost": 0,
                        "rateable_quantity": 0
                    },
                    {
                        "metric": "VAULT_STORAGE",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.02,
                                "quantity_tier": "499999"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.018,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "COLD_VAULT_STORAGE",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.011,
                                "quantity_tier": "499999"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.011,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "FLEX_STORAGE",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.014,
                                "quantity_tier": "499999"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.014,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "FLEX_MAX_CAP",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Granular Tier",
                                "price": 0.034,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "STANDARD_BANDWIDTH",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.09,
                                "quantity_tier": "50000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.07,
                                "quantity_tier": "150000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.05,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "quantity": 0,
                        "cost": 0,
                        "rateable_quantity": 0
                    },
                    {
                        "metric": "VAULT_BANDWIDTH",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.09,
                                "quantity_tier": "50000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.07,
                                "quantity_tier": "150000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.05,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "COLD_VAULT_BANDWIDTH",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.09,
                                "quantity_tier": "50000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.07,
                                "quantity_tier": "150000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.05,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "FLEX_BANDWIDTH",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.09,
                                "quantity_tier": "50000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.07,
                                "quantity_tier": "150000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.05,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "VAULT_RETRIEVAL",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Granular Tier",
                                "price": 0.01,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "COLD_VAULT_RETRIEVAL",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Granular Tier",
                                "price": 0.05,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "FLEX_RETRIEVAL",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Granular Tier",
                                "price": 0.029,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "STANDARD_CLASS_A_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "1000",
                                "tier_model": "Granular Tier",
                                "price": 0.006,
                                "quantity_tier": "1"
                            }
                        ],
                        "quantity": 3,
                        "cost": 0.000018,
                        "rateable_quantity": 3
                    },
                    {
                        "metric": "VAULT_CLASS_A_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "1000",
                                "tier_model": "Granular Tier",
                                "price": 0.0125,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "COLD_VAULT_CLASS_A_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "1000",
                                "tier_model": "Granular Tier",
                                "price": 0.025,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "FLEX_CLASS_A_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "1000",
                                "tier_model": "Granular Tier",
                                "price": 0.01,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "STANDARD_CLASS_B_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "10000",
                                "tier_model": "Granular Tier",
                                "price": 0.005,
                                "quantity_tier": "1"
                            }
                        ],
                        "quantity": 0,
                        "cost": 0,
                        "rateable_quantity": 0
                    },
                    {
                        "metric": "VAULT_CLASS_B_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "10000",
                                "tier_model": "Granular Tier",
                                "price": 0.0125,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "COLD_VAULT_CLASS_B_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "10000",
                                "tier_model": "Granular Tier",
                                "price": 0.025,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "FLEX_CLASS_B_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "10000",
                                "tier_model": "Granular Tier",
                                "price": 0.01,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    }
                ]
            },
            {
                "account_id": "b09edf5642ebfad587c594f4d4a354b0",
                "resource_group_id": "bce390f8721e46bdabd4ec34addecb06",
                "resource_instance_id": "63f3ca7224fb5db01fdbdded0357c229",
                "month": "2017-09",
                "pricing_country": "USA",
                "currency_code": "USD",
                "plan_id": "744bfc56-d12c-4866-88d5-dac9139e0e5d",
                "resource_id": "dff97f5c-bc5e-4455-b470-411c3edbe49c",
                "billable": false,
                "pricing_region": "us",
                "region": "us",
                "usage": [
                    {
                        "metric": "STANDARD_STORAGE",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.03,
                                "quantity_tier": "499999"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.026,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "VAULT_STORAGE",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.02,
                                "quantity_tier": "499999"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.018,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "COLD_VAULT_STORAGE",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.011,
                                "quantity_tier": "499999"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.011,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "FLEX_STORAGE",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.014,
                                "quantity_tier": "499999"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.014,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "quantity": 0.00043014157563447947,
                        "cost": 0.0000060219820588827126,
                        "rateable_quantity": 0.00043014157563447947
                    },
                    {
                        "metric": "FLEX_MAX_CAP",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Granular Tier",
                                "price": 0.034,
                                "quantity_tier": "1"
                            }
                        ],
                        "quantity": 0.00043014157563447947,
                        "cost": 0.000014624813571572302,
                        "rateable_quantity": 0.00043014157563447947,
                        "non_chargeable": true
                    },
                    {
                        "metric": "STANDARD_BANDWIDTH",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.09,
                                "quantity_tier": "50000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.07,
                                "quantity_tier": "150000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.05,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "VAULT_BANDWIDTH",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.09,
                                "quantity_tier": "50000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.07,
                                "quantity_tier": "150000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.05,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "COLD_VAULT_BANDWIDTH",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.09,
                                "quantity_tier": "50000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.07,
                                "quantity_tier": "150000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.05,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "FLEX_BANDWIDTH",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.09,
                                "quantity_tier": "50000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.07,
                                "quantity_tier": "150000"
                            },
                            {
                                "unitQuantity": "1",
                                "tier_model": "Step Tier",
                                "price": 0.05,
                                "quantity_tier": "999999999"
                            }
                        ],
                        "quantity": 0,
                        "cost": 0,
                        "rateable_quantity": 0
                    },
                    {
                        "metric": "VAULT_RETRIEVAL",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Granular Tier",
                                "price": 0.01,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "COLD_VAULT_RETRIEVAL",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Granular Tier",
                                "price": 0.05,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "FLEX_RETRIEVAL",
                        "unit": "GIGABYTE",
                        "price": [
                            {
                                "unitQuantity": "1",
                                "tier_model": "Granular Tier",
                                "price": 0.029,
                                "quantity_tier": "1"
                            }
                        ],
                        "quantity": 0,
                        "cost": 0,
                        "rateable_quantity": 0
                    },
                    {
                        "metric": "STANDARD_CLASS_A_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "1000",
                                "tier_model": "Granular Tier",
                                "price": 0.006,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "VAULT_CLASS_A_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "1000",
                                "tier_model": "Granular Tier",
                                "price": 0.0125,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "COLD_VAULT_CLASS_A_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "1000",
                                "tier_model": "Granular Tier",
                                "price": 0.025,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "FLEX_CLASS_A_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "1000",
                                "tier_model": "Granular Tier",
                                "price": 0.01,
                                "quantity_tier": "1"
                            }
                        ],
                        "quantity": 0,
                        "cost": 0,
                        "rateable_quantity": 0
                    },
                    {
                        "metric": "STANDARD_CLASS_B_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "10000",
                                "tier_model": "Granular Tier",
                                "price": 0.005,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "VAULT_CLASS_B_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "10000",
                                "tier_model": "Granular Tier",
                                "price": 0.0125,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "COLD_VAULT_CLASS_B_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "10000",
                                "tier_model": "Granular Tier",
                                "price": 0.025,
                                "quantity_tier": "1"
                            }
                        ],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "FLEX_CLASS_B_CALLS",
                        "unit": "API_CALLS",
                        "price": [
                            {
                                "unitQuantity": "10000",
                                "tier_model": "Granular Tier",
                                "price": 0.01,
                                "quantity_tier": "1"
                            }
                        ],
                        "quantity": 0,
                        "cost": 0,
                        "rateable_quantity": 0
                    }
                ]
            }
        ],
        "next": {
            "href": "/v4/accounts/b09edf5642ebfad587c594f4d4a354b0/resource_groups/bce390f8721e46bdabd4ec34addecb06/resource_instances/usage/2017-09?_limit=3&_start=g1AAAACJeJzLYWBgYMpgTmGQT0lKzi9KdUhJMtXLTE4tz8xL1UvOyS9NScwr0ctLLckBKUxkSJL___9_VgaTm4MiD5MCUCxxGtG681iAJMMBIAU04z7YEIX2lQdAhizMAgBAXCtu",
            "offset": "g1AAAACJeJzLYWBgYMpgTmGQT0lKzi9KdUhJMtXLTE4tz8xL1UvOyS9NScwr0ctLLckBKUxkSJL___9_VgaTm4MiD5MCUCxxGtG681iAJMMBIAU04z7YEIX2lQdAhizMAgBAXCtu"
        }
    }

Get resource instance usage in a Cloud Foundry org

Returns instance-level usage for resources in a Cloud Foundry organization. Filter the results with query parameters. Users with the Administrator role on the Billing service or the Billing Manager role on the Cloud Foundry org can access this report.

GET /v4/accounts/{account_id}/organizations/{organization_id}/resource_instances/usage/{billingmonth}
Request

Path Parameters

  • ID of the account under which the organization is present

  • ID of the organization

  • Month for which the usage is requested

    Constraints: Value must match regular expression ^\d{4}\-(0?[1-9]|1[012])$

Query Parameters

  • Number of usage records returned. The default value is 10. Maximum value is 20.

    Constraints: 1 ≤ value ≤ 20

    Default: 10

  • The offset from which the records must be fetched. Offset information is included in the response.

  • Filter by resource instance id

  • Filter by resource_id

  • Filter by plan_id

  • Region in which the resource instance is provisioned

Response

List of instnace usage reports

Status Code

  • Status 200

  • Status 400

  • Status 401

  • Status 500

Example responses
  • {
        "limit": 30,
        "count": 2,
        "first": {
            "href": "/v4/accounts/265d9d22597d4ee589138929093f1246/organizations/us-south:54257f98-83f0-4eca-ae04-9ea35277a538/resource_instances/usage/2017-07?_limit=30&resource_id=iotf-service-id"
        },
        "resources": [
            {
                "account_id": "265d9d22597d4ee589138929093f1246",
                "organization_id": "us-south:54257f98-83f0-4eca-ae04-9ea35277a538",
                "space_id": "1ca5fea5-1d93-405c-84cc-7b20c1c199f9",
                "resource_instance_id": "7b1ddc2f-4d69-4694-85bf-52b8f1d902a3",
                "consumer_id": "external:2h97sm",
                "month": "2017-07",
                "pricing_country": "USA",
                "currency_code": "USD",
                "plan_id": "iotf-service-asp-id",
                "resource_id": "iotf-service-id",
                "billable": false,
                "region": "us-south",
                "usage": [
                    {
                        "metric": "ACTIVE_DEVICES_PER_MONTH",
                        "unit": "ACTIVE_DEVICE",
                        "price": [],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "MEGABYTES_TRANSMITTED_PER_MONTH",
                        "unit": "MEGABYTE",
                        "price": [
                            {
                                "quantity_tier": "1.000",
                                "tier_model": "Granular Tier",
                                "unitQuantity": "10000",
                                "price": 13
                            },
                            {
                                "quantity_tier": "45.000",
                                "tier_model": "Granular Tier",
                                "unitQuantity": "10000",
                                "price": 9.1
                            },
                            {
                                "quantity_tier": "700.000",
                                "tier_model": "Granular Tier",
                                "unitQuantity": "10000",
                                "price": 1.82
                            }
                        ],
                        "quantity": 0,
                        "cost": 0,
                        "rateable_quantity": 0
                    },
                    {
                        "metric": "STORAGE_PER_MONTH",
                        "unit": "GIGABYTE",
                        "price": [],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "PLAN_PER_MONTH",
                        "unit": "PLAN",
                        "price": [],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "EDGE_ANALYSIS_PER_MONTH",
                        "unit": "EDGE_MEGABYTE",
                        "price": [
                            {
                                "quantity_tier": "1.000",
                                "tier_model": "Granular Tier",
                                "unitQuantity": "10000",
                                "price": 5
                            },
                            {
                                "quantity_tier": "45.000",
                                "tier_model": "Granular Tier",
                                "unitQuantity": "10000",
                                "price": 3.5
                            },
                            {
                                "quantity_tier": "700.000",
                                "tier_model": "Granular Tier",
                                "unitQuantity": "10000",
                                "price": 0.7
                            }
                        ],
                        "quantity": 0,
                        "cost": 0,
                        "rateable_quantity": 0
                    },
                    {
                        "metric": "RTI_ANALYSIS_PER_MONTH",
                        "unit": "RTI_MEGABYTE",
                        "price": [
                            {
                                "quantity_tier": "1.000",
                                "tier_model": "Granular Tier",
                                "unitQuantity": "10000",
                                "price": 30
                            },
                            {
                                "quantity_tier": "45.000",
                                "tier_model": "Granular Tier",
                                "unitQuantity": "10000",
                                "price": 21
                            },
                            {
                                "quantity_tier": "700.000",
                                "tier_model": "Granular Tier",
                                "unitQuantity": "10000",
                                "price": 4.2
                            }
                        ],
                        "quantity": 0,
                        "cost": 0,
                        "rateable_quantity": 0
                    }
                ]
            },
            {
                "account_id": "265d9d22597d4ee589138929093f1246",
                "organization_id": "us-south:54257f98-83f0-4eca-ae04-9ea35277a538",
                "space_id": "1ca5fea5-1d93-405c-84cc-7b20c1c199f9",
                "resource_instance_id": "72d55444-68f6-4a2e-96c1-f593a5565694",
                "consumer_id": "external:sqrsno",
                "month": "2017-07",
                "pricing_country": "USA",
                "currency_code": "USD",
                "plan_id": "iotf-service-free-id",
                "resource_id": "iotf-service-id",
                "billable": false,
                "region": "us-south",
                "usage": [
                    {
                        "metric": "ACTIVE_DEVICES_PER_MONTH",
                        "unit": "ACTIVE_DEVICE",
                        "price": [],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "MEGABYTES_TRANSMITTED_PER_MONTH",
                        "unit": "MEGABYTE",
                        "price": [],
                        "quantity": 0,
                        "cost": 0,
                        "rateable_quantity": 0
                    },
                    {
                        "metric": "STORAGE_PER_MONTH",
                        "unit": "GIGABYTE",
                        "price": [],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "PLAN_PER_MONTH",
                        "unit": "PLAN",
                        "price": [],
                        "rateable_quantity": 0,
                        "quantity": 0,
                        "cost": 0
                    },
                    {
                        "metric": "EDGE_ANALYSIS_PER_MONTH",
                        "unit": "EDGE_MEGABYTE",
                        "price": [],
                        "quantity": 0,
                        "cost": 0,
                        "rateable_quantity": 0
                    },
                    {
                        "metric": "RTI_ANALYSIS_PER_MONTH",
                        "unit": "RTI_MEGABYTE",
                        "price": [],
                        "quantity": 0,
                        "cost": 0,
                        "rateable_quantity": 0
                    }
                ]
            }
        ]
    }