Dimension: date_hour

The date_hour dimension provides analytics data in hourly segments. The user can specify the from and to parameters in yyyy-MM-dd or epoch time in milliseconds format. To report over a span of hours, you will need to use the milliseconds format, with to and from values falling within the start and end hours that you want to query on. Any date range specified by the user will be interpreted to the current timezone for the account. date_hour reports are only valid for ranges within the past 32 days. If the from value is more than 32 days ago, an error will be returned.

Overview

The date_hour dimension provides analytics data in hourly segments. The user can specify the from and to parameters in yyyy-MM-dd or epoch time in milliseconds format. To report over a span of hours, you will need to use the milliseconds format, with to and from values falling within the start and end hours that you want to query on. Any date range specified by the user will be interpreted to the current timezone for the account. date_hour reports are only valid for ranges within the past 32 days. If the from value is more than 32 days ago, an error will be returned.

URL parameters

Analytics API reports support the following URL parameters.

URL Parameters
Parameter Description Required Values Default
account The accounts you want to report on yes one or more account ids as a comma-delimited list none
dimensions The dimension(s) to report on yes one or more dimensions as a comma-delimited list (some combinations are not valid - use the interactive tool here to determine if a combination is valid) none
where Used to specify filters for reports no {dimension}=={value} - one or more as a semi-colon-delimited list. The value will be one or more values for the primary metric of that dimension. For example: account==account_id, country=country-code, or viewer=viewer_id (in the last case, the form of the viewer_id will vary depending on whether you are capturing and sending some kind of viewer_id yourself or depending on the value generated by the analytics system). none
limit Number of items to return no positive integer 10
offset Number of items to skip no positive integer 0
sort Field to sort items on no any field that is being returned by the request video_view
fields Fields to return no varies according to the dimension you are reporting on video,video_view
format Format to return results in no json (default) | csv | xlxs json
reconciled If included, will limit results to either historical or realtime data. Analytics data is derived from multiple sources: some is sent by the player, but other data is collected from CDNs and the Video Cloud system. In order to deliver analytics as quickly as possible, we start delivering "real-time" data as soon as it is available, and then adjust the analytics later when data from all sources has been collected and processed. The fully processed data is called reconciled no true | false true
from The beginning of the date range for the request no One of the following:
  • An ISO 8601 date (YYYY-MM-DD)
  • Epoch time in milliseconds (example: 1659641316719 [= Thursday, August 4, 2022 7:28:36.719 PM GMT]). See the Epoch time converter.
  • A string: from=alltime
  • +/- relative dates in days (d), weeks (w), or months (m) - example: from=-6m&to=%2B2w (the period from 6 months ago to 2 weeks after that -- note that the + sign needs to be URI encoded as %2B)

Only dates within the past 32 days are allowed for engagement endpoints or if reconciled=false.

-30d
to The end of the date range for the request no One of the following:
  • An ISO 8601 date (YYYY-MM-DD)
  • Epoch time in milliseconds (example: 1659641316719 [= Thursday, August 4, 2022 7:28:36.719 PM GMT]). See the Epoch time converter.
  • A string: to=now
  • +/- relative dates in days (d), weeks (w), or months (m) - example: from=-6m&to=%2B2w (the period from 6 months ago to 2 weeks after that -- note that the + sign needs to be URI encoded as %2B)

Only dates within the past 32 days are allowed for engagement endpoints or if reconciled=false.

now

Fields available

The following fields can be returned for the dimension.

  • ad_mode_begin - the number of times the player entered ad mode
  • ad_mode_complete - the number of times the player completed ad mode
  • date_hour - the date-time in ISO 8601 date-time format
  • engagement_score - the average engagement score for videos
  • play_request - total number of times video playback was requested
  • play_rate - the average play rate (video views divided by impressions) for videos
  • player_load - the total number of player loads
  • video_impression - the total number of times videos were loaded into players
  • video_percent_viewed - total percent viewed for all video views (a sum, not an average)
  • video_seconds_viewed - the total seconds viewed for all videos
  • video_view - the total number of times video playback began

Filter values

Used as a filter, a dimension allows you to narrow the results.

Filter values: The date_hour dimension is not used as a filter.

Combining dimensions

To see what dimensions this on can be combined with, and what fields are available for the combination, see Dimension and Fields.

Request Examples

Dimension request

    https://analytics.api.brightcove.com/v1/data?accounts=1752604059001&dimensions=date_hour&from=-6h

Filter request

    Not applicable
Sample Response
{
  "item_count": 7,
  "items": [
    {
      "date_hour": "2022-05-30T11:00:00-04:00",
      "video_view": 8
    },
    {
      "date_hour": "2022-05-30T10:00:00-04:00",
      "video_view": 11
    },
    {
      "date_hour": "2022-05-30T08:00:00-04:00",
      "video_view": 26
    },
    {
      "date_hour": "2022-05-30T07:00:00-04:00",
      "video_view": 30
    },
    {
      "date_hour": "2022-05-30T09:00:00-04:00",
      "video_view": 34
    },
    {
      "date_hour": "2022-05-30T06:00:00-04:00",
      "video_view": 43
    },
    {
      "date_hour": "2022-05-30T05:00:00-04:00",
      "video_view": 46
    }
  ],
  "summary": {
    "video_view": 198
  }
}