Skip to content
English
  • There are no suggestions because the search field is empty.

Eyemagnet Media API v2 — Trigger Integration Guide

The Eyemagnet Media API v2 lets integrations publish commands to media players through a single GraphQL trigger mutation, authenticated with a bearer token whose scope and team audience determine which players can be targeted.

Eyemagnet Media API v2 publishes commands to media players. Its public integration surface is the trigger GraphQL mutation.

Creating a token: Obtain bearer tokens through Eyemagnet Auth. See the Auth v2 integration guide for the supported authentication and token-creation flows.


Before you start

Eyemagnet will provide the base URL and bearer-token arrangement for the environment. Use the supplied base URL exactly as given:

Endpoint Method Purpose
{base} POST Publish a GraphQL trigger.
{base}/_health GET Health check; returns HEALTHY.
{base} GET GraphQL explorer.
Authentication and targeting

Send an Eyemagnet bearer token in the Authorization header. The token needs the modify players scope. Its first audience value (aud[0]) selects the active team, and triggers are published only to players in that team.

Authorization: Bearer <access-token> 

Pass ids to target one or more player IDs. Omit it to publish to every listening player in the active team. The API accepts an ID for value, which means a string, numeric ID, or a JSON document encoded as a string can be supplied. Always pass a type, even though the current schema marks it nullable.


Publish a trigger

The mutation returns true after the event has been published. It does not confirm that a player was connected, received the event, or completed the action.

const response = await fetch("https://media.example.com/media/v2", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": `Bearer ${accessToken}`,
  },
  body: JSON.stringify({
    query: `
      mutation Trigger($ids: [ID!], $type: TriggerType!, $value: ID) {
        trigger(ids: $ids, type: $type, value: $value)
      }
    `,
    variables: {
      ids: ["player_123"],
      type: "RELOAD",
      value: null,
    },
  }),
});

const { data, errors } = await response.json();
if ( !response.ok || errors?.length || data?.trigger !== true ) {
  throw new Error( errors?.[ 0 ]?.message || "Trigger was not published" );
}

GraphQL may return an errors array even when the HTTP request completes. Do not retry destructive triggers such as REBOOT, CLEAR, or update commands automatically.


Trigger types and values

value is omitted unless a value is shown below. For JSON values, stringify the object or array before passing it as the GraphQL variable. Player software varies by platform and release; use commands only with player families that support the intended action.

Type What it does Expected value
CHANNEL Switches to a channel. Channel ID, or {"id":"<channel-id>"}.
SEQUENCE Switches to a sequence. Sequence ID.
PLAYLIST Switches to a playlist. Playlist ID.
CHANNEL_INDEX Selects a channel by position. Zero-based index, for example "0", or {"index":0}.
SEQUENCE_INDEX Selects a sequence by position. Zero-based index as a string, for example "0".
PLAYLIST_INDEX Selects a playlist by position. Zero-based index as a string, for example "0".
COMPLETE Signals completion and advances the player’s current sequence. Omit; an optional player-defined completion string is accepted.
OVERRIDE Applies a temporary schedule override. JSON object describing the override.
REPLACE Sets runtime string replacements. JSON string map, for example {"greeting":"Welcome"}.
DEBUG Sets the player debug level. Integer string: "0", "1", "2", or "3".
PING Requests a player liveness response. Omit; compatible players publish PONG.
PONG Player liveness response. Player ID when emitted by a player; integrations normally do not publish this.
SYNC Reloads the player’s configuration from the API. Omit.
MUTE Mutes player audio. Omit.
UNMUTE Restores player audio. Omit.
LOCK Locks the player’s local controls. Omit.
UNLOCK Unlocks the player’s local controls. Omit.
PRESENT Enters presentation mode, disabling duration-based progression. Omit.
RESUME Leaves presentation mode and resumes duration-based progression. Omit.
RELOAD Reloads the player application. Omit.
REBOOT Reboots the player device where supported. Omit.
CAPTURE Captures a player screenshot where supported. Omit.
CLEAR Clears the player cache. Omit.
STATUS Requests a player status report. Omit.
REPORT Player status-report event. Player-defined status payload; integrations normally do not publish this.
SOFTWARE Requests a software-version update on compatible player agents. Software version identifier.
FIRMWARE Requests a firmware update on compatible Tizen players. JSON object: {"id":"<id>","name":"<file-name>","version":"<version>","size":<bytes>}.
LAUNCHER Sets the device launcher download-server address on compatible Tizen players. URL string.
TIME Sets device local time on compatible Tizen players. ISO-8601 date-time string, for example "2026-09-09T10:30:00+08:00".
TIMEZONE Sets device timezone on compatible Tizen players. IANA timezone name, for example "Australia/Canberra".
NTPSERVER Enables or disables network time on compatible Tizen players. Non-empty string enables it; omit or use an empty string to disable it.
VOLUME Temporarily sets player volume. Numeric string, for example "0.5".
TAG Adds temporary player tags. JSON array of tag IDs, for example ["tag_1"].
UNTAG Removes temporary player tags. JSON array of tag IDs, for example ["tag_1"].
RETAG Replaces all temporary player tags. JSON array of tag IDs, for example ["tag_1","tag_2"].

Production checklist

  • Use HTTPS and send the bearer token only in the Authorization header.
  • Obtain a token for the team whose players you intend to target.
  • Grant only the modify players scope required for trigger publishing.
  • Target explicit player IDs for disruptive commands whenever possible.
  • Treat a true response as publication confirmation, not device completion.
  • Handle GraphQL errors, 401, 403, and network timeouts explicitly.