Home » API Reference » Reports » Get Usage for VOD

permalink Get Usage for VOD

GET https://app.zencoder.com/api/v2/reports/vod

API Version

Available in API version 2 or greater (for example: https://app.zencoder.com/api/v2/).


Required Parameters

Optional Query Parameters

  • from: Start date in the format YYYY-MM-DD (default: 30 days ago).
  • to: End date in the format YYYY-MM-DD (default: yesterday).
  • grouping: Minute usage for only one report grouping (default: none).

Response Codes

  • 200: OK
  • 422: Unprocessable Entity; the date range requested is larger than 60 days
  • 422: Unprocessable Entity; the date format is incorrect

Return Values

This report returns a breakdown of video on demand (videos not using live-streaming) minute usage by day and grouping. It will contain two top-level keys: total and statistics. total will contain the sum of all statistics returned in the report. statistics will contain an entry for each day and grouping. If you don't use the report grouping feature of the API the report will contain only one entry per day.

These statistics are collected about once per hour, but there is only one record per day (per grouping). By default this report excludes the current day from the response because it's only partially complete.

    {
      "total": {
        "encoded_minutes": 6,
        "billable_minutes": 8
      },
      "statistics": [
        {
          "grouping": "zencoder",
          "collected_on": "2011-08-10",
          "encoded_minutes": 4,
          "billable_minutes": 5
        }, {
          "grouping": null,
          "collected_on": "2011-08-10",
          "encoded_minutes": 2,
          "billable_minutes": 3
        }
      ]
    }
  
    
      
        6
        8
      
      
        
          zencoder
          2011-08-10
          4
          5
        
        
          
          2011-08-10
          2
          3
        
      
    
  

Notes

It's important to note that our service operates in the UTC time zone (including billing periods). All dates and times reported will be in UTC.