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

# Get hourly usage for logs

`GET /api/v1/usage/logs`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v1/usage/logs`
- 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 logs.
**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

- UsageLogsResponse: Response containing the number of logs for each hour.
  - `usage` UsageLogsHour[]: An array of objects regarding hourly usage of logs.
    - `billable_ingested_bytes` integer, nullable: Contains the number of billable log bytes ingested.
    - `hour` string, date-time: The hour for the usage.
    - `indexed_events_count` integer, nullable: Contains the number of log events indexed.
    - `ingested_events_bytes` integer, nullable: Contains the number of log bytes ingested.
    - `logs_forwarding_events_bytes` integer, nullable: Contains the number of logs forwarded bytes (data available as of April 1st 2023)
    - `logs_live_indexed_count` integer, nullable: Contains the number of live log events indexed (data available as of December 1, 2020).
    - `logs_live_ingested_bytes` integer, nullable: Contains the number of live log bytes ingested (data available as of December 1, 2020).
    - `logs_rehydrated_indexed_count` integer, nullable: Contains the number of rehydrated log events indexed (data available as of December 1, 2020).
    - `logs_rehydrated_ingested_bytes` integer, nullable: Contains the number of rehydrated log bytes ingested (data available as of December 1, 2020).
    - `org_name` string: The organization name.
    - `public_id` string: The organization public ID.

## 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)
