# Fetch trend data for a transcoder (Available from version 1.8) This operation returns trend data for the CDN usage of a transcoder. The granularity of sampled data changes based on the from and to query values you use: 1) Requests made for data within the past 30 days, return the following sample intervals: 0 minutes to 3 hours - Samples returned per minute 3 hours, 1 second to 24 hours - Samples returned per hour 24 hours, 1 second to 90 days - Samples returned per day 2) Requests made for data beyond the past 30 days, always return sample intervals per hour. Defaults: from = last billing date, to = end of current day Endpoint: GET /usage/transcoders/{id}/trend Version: v1.10 ## Path parameters: - `id` (string, required) The unique alphanumeric string that identifies the transcoder. ## Query parameters: - `from` (string) The start of the range of time you want to view. Specify YYYY-MM-DD HH:00:00 where HH is a 24-hour clock in UTC. The range doesn't include minutes and seconds and rounds minutes up to the hour. 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 90 days starting at the from date, or data up to to the current day, whichever is shorter. You can also specify last_bill_date. Default: last billing date - `to` (string) The end of the range of time you want to view. Specify YYYY-MM-DD HH:00:00 where HH is a 24-hour clock in UTC. The range doesn't include minutes and seconds and rounds minutes up to the hour. 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 90 days or from your last invoice date, whichever is shorter. You can also specify last_bill_date. Default: end of the current day ## Response 200 fields (application/json): - `trend` (object) An array of trend data Example: [{"sampled_at":"2022-03-01T00:00:00.000Z","unique_viewers":358,"viewing_seconds":1288800,"viewing_bytes":8483993},{"sampled_at":"2022-03-02T00:00:00.000Z","unique_viewers":75,"viewing_seconds":270000,"viewing_bytes":6937994},{"sampled_at":"2022-03-03T00:00:00.000Z","unique_viewers":400,"viewing_seconds":1440000,"viewing_bytes":3958503}] - `trend.sampled_at` (string) The date and time the trend data was sampled. - `trend.unique_viewers` (integer) The total number of unique viewers to download at least one chunk of the stream at the target (for HTTP streams). A unique viewer is a single IP address; multiple users that share the same IP address are counted once. - `trend.viewing_seconds` (integer) The total length of time, in seconds, that the stream was played at the target. May be longer than the duration of the stream. - `trend.viewing_bytes` (integer) The amount of content, in bytes, that went through the stream target during the selected time frame. - `limits` (object) The time frame represented in the response. Example: {"from":"2022-03-01T00:00:00.000Z","to":"2022-03-05T00:00:00.000Z"} - `limits.from` (string) The start of the range of time represented in the response. Example: "2022-03-01T00:00:00.000Z" - `limits.to` (string) The end of the range of time represented in the response. Example: "2022-03-05T00:00:00.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)