---
title: "GET /media"
method: GET
path: "/media"
tags: ["Media"]
---

# GET /media

`GET /media`

This endpoint requests a list of intervals for which there are recordings for the given type and
mediaType. If no endTimestamp__lte (formatted according to ISO 8601) is given, then the
results until now are returned.

Note: The ISO 8601 timestamp format is a standardized format for representing date
and time information. It uses the format 'YYYY-MM-DDTHH:MM:SS.sss±hh:mm' where
"T" is the separator between the date and time portions.

## Query parameters

- `deviceId` string, required
- `type` 'preview' | 'main', required
- `mediaType` 'video' | 'image', required
- `startTimestamp__gte` string, date-time, required
- `endTimestamp__lte` string, date-time
- `coalesce` boolean
- `include` string[]
- `pageToken` string
- `pageSize` integer

## Response `200`

OK

- ApiPaginatedMediaResponse — Used to wrap results for a paginated response, containing information on how to retrieve further pages.
  - `nextPageToken` string, nullable, required — Token to retrieve the next page. The value of this token is passed into the field pageToken. This value can be null if there is no next page.
  - `prevPageToken` string, nullable, required — Token to retrieve the previous page. The value of this token is passed into the field pageToken. This value can be null of there is no previous page.
  - `results` object[], required — The result set from a collection API call.
    - `type` 'preview' | 'main', required — Multiple Media can be published per source, but they should all have the same viewpoint. They can differ in: * quality: `main` is higher resolution while `preview` is low resolution and low framerate.
    - `deviceId` string, required — The device that generated the media.
    - `mediaType` 'video' | 'image', required — What type of media is contained.
    - `startTimestamp` string, date-time, required — Start time of the media.
    - `endTimestamp` string, date-time, required — End time of the media.
    - `flvUrl` string, nullable — Flash video delivered over HTTPS can be used to provide live streams, but also play back recordings.
    - `rtspUrl` string — RTSP is a protocol to request media to be sent, and to multiplex said media over one or more connections back to the client.
    - `rtspsUrl` string — Same as RTSP, but communication happens over a TLS socket instead of an unencrypted TCP socket.
    - `hlsUrl` string, nullable — Http Live Streaming can be used to deliver a live stream over HTTPS.
    - `multipartUrl` string — Proprietary protocol that uses multipart over HTTPS to deliver raw encoded image, video and audio frames as they become available
    - `mp4Url` string, nullable — MPEG-4 Part 14 files, also known as “.mp4” files, retrieved over HTTPS to play back recorded video and sometimes audio streams. Not all video and audio codecs are supported if strictly following the standards.

## Other responses

- `400` — The supplied object is invalid. Error detail will contain the validation error.
- `401` — You are not authenticated. Please authenticate and try again.
- `403` — You have no permission to access the specified resource.
- `404` — Referenced resource could not be found.
- `500` — Something went wrong in the server. Please try again.

---

[API](https://skmtc.net/eagleeyenetworks/apis/devices.md) · [All operations](https://skmtc.net/eagleeyenetworks/apis/devices/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/eagleeyenetworks/devices/revisions/df57313de545/schema)
