Pre/Post-Roll Media Endlink

New Implementation (preRollMediaIds / postRollMediaIds - Arrays)

  • Media Ids search for multitenant / non multitenant:

curl --location '{{BASE-URL}}/api/endlink/media' \
--header 'Authorization: Bearer {{YOUR-ACCESS-TOKEN}}' \
--header 'Content-Type: application/json' \
--data '{
  "preRollMediaIds": [
    "{{PREROLL-MEDIA-ID-1}}"
  ],
  "postRollMediaIds": [
    "{{POSTROLL-MEDIA-ID-1}}"
  ],
  "mediaIds": [
    "{{MEDIA-ID-1}}",
    "{{MEDIA-ID-2}}"
  ],
  "tags": {},
  "playerTags": {
    "{{PLAYER-TAG-KEY}}": "{{PLAYER-TAG-VALUE}}"
  },
  "timestamp": {{TIMESTAMP}},
  "disableMediaAnalyticsWebhook": {{ANALYTICS-WEBHOOK-DISABLE}} //optional
  "expireAt": {{EXPIRATION-DATE}} //optional
}'
  • Tags search for multitenant / non multitenant:

curl --location '{{BASE-URL}}/api/endlink/media' \
--header 'Authorization: Bearer {{YOUR-ACCESS-TOKEN}}' \
--header 'Content-Type: application/json' \
--data '{
  "preRollMediaIds": [
    "{{PREROLL-MEDIA-ID-1}}"
  ],
  "postRollMediaIds": [
    "{{POSTROLL-MEDIA-ID-1}}"
  ],
  "mediaIds": null,
  "tags": {
    "{{KEY}}": "{{VALUE}}"
  },
  "playerTags": {
    "{{PLAYER-TAG-KEY}}": "{{PLAYER-TAG-VALUE}}"
  },
  "timestamp": {{TIMESTAMP}},
  "disableMediaAnalyticsWebhook": {{ANALYTICS-WEBHOOK-DISABLE}} //optional
}'

Response

{
    "url": "{base-path}/71F686F0949DEE6268D8EDBDC12F2CC4F9A5442BE757B4190A354E061671D634?source=advisor",
    "playerTags": {
        "key": "value"
    }
}

Params that should be replaced:

BASE-URL:


YOUR-ACCESS-TOKEN:

Access token provided by the endpoint mentioned on this documentation: [SDK Mobile] - Generate an API Token


PREROLL-MEDIA-ID:

This represents the unique identifier for the preroll video media that will be used to generate an end link. The prerollMediaId serves as a placeholder for the ID of a specific video file that has been previously uploaded or registered in the system. The value is typically a string or numeric identifier that uniquely distinguishes the media.

Note: Only one mediaId is allowed for the preroll and postroll, and the media type must be video. Additionally, the same mediaId cannot be assigned to both prerollMediaId, postrollMediaId, and mediaIds. If the same ID is provided in multiple fields, a 400 Bad Request error will be returned, ensuring that the preroll and postroll videos do not appear multiple times in the generated end link.

Example: Legacy

"prerollMediaId": "e8d7f8a2-1234-4f7b-9876-4d29b839c241"

New Version

"preRollMediaIds": ["e8d7f8a2-1234-4f7b-9876-4d29b839c241"]


POSTROLL-MEDIA-ID:

This represents the unique identifier for the postroll video media that will be used to generate an end link. The postrollMediaId serves as a placeholder for the ID of a specific video file that has been previously uploaded or registered in the system. The value is typically a string or numeric identifier that uniquely distinguishes the media.

Note: Only one mediaId is allowed for the preroll and postroll, and the media type must be video. Additionally, the same mediaId cannot be assigned to both prerollMediaId, postrollMediaId, and mediaIds. If the same ID is provided in multiple fields, a 400 Bad Request error will be returned, ensuring that the preroll and postroll videos do not appear multiple times in the generated end link.

Example:

Legacy

"postrollMediaId": "f8d2f8a2-1234-4f7b-9876-4d29b839c453"

New version

"postRollMediaIds": ["f8d2f8a2-1234-4f7b-9876-4d29b839c453"]


KEY:

This represents the name of the tag in the tags object. It’s a placeholder for a specific type of information that is associate with the media, such as PROJECT_ID or USER_ID.

Example:

"PROJECT_ID"

VALUE: This is the value associated with the {{KEY}}. It’s a placeholder for the actual data related to the tag, such as a project number or user email.

Example:

"12345"


MEDIA-ID: This represents the unique identifier for the media that needs to generate an end link. Each mediaId is a placeholder for the ID of a specific media file that has been previously uploaded or registered in the system. The value is typically a string or numeric identifier that uniquely distinguishes the media.

  • You can pass one or multiple mediaIds in the form of an array.

  • Each mediaId should correspond to a valid media item in your system.

Example:

"mediaIds": [ "e8d7f8a2-1234-4f7b-9876-4d29b839c241", "a4c9b60e-5678-4a0b-bf9c-8e93c653bb24" ]

To get the mediaIds you need to create a media following the steps in [SDK Mobile] - External media or [SDK Mobile] - Upload File


PLAYER-TAG-KEY: This is the name of the player-specific tag. It could represent things like PLAYER_ID or SESSION_ID that are relevant to the media player.

Example:

"PLAYER_ID"

PLAYER-TAG-VALUE: This is the value associated with the {{PLAYER-TAG-KEY}}. It’s the actual data relevant to the player tag, such as a player ID or session identifier.

Example:

"67890"


TIMESTAMP: This represents the timestamp of the media or the event being tracked. It’s a placeholder for the specific time, which should be in a valid timestamp format (e.g., Unix timestamp or ISO 8601).

Example:

1727965668000


ANALYTICS-WEBHOOK-DISABLE: This is a boolean value (true or false) that determines whether media analytics webhooks should be disabled.

If is not sent by default is false, if set to true, the analytics webhook will not be triggered for this media.

Example:

true

Last updated