Media Endlink

Endlinks for media allow users to search for specific media using either tags or media IDs, but not both simultaneously.

In a multitenant environment, an external ID is required; omitting it will result in a bad request.

In a non-multitenant environment, the external ID is not needed.

After processing the request, the result is a hash that can be used to retrieve the search results later.

Base Url -

  • Media Ids search for multitenant / non multitenant:

Endpoint - /api/endlink/media

Header -

  1. Authorization: Bearer {{YOUR-ACCESS-TOKEN}}

  2. Content-Type: application/json

Body -

{
    "mediaIds": [
      {{MEDIA-ID}},
      ...
    ],
    "tags": null,
    "playerTags": {
        {{PLAYER-TAG-KEY}}: {{PLAYER-TAG-VALUE}}
    },
    "timestamp": {{TIMESTAMP}},
    "disableMediaAnalyticsWebhook": {{ANALYTICS-WEBHOOK-DISABLE}} //optional
}

Example Curl Request -

curl --location 'https://sdk-mobile-api-rc.truvideo.com/api/endlink/media' \
--header 'Authorization: Bearer {{YOUR-ACCESS-TOKEN}}’ \
--header 'Content-Type: application/json' \
--data '{
    "mediaIds": [
      {{MEDIA-ID}},
      ...
    ],
    "tags": null,
    "playerTags": {
        {{PLAYER-TAG-KEY}}: {{PLAYER-TAG-VALUE}}
    },
    "timestamp": {{TIMESTAMP}},
    "disableMediaAnalyticsWebhook": {{ANALYTICS-WEBHOOK-DISABLE}} //optional
}'
  • Tags search for multitenant / non multitenant:

Endpoint - /api/endlink/media

Header -

  1. Authorization: Bearer {{YOUR-ACCESS-TOKEN}}

  2. Content-Type: application/json

Body -

{
    "mediaIds": null,
    "tags": {
       {{KEY}}: {{VALUE}},
       ...
    },
    "playerTags": {
        {{PLAYER-TAG-KEY}}: {{PLAYER-TAG-VALUE}}
    },
    "timestamp": {{TIMESTAMP}},
    "disableMediaAnalyticsWebhook": {{ANALYTICS-WEBHOOK-DISABLE}} //optional
}

Example Curl Request-

curl --location 'https://sdk-mobile-api-rc.truvideo.com/api/endlink/media' \
--header 'Authorization: Bearer {{YOUR-ACCESS-TOKEN}}’ \
--header 'Content-Type: application/json' \
--data '{
    "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


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 set to true, the analytics webhook will not be triggered for this media.

Example:

true

Last updated