---
title: "Consumption."
method: GET
path: "/2/vod/statistics/{subject}/consumption"
tags: ["V3 > Statistics"]
---

# Consumption.

`GET /2/vod/statistics/{subject}/consumption`

Get the consumption for the provided subject,
subject may be either a channel or a media,
if anything else is provided, a 404 error will be raised.

## Path parameters

- `subject` string, required

## Query parameters

- `format` string, nullable — Any valid byte unit, with or without precision specified (tries to format bytes in the most readable unit if nothing is specified):<br/><note><strong>YB</strong>: Yotta Byte</note><note><strong>ZB</strong>: Zetta Byte</note><note><strong>EB</strong>: Exa Byte</note><note><strong>PB</strong>: Peta Byte</note><note><strong>TB</strong>: Tera Byte</note><note><strong>GB</strong>: Giga Byte</note><note><strong>MB</strong>: Mega Byte</note><note><strong>kB</strong>: Kilo Byte</note><note><strong>B</strong>: Byte</note><note><strong>no</strong>: No formatting (raw number of bytes)</note>A precision (digits after '.') may be added with the following notation:<br/><note><strong>6</strong>: 1.322123MB</note><note><strong>/6</strong>: 1.322123MB</note><note><strong>MB/6</strong>: 1.322123MB</note><note><strong>MB/000000</strong>: 1.322123MB</note><note><strong>GB/9</strong>: 0.001322123GB</note>
- `from` string, nullable — <note><strong>Date</strong>: any accepted <a href="https://www.php.net/manual/fr/datetime.formats.date.php" target="_blank">PHP date format</a></note> <note><strong>Timestamp</strong>: a Timestamp</note> <note><strong>Time interval</strong>: a positive or negative interval with pattern: <pre>/\+|\-\d+[YyMdhims]/</pre> <table> <thead> <tr> <td>symbol</td> <td>description</td> </tr> </thead> <tbody> <tr> <td>Y|y</td> <td>Year</td> </tr> <tr> <td>M</td> <td>Month</td> </tr> <tr> <td>d</td> <td>Day</td> </tr> <tr> <td>h</td> <td>Hour</td> </tr> <tr> <td>i|m</td> <td>Minute</td> </tr> <tr> <td>s</td> <td>Second</td> </tr> </tbody> </table> </note>
- `to` string, nullable — <note><strong>Date</strong>: any accepted <a href="https://www.php.net/manual/fr/datetime.formats.date.php" target="_blank">PHP date format</a></note> <note><strong>Timestamp</strong>: a Timestamp</note> <note><strong>Time interval</strong>: a positive or negative interval with pattern: <pre>/\+|\-\d+[YyMdhims]/</pre> <table> <thead> <tr> <td>symbol</td> <td>description</td> </tr> </thead> <tbody> <tr> <td>Y|y</td> <td>Year</td> </tr> <tr> <td>M</td> <td>Month</td> </tr> <tr> <td>d</td> <td>Day</td> </tr> <tr> <td>h</td> <td>Hour</td> </tr> <tr> <td>i|m</td> <td>Minute</td> </tr> <tr> <td>s</td> <td>Second</td> </tr> </tbody> </table> </note>
- `top` integer, nullable — Limit the response size to the top N results.

## Response `200`

OK

- object
  - `result` 'success' | 'error' | 'asynchronous', required — Result of the HTTP request
  - `data` union
    - integer
    - string

---

[API](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools.md) · [All operations](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/infomaniak/api-reference-developer-tools/revisions/667aae28fec6/schema)
