# Fetch ingest analytics data for a live stream (Available from version 1.11) This operation returns the ingest data for a specific live stream. You'll use the query parameters to return live vs historic data, as well as specific types of ingest data. Querying live data To get data for currently live streams, do not send include, from, and to values. This operation returns a hash of metrics keys, each of which identifies a status, text description, unit, and value. Querying historic data To get data for streams that ran previously, send include, from, and to values. This operation returns a hash of metrics keys, each of which identifies a status, text description, unit, and value in addition to trend data. Endpoint: GET /analytics/ingest/live_streams/{id} Version: v2.0 ## Path parameters: - `id` (string, required) The unique alphanumeric string that identifies the live stream. ## Query parameters: - `from` (string) Use this parameter, along with to, to return historic viewer data. The start of the range of time you want to view. Specify YYYY-DD-MMT HH:MM:SSZ where HH is a 24-hour clock in UTC. The range queried is rounded to the nearest second. The maximum difference between from and to is 90 days. If you set the from query parameter without setting the to query parameter, the data returned will reflect 30 days starting at the from date, or data up to to the current day, whichever is shorter. Example: 2023-01-14T10:31:54.486Z - `to` (string) Use this parameter, along with from, to return historic viewer data. The end of the range of time you want to view. Specify YYYY-DD-MMT HH:MM:SSZ where HH is a 24-hour clock in UTC. The range queried is rounded to the nearest second. The maximum difference between from and to is 90 days. If you set the to query parameter without setting the from query parameter, the data returned will be from the past 30 days or from your last invoice date, whichever is shorter. Example: 2023-02-14T10:31:54.486Z - `include` (string) Specify the data you want returned in the response. Valid value is: trend. Example: trend ## Response 200 fields (application/json): - `live_stream` (object) - `live_stream.id` (string) The unique alphanumeric string that identifies the live stream. Example: "tvctq36g" - `live_stream.audio_codec` (object) - `live_stream.audio_codec.status` (string) The status of the current key. Possible values are normal (everything is fine), warning (something may be misconfigured), and no_data (no data was returned, perhaps because the instance isn't running). Example: "normal" - `live_stream.audio_codec.text` (string) A message related to the value and status of the current key. Usually blank unless there's a warning status. - `live_stream.audio_codec.units` (string) The unit of the returned value, such as Kbps, bps, %, FPS, or GOP. - `live_stream.audio_codec.value` (string) The value of the associated key. Example: "aac" - `live_stream.bits_in_rate` (object) - `live_stream.bytes_in_rate` (object) - `live_stream.connected` (object) - `live_stream.frame_size` (object) - `live_stream.frame_rate` (object) - `live_stream.height` (object) - `live_stream.keyframe_interval` (object) - `live_stream.video_codec` (object) - `live_stream.video_codec.value` (string) The value of the associated key. Note: You might see avc1 or h264 returned interchangeably. Example: "h264" - `live_stream.width` (object) - `live_stream.stream_target_status` (array) An array of stream_target_status data. - `live_stream.stream_target_status.id` (string) The unique alphanumeric string that identifies the stream_target_status. This ID id created by combining the output ID and stream target ID as OUTPUTIDX_STREAMTARGETIDX. Example: "3lftlf1r_fcm6d98" - `live_stream.trend` (object) An array of viewer trend data. > Note: This parameter only returns data for Fastly stream targets. Example: [{"bits_in_rate":1030123,"created_at":"2023-03-30T22:42:57Z","frame_rate":30,"height":288,"keyframe_interval":60,"width":512},{"bits_in_rate":866928,"created_at":"2023-03-30T22:42:58Z","frame_rate":30,"height":288,"keyframe_interval":60,"width":512}] - `live_stream.trend.bits_in_rate` (integer) The rate at which data is processed in. - `live_stream.trend.created_at` (string) The date and time that the trend was created. - `live_stream.trend.frame_rate` (integer) The number of frames that appear in a second. - `live_stream.trend.height` (integer) The height of the video player, in pixels. - `live_stream.trend.keyframe_interval` (integer) An encoding setting that determines how often the whole picture is transmitted. - `live_stream.trend.width` (integer) The width of the video player, in pixels. - `limits` (object) The time frame represented in the response. - `limits.from` (string) The start of the range of time represented in the response. Example: "2024-03-14T10:31:54.000Z" - `limits.to` (string) The end of the range of time represented in the response. Example: "2024-04-13T10:31:54.000Z" ## Response 401 fields (application/json): - `meta` (object, required) - `meta.status` (integer) - `meta.code` (string) - `meta.title` (string) - `meta.message` (string) - `meta.description` (string) - `meta.links` (array) ## Response 403 fields (application/json): - `meta` (object, required) - `meta.status` (integer) - `meta.code` (string) - `meta.title` (string) - `meta.message` (string) - `meta.description` (string) - `meta.links` (array) ## Response 404 fields (application/json): - `meta` (object, required) - `meta.status` (integer) - `meta.code` (string) - `meta.title` (string) - `meta.message` (string) - `meta.description` (string) - `meta.links` (array) ## Response 410 fields (application/json): - `meta` (object, required) - `meta.status` (integer) - `meta.code` (string) - `meta.title` (string) - `meta.message` (string) - `meta.description` (string) - `meta.links` (array) ## Response 422 fields (application/json): - `meta` (object, required) - `meta.status` (integer) - `meta.code` (string) - `meta.title` (string) - `meta.message` (string) - `meta.description` (string) - `meta.links` (array)