Ooyala IQ JSON API - JSON Schema


{
  "$schema": "http://json-schema.org/draft-03/schema#",
  "title": "Ooyala IQ JSON API - JSON Schema",
  "description": "Documentation for the Ooyala IQ JSON API.",
  "type": "object",
  "definitions": {
    "user": {
      "description": "Details of the user.",
      "type": "object",
      "required": false,
      "properties": {
        "emailHashMD5": {
          "description": "MD5 hash of the email id of the user, if available. E.g.: 9fb1308b4d75de1e96b2bf2e7fb84438",
          "type": "string",
          "required": false
        },
        "userId": {
          "description": "User id of the user, if available.",
          "type": "string",
          "required": false
        },
        "gender": {
          "description": "Gender of the user. E.g.: M,F etc",
          "type": "string",
          "required": false
        },
        "ageGroup": {
          "description": "The age group of the user. E.g.: {'min': 25, 'max': 35'} ",
          "type": "object",
          "required": false,
          "properties": {
            "min": {
              "description": "Minimum age of the user.",
              "type": "integer"
            },
            "max": {
              "description": "Maximum age of the user.",
              "type": "integer"
            }
          }
        },
        "geo": {
          "type": "object",
          "properties": {
            "countryCode": {
              "description": "ISO 2-alpha code of the country of the user.",
              "type": "string",
              "required": false
            },
            "region": {
              "description": "Region of the user.",
              "type": "string",
              "required": false
            },
            "state": {
              "description": "State of the user.",
              "type": "string",
              "required": false
            },
            "city": {
              "description": "City of the user.",
              "type": "string",
              "required": false
            },
            "latitude": {
              "description": "Latitude of the user.",
              "type": "number",
              "required": false
            },
            "longitude": {
              "description": "Longitude of the user.",
              "type": "number",
              "required": false
            },
            "geoVendor": {
              "description": "Name of the vendor which provided these details, if available.",
              "type": "string",
              "required": false
            }
          }
        }
      }
    },
    "device": {
      "type": "object",
      "properties": {
        "id": {
          "description": "Unique id identifying a device",
          "type": "string",
          "required": true
        },
        "userAgent": {
          "description": "The user agent string for the device where the media is being played.",
          "type": "string",
          "required": false
        },
        "deviceInfo": {
          "type": "object",
          "required": false,
          "properties": {
            "browser": {
              "description": "The web browser where the player is being viewed. E.g.: 'chrome'",
              "type": "string",
              "required": false
            },
            "browserVersion": {
              "description": "Browser version. E.g.: '33.0.1750.146'",
              "type": "string",
              "required": false
            },
            "os": {
              "description": "Name of the operating system. E.g.: 'windows', 'mac', 'ios'",
              "type": "string",
              "required": false
            },
            "osVersion": {
              "description": "Version of the operating system. E.g.: '6.1'",
              "type": "string",
              "required": false
            },
            "deviceType": {
              "enum": [
                "desktop",
                "tablet",
                "mobile",
                "settop",
                "bot",
                "console",
                "smarttv",
                "tablet/mobile"
              ],
              "type": "string",
              "required": false
            },
            "deviceBrand": {
              "description": "Brand name of the device. E.g.: 'apple' for iPhone",
              "type": "string",
              "required": false
            },
            "model": {
              "description": "Model name of the device. E.g.: 'iPhone 6s'",
              "type": "string",
              "required": false
            }
          }
        }
      }
    },
    "asset": {
      "type": "object",
      "properties": {
        "id": {
          "description": "Id of the asset. Could be a customer specific id or an embed code generated by Ooyala.",
          "type": "string",
          "required": true
        },
        "idType": {
          "description": "The type of the asset id. 'ooyala' if it is an embed code generated by Ooyala or 'external' if it is an external id managed by the customer.",
          "enum": [
            "ooyala",
            "external"
          ],
          "type": "string",
          "required": true
        }
      }
    },
    "geo": {
      "type": "object",
      "properties": {
        "countryCode": {
          "description": "ISO 2-alpha code of the country of the user.",
          "type": "string",
          "required": false
        },
        "region": {
          "description": "Region of the user.",
          "type": "string",
          "required": false
        },
        "state": {
          "description": "State of the user.",
          "type": "string",
          "required": false
        },
        "city": {
          "description": "City of the user.",
          "type": "string",
          "required": false
        },
        "latitude": {
          "description": "Latitude of the user.",
          "type": "number",
          "required": false
        },
        "longitude": {
          "description": "Longitude of the user.",
          "type": "number",
          "required": false
        },
        "geoVendor": {
          "description": "Name of the vendor which provided these details, if available.",
          "type": "string",
          "required": false
        }
      }
    },
    "player": {
      "type": "object",
      "properties": {
        "id": {
          "description": "Unique id for the player configuration.",
          "type": "string",
          "required": false
        },
        "name": {
          "description": "Name of the player. E.g.: 'ooyala', 'jwplayer', 'youtube', 'coltura' etc",
          "type": "string",
          "required": false
        },
        "version": {
          "description": "Version of the player.",
          "type": "string",
          "required": false
        }
      }
    },
    "baseEvent": {
      "description": "Mandatory attributes of an event. Clients are recommended to buffer events. Buffering duration is based on priority of events - 1 second (high priority), 5 seconds (mid priority) and 10 seconds (low priority).",
      "type": "object",
      "properties": {
        "sequenceNum": {
          "description": "The sequence number of the event since the beginning of the user session. It uniquely identifies an event of a session.",
          "type": "integer",
          "required": true
        },
        "time": {
          "description": "Date time in UTC as determined by the client of the event in the format YYYY-MM-DDThh:mm:ssZ.",
          "type": "string",
          "format": "date-time",
          "required": true
        },
        "eventName": {
          "enum": [
            "playerLoad",
            "display",
            "playRequested",
            "videoStarted",
            "playheadUpdate",
            "playthroughPercent",
            "percentageWatched",
            "bucketWatched",
            "replay",
            "seek",
            "pause",
            "resume",
            "timePlayed",
            "displayDeviceChanged",
            "custom"
          ],
          "type": "string",
          "required": true
        }
      }
    },
    "playerLoadEvent": {
      "title": "Player load event",
      "description": "A player instance has fully rendered. This should only be called once per player instance. Priority: High.",
      "type": "object",
      "extends": {
        "description": "Mandatory attributes of an event. Clients are recommended to buffer events. Buffering duration is based on priority of events - 1 second (high priority), 5 seconds (mid priority) and 10 seconds (low priority).",
        "type": "object",
        "properties": {
          "sequenceNum": {
            "description": "The sequence number of the event since the beginning of the user session. It uniquely identifies an event of a session.",
            "type": "integer",
            "required": true
          },
          "time": {
            "description": "Date time in UTC as determined by the client of the event in the format YYYY-MM-DDThh:mm:ssZ.",
            "type": "string",
            "format": "date-time",
            "required": true
          },
          "eventName": {
            "enum": [
              "playerLoad",
              "display",
              "playRequested",
              "videoStarted",
              "playheadUpdate",
              "playthroughPercent",
              "percentageWatched",
              "bucketWatched",
              "replay",
              "seek",
              "pause",
              "resume",
              "timePlayed",
              "displayDeviceChanged",
              "custom"
            ],
            "type": "string",
            "required": true
          }
        }
      }
    },
    "displayEvent": {
      "title": "Asset display event",
      "description": "Media has been displayed to the user, be it the description or the thumbnail. Priority: High.",
      "type": "object",
      "extends": {
        "description": "Mandatory attributes of an event. Clients are recommended to buffer events. Buffering duration is based on priority of events - 1 second (high priority), 5 seconds (mid priority) and 10 seconds (low priority).",
        "type": "object",
        "properties": {
          "sequenceNum": {
            "description": "The sequence number of the event since the beginning of the user session. It uniquely identifies an event of a session.",
            "type": "integer",
            "required": true
          },
          "time": {
            "description": "Date time in UTC as determined by the client of the event in the format YYYY-MM-DDThh:mm:ssZ.",
            "type": "string",
            "format": "date-time",
            "required": true
          },
          "eventName": {
            "enum": [
              "playerLoad",
              "display",
              "playRequested",
              "videoStarted",
              "playheadUpdate",
              "playthroughPercent",
              "percentageWatched",
              "bucketWatched",
              "replay",
              "seek",
              "pause",
              "resume",
              "timePlayed",
              "displayDeviceChanged",
              "custom"
            ],
            "type": "string",
            "required": true
          }
        }
      }
    },
    "playRequestedEvent": {
      "title": "Playback has been requested",
      "description": "A playback of media has been requested either via user action or configured autoplay. Priority: High.",
      "type": "object",
      "extends": {
        "description": "Mandatory attributes of an event. Clients are recommended to buffer events. Buffering duration is based on priority of events - 1 second (high priority), 5 seconds (mid priority) and 10 seconds (low priority).",
        "type": "object",
        "properties": {
          "sequenceNum": {
            "description": "The sequence number of the event since the beginning of the user session. It uniquely identifies an event of a session.",
            "type": "integer",
            "required": true
          },
          "time": {
            "description": "Date time in UTC as determined by the client of the event in the format YYYY-MM-DDThh:mm:ssZ.",
            "type": "string",
            "format": "date-time",
            "required": true
          },
          "eventName": {
            "enum": [
              "playerLoad",
              "display",
              "playRequested",
              "videoStarted",
              "playheadUpdate",
              "playthroughPercent",
              "percentageWatched",
              "bucketWatched",
              "replay",
              "seek",
              "pause",
              "resume",
              "timePlayed",
              "displayDeviceChanged",
              "custom"
            ],
            "type": "string",
            "required": true
          }
        }
      },
      "properties": {
        "isAutoPlay": {
          "type": "boolean",
          "required": true
        }
      }
    },
    "videoStartedEvent": {
      "title": "Media playback has started",
      "description": "Playback of media has started. Priority: High.",
      "type": "object",
      "extends": {
        "description": "Mandatory attributes of an event. Clients are recommended to buffer events. Buffering duration is based on priority of events - 1 second (high priority), 5 seconds (mid priority) and 10 seconds (low priority).",
        "type": "object",
        "properties": {
          "sequenceNum": {
            "description": "The sequence number of the event since the beginning of the user session. It uniquely identifies an event of a session.",
            "type": "integer",
            "required": true
          },
          "time": {
            "description": "Date time in UTC as determined by the client of the event in the format YYYY-MM-DDThh:mm:ssZ.",
            "type": "string",
            "format": "date-time",
            "required": true
          },
          "eventName": {
            "enum": [
              "playerLoad",
              "display",
              "playRequested",
              "videoStarted",
              "playheadUpdate",
              "playthroughPercent",
              "percentageWatched",
              "bucketWatched",
              "replay",
              "seek",
              "pause",
              "resume",
              "timePlayed",
              "displayDeviceChanged",
              "custom"
            ],
            "type": "string",
            "required": true
          }
        }
      }
    },
    "playheadUpdateEvent": {
      "title": "Playback ongoing event",
      "description": "Playback of media is ongoing. Priority: Low",
      "type": "object",
      "extends": {
        "description": "Mandatory attributes of an event. Clients are recommended to buffer events. Buffering duration is based on priority of events - 1 second (high priority), 5 seconds (mid priority) and 10 seconds (low priority).",
        "type": "object",
        "properties": {
          "sequenceNum": {
            "description": "The sequence number of the event since the beginning of the user session. It uniquely identifies an event of a session.",
            "type": "integer",
            "required": true
          },
          "time": {
            "description": "Date time in UTC as determined by the client of the event in the format YYYY-MM-DDThh:mm:ssZ.",
            "type": "string",
            "format": "date-time",
            "required": true
          },
          "eventName": {
            "enum": [
              "playerLoad",
              "display",
              "playRequested",
              "videoStarted",
              "playheadUpdate",
              "playthroughPercent",
              "percentageWatched",
              "bucketWatched",
              "replay",
              "seek",
              "pause",
              "resume",
              "timePlayed",
              "displayDeviceChanged",
              "custom"
            ],
            "type": "string",
            "required": true
          }
        }
      },
      "properties": {
        "playheadPositionMillis": {
          "description": "Position of the player playhead.",
          "type": "integer",
          "required": true
        }
      }
    },
    "playthroughPercentEvent": {
      "title": "Playthrough completion event",
      "description": "Marks completion of a quartile (25%, 50%, 75% and 100%) of media. This indicates that the user has reached the % completion be it via seek or watching. A playthrough x% requires that all playthrough events < x% has already been generated. Once a playthrough event has been generated, rewinding should not resend it. Priority: High",
      "type": "object",
      "extends": {
        "description": "Mandatory attributes of an event. Clients are recommended to buffer events. Buffering duration is based on priority of events - 1 second (high priority), 5 seconds (mid priority) and 10 seconds (low priority).",
        "type": "object",
        "properties": {
          "sequenceNum": {
            "description": "The sequence number of the event since the beginning of the user session. It uniquely identifies an event of a session.",
            "type": "integer",
            "required": true
          },
          "time": {
            "description": "Date time in UTC as determined by the client of the event in the format YYYY-MM-DDThh:mm:ssZ.",
            "type": "string",
            "format": "date-time",
            "required": true
          },
          "eventName": {
            "enum": [
              "playerLoad",
              "display",
              "playRequested",
              "videoStarted",
              "playheadUpdate",
              "playthroughPercent",
              "percentageWatched",
              "bucketWatched",
              "replay",
              "seek",
              "pause",
              "resume",
              "timePlayed",
              "displayDeviceChanged",
              "custom"
            ],
            "type": "string",
            "required": true
          }
        }
      },
      "properties": {
        "percent": {
          "description": "Playthrough percentage",
          "type": "integer",
          "required": true
        }
      }
    },
    "percentageWatchedEvent": {
      "title": "Percentage watched event",
      "description": "Captures the percentage of the video that the viewer has watched (position independent). The video is divided into 40 buckets. If the viewer watches the first bucket of the video (0-2.5%) and then skips to the last bucket (97.5-100%) and watches it, you should send two percentage watched events [0-2.5%] and [2.5%-5%]. If the viewer watches the same part (bucket) of the video again and again, that viewing event should only be sent once (it’s the player’s responsibility to de-duplicate views of the same part of the video). If you add all the percentage watched for a viewer while they were watching a video, it should always be <= 100%. This metric is per-mille, with the payload being from and to of the bucket. There are 40 buckets total for a video, where each bucket is of size 25 denoting 2.5%. If you see from: 1 and to: 25, that means the viewer has watched bucket number 1.  Priority: Medium.",
      "type": "object",
      "extends": {
        "description": "Mandatory attributes of an event. Clients are recommended to buffer events. Buffering duration is based on priority of events - 1 second (high priority), 5 seconds (mid priority) and 10 seconds (low priority).",
        "type": "object",
        "properties": {
          "sequenceNum": {
            "description": "The sequence number of the event since the beginning of the user session. It uniquely identifies an event of a session.",
            "type": "integer",
            "required": true
          },
          "time": {
            "description": "Date time in UTC as determined by the client of the event in the format YYYY-MM-DDThh:mm:ssZ.",
            "type": "string",
            "format": "date-time",
            "required": true
          },
          "eventName": {
            "enum": [
              "playerLoad",
              "display",
              "playRequested",
              "videoStarted",
              "playheadUpdate",
              "playthroughPercent",
              "percentageWatched",
              "bucketWatched",
              "replay",
              "seek",
              "pause",
              "resume",
              "timePlayed",
              "displayDeviceChanged",
              "custom"
            ],
            "type": "string",
            "required": true
          }
        }
      },
      "properties": {
        "startMille": {
          "description": "Start point of the bucket. E.g.: 1, 26,..., 976",
          "type": "integer",
          "required": true
        },
        "endMille": {
          "description": "End point of the bucket. E.g.: 25, 50,..., 1000",
          "type": "integer",
          "required": true
        }
      }
    },
    "bucketWatchedEvent": {
      "title": "Engagement event",
      "description": "Captures which part of the video the viewer has watched (position dependent). The video is divided into 40 buckets. If the viewer watches the first bucket of the video (0-2.5%) and then skips to the last bucket (97.5-100%) and watches it, you should send two bucket watched events [0-2.5%] and [97.5%-100%]. If the viewer  watches the same part (bucket) of the video again and again, that viewing event should be sent each time it is watched (the player should not de-duplicate views of the same part of the video). For example, if a viewer watches the 2.5% - 5% bucket over and over again for 5 times, you should send the event 5 times. This metric is per-mille, with the payload being from and to of the bucket. There are 40 buckets total for a video, where each bucket is of size 25 denoting 2.5%. If you see from: 1 and to: 25, that means the viewer has watched bucket number 1. Priority: Medium",
      "type": "object",
      "extends": {
        "description": "Mandatory attributes of an event. Clients are recommended to buffer events. Buffering duration is based on priority of events - 1 second (high priority), 5 seconds (mid priority) and 10 seconds (low priority).",
        "type": "object",
        "properties": {
          "sequenceNum": {
            "description": "The sequence number of the event since the beginning of the user session. It uniquely identifies an event of a session.",
            "type": "integer",
            "required": true
          },
          "time": {
            "description": "Date time in UTC as determined by the client of the event in the format YYYY-MM-DDThh:mm:ssZ.",
            "type": "string",
            "format": "date-time",
            "required": true
          },
          "eventName": {
            "enum": [
              "playerLoad",
              "display",
              "playRequested",
              "videoStarted",
              "playheadUpdate",
              "playthroughPercent",
              "percentageWatched",
              "bucketWatched",
              "replay",
              "seek",
              "pause",
              "resume",
              "timePlayed",
              "displayDeviceChanged",
              "custom"
            ],
            "type": "string",
            "required": true
          }
        }
      },
      "properties": {
        "startMille": {
          "description": "Start point of the bucket. E.g.: 1, 26,..., 976",
          "type": "integer",
          "required": true
        },
        "endMille": {
          "description": "End point of the bucket. E.g.: 25, 50,..., 1000",
          "type": "integer",
          "required": true
        }
      }
    },
    "replayEvent": {
      "title": "Media Replay Request",
      "description": "Media replay has been requested. Could be user triggered or auto. Priority: High.",
      "type": "object",
      "extends": {
        "description": "Mandatory attributes of an event. Clients are recommended to buffer events. Buffering duration is based on priority of events - 1 second (high priority), 5 seconds (mid priority) and 10 seconds (low priority).",
        "type": "object",
        "properties": {
          "sequenceNum": {
            "description": "The sequence number of the event since the beginning of the user session. It uniquely identifies an event of a session.",
            "type": "integer",
            "required": true
          },
          "time": {
            "description": "Date time in UTC as determined by the client of the event in the format YYYY-MM-DDThh:mm:ssZ.",
            "type": "string",
            "format": "date-time",
            "required": true
          },
          "eventName": {
            "enum": [
              "playerLoad",
              "display",
              "playRequested",
              "videoStarted",
              "playheadUpdate",
              "playthroughPercent",
              "percentageWatched",
              "bucketWatched",
              "replay",
              "seek",
              "pause",
              "resume",
              "timePlayed",
              "displayDeviceChanged",
              "custom"
            ],
            "type": "string",
            "required": true
          }
        }
      },
      "properties": {
        "isAutoPlay": {
          "description": "Whether it is autplay or user triggered.",
          "type": "boolean",
          "required": true
        }
      }
    },
    "seekEvent": {
      "title": "Media Seek",
      "description": "Media has been seeked. Priority: Medium",
      "type": "object",
      "extends": {
        "description": "Mandatory attributes of an event. Clients are recommended to buffer events. Buffering duration is based on priority of events - 1 second (high priority), 5 seconds (mid priority) and 10 seconds (low priority).",
        "type": "object",
        "properties": {
          "sequenceNum": {
            "description": "The sequence number of the event since the beginning of the user session. It uniquely identifies an event of a session.",
            "type": "integer",
            "required": true
          },
          "time": {
            "description": "Date time in UTC as determined by the client of the event in the format YYYY-MM-DDThh:mm:ssZ.",
            "type": "string",
            "format": "date-time",
            "required": true
          },
          "eventName": {
            "enum": [
              "playerLoad",
              "display",
              "playRequested",
              "videoStarted",
              "playheadUpdate",
              "playthroughPercent",
              "percentageWatched",
              "bucketWatched",
              "replay",
              "seek",
              "pause",
              "resume",
              "timePlayed",
              "displayDeviceChanged",
              "custom"
            ],
            "type": "string",
            "required": true
          }
        }
      },
      "properties": {
        "fromMillis": {
          "type": "integer",
          "required": true
        },
        "toMillis": {
          "type": "integer",
          "required": true
        }
      }
    },
    "pauseEvent": {
      "title": "Media Pause",
      "description": "Media has been paused. Priority: Medium",
      "type": "object",
      "extends": {
        "description": "Mandatory attributes of an event. Clients are recommended to buffer events. Buffering duration is based on priority of events - 1 second (high priority), 5 seconds (mid priority) and 10 seconds (low priority).",
        "type": "object",
        "properties": {
          "sequenceNum": {
            "description": "The sequence number of the event since the beginning of the user session. It uniquely identifies an event of a session.",
            "type": "integer",
            "required": true
          },
          "time": {
            "description": "Date time in UTC as determined by the client of the event in the format YYYY-MM-DDThh:mm:ssZ.",
            "type": "string",
            "format": "date-time",
            "required": true
          },
          "eventName": {
            "enum": [
              "playerLoad",
              "display",
              "playRequested",
              "videoStarted",
              "playheadUpdate",
              "playthroughPercent",
              "percentageWatched",
              "bucketWatched",
              "replay",
              "seek",
              "pause",
              "resume",
              "timePlayed",
              "displayDeviceChanged",
              "custom"
            ],
            "type": "string",
            "required": true
          }
        }
      }
    },
    "resumeEvent": {
      "title": "Media Resume",
      "description": "Media has been resumed. Priority: Medium",
      "type": "object",
      "extends": {
        "description": "Mandatory attributes of an event. Clients are recommended to buffer events. Buffering duration is based on priority of events - 1 second (high priority), 5 seconds (mid priority) and 10 seconds (low priority).",
        "type": "object",
        "properties": {
          "sequenceNum": {
            "description": "The sequence number of the event since the beginning of the user session. It uniquely identifies an event of a session.",
            "type": "integer",
            "required": true
          },
          "time": {
            "description": "Date time in UTC as determined by the client of the event in the format YYYY-MM-DDThh:mm:ssZ.",
            "type": "string",
            "format": "date-time",
            "required": true
          },
          "eventName": {
            "enum": [
              "playerLoad",
              "display",
              "playRequested",
              "videoStarted",
              "playheadUpdate",
              "playthroughPercent",
              "percentageWatched",
              "bucketWatched",
              "replay",
              "seek",
              "pause",
              "resume",
              "timePlayed",
              "displayDeviceChanged",
              "custom"
            ],
            "type": "string",
            "required": true
          }
        }
      }
    },
    "timePlayedEvent": {
      "title": "Time Played",
      "description": "Time played of the media, since the last timePlayedEvent. Priority: Low",
      "type": "object",
      "extends": {
        "description": "Mandatory attributes of an event. Clients are recommended to buffer events. Buffering duration is based on priority of events - 1 second (high priority), 5 seconds (mid priority) and 10 seconds (low priority).",
        "type": "object",
        "properties": {
          "sequenceNum": {
            "description": "The sequence number of the event since the beginning of the user session. It uniquely identifies an event of a session.",
            "type": "integer",
            "required": true
          },
          "time": {
            "description": "Date time in UTC as determined by the client of the event in the format YYYY-MM-DDThh:mm:ssZ.",
            "type": "string",
            "format": "date-time",
            "required": true
          },
          "eventName": {
            "enum": [
              "playerLoad",
              "display",
              "playRequested",
              "videoStarted",
              "playheadUpdate",
              "playthroughPercent",
              "percentageWatched",
              "bucketWatched",
              "replay",
              "seek",
              "pause",
              "resume",
              "timePlayed",
              "displayDeviceChanged",
              "custom"
            ],
            "type": "string",
            "required": true
          }
        }
      },
      "properties": {
        "timePlayedMillis": {
          "type": "integer",
          "required": true
        }
      }
    },
    "displayDeviceChangedEvent": {
      "title": "Display Device Changed",
      "description": "Media has changed displays, e.g. phone to Chromecast. Priority: High",
      "type": "object",
      "extends": {
        "description": "Mandatory attributes of an event. Clients are recommended to buffer events. Buffering duration is based on priority of events - 1 second (high priority), 5 seconds (mid priority) and 10 seconds (low priority).",
        "type": "object",
        "properties": {
          "sequenceNum": {
            "description": "The sequence number of the event since the beginning of the user session. It uniquely identifies an event of a session.",
            "type": "integer",
            "required": true
          },
          "time": {
            "description": "Date time in UTC as determined by the client of the event in the format YYYY-MM-DDThh:mm:ssZ.",
            "type": "string",
            "format": "date-time",
            "required": true
          },
          "eventName": {
            "enum": [
              "playerLoad",
              "display",
              "playRequested",
              "videoStarted",
              "playheadUpdate",
              "playthroughPercent",
              "percentageWatched",
              "bucketWatched",
              "replay",
              "seek",
              "pause",
              "resume",
              "timePlayed",
              "displayDeviceChanged",
              "custom"
            ],
            "type": "string",
            "required": true
          }
        }
      }
    },
    "customEvent": {
      "title": "TBD custom event",
      "description": "Custom event managed and sent by the customer. Keys must be of type String, and values must either be of type String, Integer, Float, or Boolean. Priority: Medium",
      "type": "object",
      "extends": {
        "description": "Mandatory attributes of an event. Clients are recommended to buffer events. Buffering duration is based on priority of events - 1 second (high priority), 5 seconds (mid priority) and 10 seconds (low priority).",
        "type": "object",
        "properties": {
          "sequenceNum": {
            "description": "The sequence number of the event since the beginning of the user session. It uniquely identifies an event of a session.",
            "type": "integer",
            "required": true
          },
          "time": {
            "description": "Date time in UTC as determined by the client of the event in the format YYYY-MM-DDThh:mm:ssZ.",
            "type": "string",
            "format": "date-time",
            "required": true
          },
          "eventName": {
            "enum": [
              "playerLoad",
              "display",
              "playRequested",
              "videoStarted",
              "playheadUpdate",
              "playthroughPercent",
              "percentageWatched",
              "bucketWatched",
              "replay",
              "seek",
              "pause",
              "resume",
              "timePlayed",
              "displayDeviceChanged",
              "custom"
            ],
            "type": "string",
            "required": true
          }
        }
      },
      "properties": {
        "customEventName": {
          "type": "string",
          "required": true
        }
      }
    }
  },
  "properties": {
    "pcode": {
      "description": "Provider code of the customer.",
      "type": "string",
      "required": true
    },
    "clientTime": {
      "description": "Date time in UTC as determined by the client while submitting the ping in the format:  YYYY-MM-DDThh:mm:ssZ.",
      "type": "string",
      "format": "date-time",
      "required": true
    },
    "serverTime": {
      "description": "[Internal field] Date time in UTC as determined by the logger server when request was received in the format:  YYYY-MM-DDThh:mm:ssZ.",
      "type": "string",
      "format": "date-time",
      "required": false
    },
    "logServer": {
      "description": "[Internal field] The name of the log server that received this ping.",
      "type": "string",
      "required": false
    },
    "analyticsSdkName": {
      "description": "Name of the SDK that generated these analytics events. E.g.: roku_sdk/xbox_sdk",
      "type": "string",
      "required": false
    },
    "analyticsSdkVersion": {
      "description": "Version of the SDK that generated these analytics events. E.g.: 1.2.0",
      "type": "string",
      "required": false
    },
    "sessionStartTime": {
      "description": "A session encapsulates a player life cycle, starting from it's creation to it's destruction. Including various media played during it's existence. This field denotes the start of the session in the UTC date format YYYY-MM-DDThh:mm:ssZ.",
      "type": "string",
      "format": "date-time",
      "required": true
    },
    "sessionId": {
      "description": "Randomly generated Universally unique identifier aka UUID. This is generated randomly by the client per session.",
      "type": "string",
      "format": "uuid",
      "required": true
    },
    "documentUrl": {
      "description": "The url where the user played the asset.",
      "type": "string",
      "format": "uri",
      "required": false
    },
    "clientIP": {
      "description": "The ip address of the client viewing the asset.",
      "type": "string",
      "format": "ipv4",
      "required": false
    },
    "customDimensions": {
      "description": "Custom metadata managed and sent by the customer.",
      "type": "object",
      "required": false
    },
    "asset": {
      "type": "object",
      "properties": {
        "id": {
          "description": "Id of the asset. Could be a customer specific id or an embed code generated by Ooyala.",
          "type": "string",
          "required": true
        },
        "idType": {
          "description": "The type of the asset id. 'ooyala' if it is an embed code generated by Ooyala or 'external' if it is an external id managed by the customer.",
          "enum": [
            "ooyala",
            "external"
          ],
          "type": "string",
          "required": true
        }
      }
    },
    "user": {
      "description": "Details of the user.",
      "type": "object",
      "required": false,
      "properties": {
        "emailHashMD5": {
          "description": "MD5 hash of the email id of the user, if available. E.g.: 9fb1308b4d75de1e96b2bf2e7fb84438",
          "type": "string",
          "required": false
        },
        "userId": {
          "description": "User id of the user, if available.",
          "type": "string",
          "required": false
        },
        "gender": {
          "description": "Gender of the user. E.g.: M,F etc",
          "type": "string",
          "required": false
        },
        "ageGroup": {
          "description": "The age group of the user. E.g.: {'min': 25, 'max': 35'} ",
          "type": "object",
          "required": false,
          "properties": {
            "min": {
              "description": "Minimum age of the user.",
              "type": "integer"
            },
            "max": {
              "description": "Maximum age of the user.",
              "type": "integer"
            }
          }
        },
        "geo": {
          "type": "object",
          "properties": {
            "countryCode": {
              "description": "ISO 2-alpha code of the country of the user.",
              "type": "string",
              "required": false
            },
            "region": {
              "description": "Region of the user.",
              "type": "string",
              "required": false
            },
            "state": {
              "description": "State of the user.",
              "type": "string",
              "required": false
            },
            "city": {
              "description": "City of the user.",
              "type": "string",
              "required": false
            },
            "latitude": {
              "description": "Latitude of the user.",
              "type": "number",
              "required": false
            },
            "longitude": {
              "description": "Longitude of the user.",
              "type": "number",
              "required": false
            },
            "geoVendor": {
              "description": "Name of the vendor which provided these details, if available.",
              "type": "string",
              "required": false
            }
          }
        }
      }
    },
    "player": {
      "type": "object",
      "properties": {
        "id": {
          "description": "Unique id for the player configuration.",
          "type": "string",
          "required": false
        },
        "name": {
          "description": "Name of the player. E.g.: 'ooyala', 'jwplayer', 'youtube', 'coltura' etc",
          "type": "string",
          "required": false
        },
        "version": {
          "description": "Version of the player.",
          "type": "string",
          "required": false
        }
      }
    },
    "device": {
      "type": "object",
      "properties": {
        "id": {
          "description": "Unique id identifying a device",
          "type": "string",
          "required": true
        },
        "userAgent": {
          "description": "The user agent string for the device where the media is being played.",
          "type": "string",
          "required": false
        },
        "deviceInfo": {
          "type": "object",
          "required": false,
          "properties": {
            "browser": {
              "description": "The web browser where the player is being viewed. E.g.: 'chrome'",
              "type": "string",
              "required": false
            },
            "browserVersion": {
              "description": "Browser version. E.g.: '33.0.1750.146'",
              "type": "string",
              "required": false
            },
            "os": {
              "description": "Name of the operating system. E.g.: 'windows', 'mac', 'ios'",
              "type": "string",
              "required": false
            },
            "osVersion": {
              "description": "Version of the operating system. E.g.: '6.1'",
              "type": "string",
              "required": false
            },
            "deviceType": {
              "enum": [
                "desktop",
                "tablet",
                "mobile",
                "settop",
                "bot",
                "console",
                "smarttv",
                "tablet/mobile"
              ],
              "type": "string",
              "required": false
            },
            "deviceBrand": {
              "description": "Brand name of the device. E.g.: 'apple' for iPhone",
              "type": "string",
              "required": false
            },
            "model": {
              "description": "Model name of the device. E.g.: 'iPhone 6s'",
              "type": "string",
              "required": false
            }
          }
        }
      }
    },
    "events": {
      "type": "array",
      "minItems": 1,
      "required": true,
      "items": {
        "description": "Mandatory attributes of an event. Clients are recommended to buffer events. Buffering duration is based on priority of events - 1 second (high priority), 5 seconds (mid priority) and 10 seconds (low priority).",
        "type": "object",
        "properties": {
          "sequenceNum": {
            "description": "The sequence number of the event since the beginning of the user session. It uniquely identifies an event of a session.",
            "type": "integer",
            "required": true
          },
          "time": {
            "description": "Date time in UTC as determined by the client of the event in the format YYYY-MM-DDThh:mm:ssZ.",
            "type": "string",
            "format": "date-time",
            "required": true
          },
          "eventName": {
            "enum": [
              "playerLoad",
              "display",
              "playRequested",
              "videoStarted",
              "playheadUpdate",
              "playthroughPercent",
              "percentageWatched",
              "bucketWatched",
              "replay",
              "seek",
              "pause",
              "resume",
              "timePlayed",
              "displayDeviceChanged",
              "custom"
            ],
            "type": "string",
            "required": true
          }
        }
      }
    }
  }
}

Send Feedback