---
title: "Get hourly usage for hosts and containers"
method: GET
path: "/api/v1/usage/hosts"
tags: ["Usage Metering"]
deprecated: true
---

# Get hourly usage for hosts and containers

`GET /api/v1/usage/hosts`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v1/usage/hosts`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `usage_read`

> **Deprecated.**

Get hourly usage for hosts and containers.
**Note:** This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](https://docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.

## Query parameters

- `start_hr` string, date-time, required
- `end_hr` string, date-time

## Response `200`

OK

- UsageHostsResponse: Host usage response.
  - `usage` UsageHostHour[]: An array of objects related to host usage.
    - `agent_host_count` integer, nullable: Contains the total number of infrastructure hosts reporting during a given hour that were running the Datadog Agent.
    - `alibaba_host_count` integer, nullable: Contains the total number of hosts that reported through Alibaba integration (and were NOT running the Datadog Agent).
    - `apm_azure_app_service_host_count` integer, nullable: Contains the total number of Azure App Services hosts using APM.
    - `apm_host_count` integer, nullable: Shows the total number of hosts using APM during the hour, these are counted as billable (except during trial periods).
    - `aws_host_count` integer, nullable: Contains the total number of hosts that reported through the AWS integration (and were NOT running the Datadog Agent).
    - `azure_host_count` integer, nullable: Contains the total number of hosts that reported through Azure integration (and were NOT running the Datadog Agent).
    - `container_count` integer, nullable: Shows the total number of containers reported by the Docker integration during the hour.
    - `gcp_host_count` integer, nullable: Contains the total number of hosts that reported through the Google Cloud integration (and were NOT running the Datadog Agent).
    - `heroku_host_count` integer, nullable: Contains the total number of Heroku dynos reported by the Datadog Agent.
    - `host_count` integer, nullable: Contains the total number of billable infrastructure hosts reporting during a given hour. This is the sum of `agent_host_count`, `aws_host_count`, and `gcp_host_count`.
    - `hour` string, date-time, nullable: The hour for the usage.
    - `infra_azure_app_service` integer, nullable: Contains the total number of hosts that reported through the Azure App Services integration (and were NOT running the Datadog Agent).
    - `opentelemetry_apm_host_count` integer, nullable: Contains the total number of hosts using APM reported by Datadog exporter for the OpenTelemetry Collector.
    - `opentelemetry_host_count` integer, nullable: Contains the total number of hosts reported by Datadog exporter for the OpenTelemetry Collector.
    - `org_name` string: The organization name.
    - `public_id` string: The organization public ID.
    - `vsphere_host_count` integer, nullable: Contains the total number of hosts that reported through vSphere integration (and were NOT running the Datadog Agent).

## Other responses

- `400`: Bad Request
- `403`: Forbidden - User is not authorized
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v1-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v1-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v1-collection/revisions/ca5871004d26?raw)
