{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/eagle-eye-networks/json-schema/eagle-eye-networks-api-paginated-media-response-schema.json",
  "title": "ApiPaginatedMediaResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/eagle-eye-networks-media-api-openapi.yml#/components/schemas/ApiPaginatedMediaResponse",
  "allOf": [
    {
      "$ref": "#/$defs/PaginatedResponseNoTotalSize"
    },
    {
      "type": "object",
      "properties": {
        "results": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ApiMediaWithIncludes"
          }
        }
      }
    }
  ],
  "$defs": {
    "ApiMediaIncludes": {
      "type": "object",
      "properties": {
        "flvUrl": {
          "type": [
            "string",
            "null"
          ],
          "x-jsoninclude-nonnull-annotation": true,
          "description": "Flash video delivered over HTTPS can be used to provide live streams, but also play back recordings."
        },
        "rtspUrl": {
          "type": "string",
          "x-jsoninclude-nonnull-annotation": true,
          "description": "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": {
          "type": "string",
          "x-jsoninclude-nonnull-annotation": true,
          "description": "Same as RTSP, but communication happens over a TLS socket instead of an unencrypted TCP socket."
        },
        "hlsUrl": {
          "type": [
            "string",
            "null"
          ],
          "x-jsoninclude-nonnull-annotation": true,
          "description": "Http Live Streaming can be used to deliver a live stream over HTTPS."
        },
        "multipartUrl": {
          "type": "string",
          "x-jsoninclude-nonnull-annotation": true,
          "description": "Proprietary protocol that uses multipart over HTTPS to deliver raw encoded image, video and audio frames as they become available"
        },
        "mp4Url": {
          "type": [
            "string",
            "null"
          ],
          "x-jsoninclude-nonnull-annotation": true,
          "description": "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."
        }
      }
    },
    "ApiMediaMain": {
      "type": "object",
      "properties": {
        "type": {
          "description": "Multiple Media can be published per source, but they should all have the same viewpoint. They can differ in:\n  * quality: `main` is higher resolution while `preview` is low resolution and low framerate.\n",
          "type": "string",
          "enum": [
            "preview",
            "main"
          ]
        },
        "deviceId": {
          "type": "string",
          "description": "The device that generated the media."
        },
        "mediaType": {
          "description": "What type of media is contained.",
          "type": "string",
          "enum": [
            "video",
            "image"
          ]
        },
        "startTimestamp": {
          "description": "Start time of the media.",
          "type": "string",
          "format": "date-time"
        },
        "endTimestamp": {
          "description": "End time of the media.",
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "type",
        "startTimestamp",
        "endTimestamp",
        "deviceId",
        "mediaType"
      ]
    },
    "ApiMediaWithIncludes": {
      "allOf": [
        {
          "$ref": "#/$defs/ApiMediaMain"
        },
        {
          "$ref": "#/$defs/ApiMediaIncludes"
        },
        {
          "type": "object"
        }
      ]
    },
    "PaginatedResponseNoTotalSize": {
      "type": "object",
      "description": "Used to wrap results for a paginated response, containing information on how to retrieve further pages.\n",
      "properties": {
        "nextPageToken": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true,
          "description": "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.\n"
        },
        "prevPageToken": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true,
          "description": "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.\n"
        },
        "results": {
          "type": "array",
          "readOnly": true,
          "description": "The result set from a collection API call.",
          "items": {
            "type": "object"
          }
        }
      },
      "required": [
        "nextPageToken",
        "prevPageToken",
        "results"
      ]
    }
  }
}