Downloaded endpoint

The downloaded endpoint allows you to track media consumption while a user is offline. When a user plays content from a device's storage using your app, you can store media session data on the device regardless of the device's connectivity. When the user finishes the playback session and the device returns online, you can use this endpoint to send the stored media session to Adobe in a single payload. Adobe dynamically assigns a session ID and processes the media session as if it was traditionally collected online.

downloaded

The downloaded endpoint represents a full media session from start to finish. Media sessions collected using this endpoint have the following properties:

POST https://edge.adobedc.net/ee/va/v1/downloaded?configId={datastreamID}

The following example shows a payload of only sessionStart and sessionComplete media event types. See the API reference for an example using more media event types.

data-slots=heading, code
data-repeat=2
data-languages=CURL,JSON

Request

curl -X POST "https://edge.adobedc.net/ee/va/v1/downloaded?configId={datastreamID}" \
--header 'Content-Type: application/json' \
--data '{
  "events": [
    {
      "xdm": {
        "identityMap": {
          "email": [
            {
              "id": "user@example.com",
              "primary": true
            }
          ]
        },
        "eventType": "media.downloaded",
        "mediaDownloadedEvents": [
          {
            "mediaEventTimestamp": "YYYY-09-26T15:52:24+00:00",
            "mediaEventType": "media.sessionStart",
            "mediaCollection": {
              "sessionDetails": {
                "name": "Media Analytics API Sample",
                "playerName": "sample-html5-api-player",
                "contentType": "VOD",
                "length": 60,
                "channel": "sample-channel"
              },
              "playhead": 0
            }
          },
          {
            "mediaEventTimestamp": "YYYY-09-26T15:53:08+00:00",
            "mediaEventType": "media.sessionComplete",
            "mediaCollection": {
              "playhead": 60
            }
          }
        ],
      }
    }
  ]
}'

Response

{
  "requestId": "7b551[...]54492",
  "handle": [
    {
      "type": "locationHint:result",
      "payload": [
        {
          "scope": "Target",
          "hint": "35",
          "ttlSeconds": 1800
        },
        {
          "scope": "AAM",
          "hint": "9",
          "ttlSeconds": 1800
        },
        {
          "scope": "EdgeNetwork",
          "hint": "or2",
          "ttlSeconds": 1800
        }
      ]
    },
    {
      "type": "state:store",
      "payload": [
        {
          "key": "kndctr_53A[...]C99_AdobeOrg_identity",
          "value": "CiYy[...]ZpTM=",
          "maxAge": 34128000
        },
        {
          "key": "kndctr_53A[...]C99_AdobeOrg_cluster",
          "value": "or2",
          "maxAge": 1800
        }
      ]
    }
  ]
}

This endpoint requires the following payload properties within the events[].xdm object:

XDM property
Description
eventType
The category of the event. Always set this property to media.downloaded for this endpoint.
mediaDownloadedEvents
An array of mediaEvent objects representing each media event within a session. See the table below.

Each mediaEvent object within mediaDownloadedEvents requires several fields. See Media Event Information data type in the Experience Data Model guide for more information.

Media event property
Description
mediaEventTimestamp
The timestamp when the media event happened.
mediaEventType
The media event type, such as media.sessionStart, media.play, or media.error.
mediaCollection
Contains information specific to the media event. Required fields in this object depend on mediaEventType. See Media Collection Details data type in the Experience Data Model guide for more information.

Response object

If successfully processed, the API returns an object with the following properties:

Response property
Description
requestId
The unique identifier for the request.
handle[]
An array of payloads returned from Adobe. Types of payloads include locationHint:result and state:store.