Home » API Reference » Reports » Get Usage for VOD & Live

permalink Get Usage for VOD & Live

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

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: Hour 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 VOD and live-streaming 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, broken out by Live and VOD. 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": {
        "live": {
          "stream_hours": 5,
          "billable_stream_hours": 6,
          "encoded_hours": 5,
          "billable_encoded_hours": 6,
          "total_hours": 10,
          "total_billable_hours": 12
        },
        "vod": {
          "encoded_minutes": 6,
          "billable_minutes": 8
        }
      },
      "statistics": {
        "live": [
          {
            "grouping": "zencoder",
            "collected_on": "2011-08-10",
            "stream_hours": 3,
            "billable_stream_hours": 4,
            "encoded_hours": 3,
            "billable_encoded_hours": 4
            "total_hours": 6,
            "total_billable_hours": 8
          }, {
            "grouping": null,
            "collected_on": "2011-08-10",
            "stream_hours": 2,
            "billable_stream_hours": 2,
            "encoded_hours": 2,
            "billable_encoded_hours": 2
            "total_hours": 4,
            "total_billable_hours": 4
          }
        ],
        "vod": [
          {
            "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
          }
        ]
      }
    }
  
    
      
        
          5
          6
          5
          6
          10
          12
        
        
          6
          8
        
      
      
        
          
            zencoder
            2011-08-10
            3
            4
            3
            4
            6
            8
          
          
            
            2011-08-10
            2
            2
            2
            2
            4
            4
          
        
        
          
            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.