显示屏
核心平台display_brand_settings_write显示屏Changes Display Screens settings shared by every facility in the facility's brand: the boot screen shown while screens start up, the settings new screens start with, and what templated content shows. Organisation admins only; read the current values and canEdit with display_settings_read boot_screen, screen_defaults or templated.
Actions:
- save_boot_screen: Save the boot screen. Sets the boot screen image (PNG, JPEG or WebP, up to 10 MB, from a public https imageUrl or imageBase64) and/or how it is laid out. Without an image, fit and background re-render the current one. Screens pick it up when they next start. Asks for confirmation.
- reset_boot_screen: Reset the boot screen. Removes the brand's boot screen; screens go back to the default one when they next start. Asks for confirmation.
- save_screen_defaults: Save the screen defaults. The settings a screen starts with when it is paired at one of the brand's facilities. Only the settings you pass change. Screens that are already paired keep their own settings; change those with device_inventory_write configure_screen. Asks for confirmation.
- save_templated: Save templated content settings. What templated content screens and the Schedule show: the data source name, workout names, programs in the Schedule and how far ahead, training phases and how far ahead, and Program Builder training camps (one banner per week) and how far ahead. Asks for confirmation.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
action* | "save_boot_screen" | "reset_boot_screen" | "save_screen_defaults" | "save_templated" | 要执行的操作;每个操作的说明见工具描述。 |
imageUrl | string | 图片的公开 https URL(save_boot_screen) |
imageBase64 | string | 没有 URL 时,以 base64 提供的图片(save_boot_screen) |
fit | "logo" | "fill" | (save_boot_screen) |
background | string | 背景颜色(#RRGGBB)(save_boot_screen) |
facilityId | string | 设施 ID。如果所指的就是已连接的设施,则可省略。 |
orientation | "normal" | "left" | "right" | "inverted" | Screen rotation (save_screen_defaults) |
airplayEnabled | boolean | Screens accept AirPlay (save_screen_defaults) |
sessionTimerEnabled | boolean | Synchronised session timer (master clock) and its bells (save_screen_defaults) |
sonosEnabled | boolean | Sonos speaker control (save_screen_defaults) |
duressEnabled | boolean | Bluetooth duress button monitoring (save_screen_defaults) |
cameraRestreamingEnabled | boolean | Restream local camera feeds from the screen (save_screen_defaults) |
wifiSupport | boolean | Captive Wi-Fi setup portal (save_screen_defaults) |
showSourceName | boolean | (save_templated) |
showWorkoutNames | boolean | (save_templated) |
showProgramsInSchedule | boolean | (save_templated) |
programLookaheadDays | integernull | 提前天数(0–90),null 表示不限(save_templated) |
showTrainingPhases | boolean | (save_templated) |
phaseLookaheadDays | integernull | 提前天数(0–90),null 表示不限(save_templated) |
showTrainingCamps | boolean | (save_templated) |
campLookaheadDays | integernull | 提前天数(0–90),null 表示不限(save_templated) |
confirm | boolean | 仅在用户确认第一次调用返回的预览后设置 |
display_groups_write显示屏在设施中创建、重命名和删除 Display Screen 分组,并设置分组包含哪些屏幕。分组可作为发布目标(display_publish targets.groupIds)和命令目标(display_screen_command groupIds)。提供多个屏幕、分组或目标时,一次调用会作用于全部对象;对大量对象执行操作前请先与用户确认。
操作:
- save:保存分组。创建:name(可选 screenIds)。重命名:groupId(ID 或当前名称)和 name。screenIds 会替换成员;未列出的屏幕会离开该分组,但保留其所属的其他分组。
- delete:删除分组。删除分组后,其屏幕会离开该分组(保留其他分组),发布到该分组的内容会从排程中移除。需要 groupId。需要确认。
参数
| 名称 | 类型 | 描述 |
|---|---|---|
action* | "save" | "delete" | 要执行的操作;每个操作的说明见工具描述。 |
groupId | string | 现有分组的 ID 或名称,用于重命名或更改成员 |
name | string | 分组名称(创建时必填)(save) |
screenIds | array | 分组中的屏幕;替换当前成员(save) |
facilityId | string | 设施 ID。如果所指的就是已连接的设施,则可省略。 |
confirm | boolean | 仅在用户确认第一次调用返回的预览后设置 |
display_hosted_apps_write显示屏为 Display Screens 发布静态 HTML 应用(“托管应用”)。请先调用 display_library_read app_guidelines 了解屏幕尺寸、设计规则、限制和 SDK,之后调用 display_screenshot 在屏幕上检查效果。提供多个屏幕、分组或目标时,一次调用会作用于全部对象;对大量对象执行操作前请先与用户确认。
操作:
- publish:发布托管应用。创建托管应用(name + files)或发布新版本(appId + files;新版本会在所有显示该应用的位置上线,rollback 可撤销)。publishTo 还会像 display_publish 一样将其放到屏幕上;以品牌或组织为目标时需要 confirm。需要 files。可能需要确认。
- rollback:回滚托管应用。在所有显示该应用的位置重新将较早的版本设为当前版本。可通过 display_library_read app_versions 列出版本。需要 appId、version。
参数
| 名称 | 类型 | 描述 |
|---|---|---|
action* | "publish" | "rollback" | 要执行的操作;每个操作的说明见工具描述。 |
appId | string | 要发布新版本的现有托管应用 ID(app_…) |
name | string | 应用名称(创建时必填)(publish) |
files | array | 应用文件。encoding 为 utf8(默认),二进制文件用 base64。(publish) |
entry | string | 入口 HTML 文件(默认 index.html)(publish) |
durationSec | number | 在播放列表中的默认显示时长,单位为秒(publish) |
tags | array | (publish) |
ownerScope | "facility" | "brand" | "organisation" | 新内容的所有者(默认 facility)。brand 和 organisation 需要组织范围的访问权限。(publish) |
publishTo | object | (publish) |
facilityId | string | 设施 ID。如果所指的就是已连接的设施,则可省略。 |
version | integer | 要设为当前版本的版本(rollback) |
confirm | boolean | 仅在用户确认第一次调用返回的预览后设置 |
display_library_read显示屏读取设施可见的 Display Screens 内容库:媒体(图片、视频)、应用(网页、托管 HTML 应用、AI Agent 应用、CCTV 视图)和播放列表,以及可添加的 AI Agent 应用和 CCTV 来源。
每个项目都有一个 contentRef(media#…、app#…、playlist#…),供 display_publish 和播放列表使用。ownerScope 表示其所有者(facility#、brand# 或 org#);内容只能在其所有者范围内发布。状态为 processing 的媒体尚未就绪;failed 表示需要重新上传。frameable: false 的网页无法在播放列表中播放,只能作为整页屏幕显示。带有 displayIssue 的项目会被屏幕跳过:未发布、已暂停、display-off、受众受限或没有 Custom Apps 的 AI Agent 应用;以及状态为 no-cctv、cctv-off(由设施管理员在 Display Screens 设置中为屏幕开启 CCTV)或 no-cameras 的 CCTV 视图。
操作:
- list:列出内容库项目。媒体和应用(分页;可按 type、kind、tag 或 name 筛选),或使用 type agent-apps 列出允许在屏幕上显示、可通过 display_publish content.agentAppId 发布的 AI Agent 应用。每个项目都有一个 type:media、app 或 agent-app。
- cctv_sources:列出 CCTV 来源。设施的摄像头和共享的 Live Views,供 display_publish content.cctv 使用,以及屏幕上的 CCTV 是否已开启。需要该设施的 CCTV 访问权限。
- get:获取内容库项目。按 contentRef 获取一个媒体项目、应用或播放列表。需要 contentRef。
- usages:内容的使用位置。使用某个媒体项目或应用的当前排程分配和播放列表(或某个播放列表的分配)。正在使用的内容无法删除。需要 contentRef。
- app_versions:列出托管应用版本。托管应用的各个版本及当前版本,供 display_hosted_apps_write rollback 使用。需要 appId。
- app_guidelines:托管应用指南。屏幕尺寸、设计规则、包大小限制、Display App SDK 和入门模板。为 display_hosted_apps_write publish 构建应用前请先调用。
- check_url:检查网页。网页能否在播放列表中显示(部分网站拒绝被嵌入框架),并提供显示效果的提示。拒绝嵌入的网页仍可作为整页屏幕显示。需要 url。
- playlists:列出播放列表。设施可见的播放列表(分页),每个都包含其项目(contentRef、duration、fit)。
参数
| 名称 | 类型 | 描述 |
|---|---|---|
action* | "list" | "cctv_sources" | "get" | "usages" | "app_versions" | "app_guidelines" | "check_url" | "playlists" | 要执行的操作;每个操作的说明见工具描述。 |
type | "media" | "apps" | "agent-apps" | 仅限一种项目(默认:媒体和应用)(list) |
kind | "image" | "video" | "url" | "hosted" | "agent-app" | "cctv-view" | (list) |
tag | string | 仅限带有此标签的项目(list) |
search | string | 名称筛选,不区分大小写(list) |
limit | integer | 每页项目数(默认 25,最多 100)(list、playlists) |
cursor | string | 上一页返回的 nextCursor(list、playlists) |
facilityId | string | 设施 ID。如果所指的就是已连接的设施,则可省略。(list、cctv_sources、get、usages、app_versions、check_url、playlists) |
contentRef | string | media#<id>、app#<id> 或 playlist#<id>,来自 display_library_read list 或 playlists(get、usages) |
appId | string | 托管应用 ID(app_…)(app_versions) |
url | string | 公开的 https URL(check_url) |
display_library_write显示屏添加和更改 Display Screens 内容库中的内容:上传图片和视频,创建网页、AI Agent 应用和 CCTV 视图应用,编辑名称、标签、时长和日期,删除未使用的项目,以及刷新应用预览。托管 HTML 应用通过 display_hosted_apps_write 发布;播放列表通过 display_playlists_write 管理。
图片请按 1920×1080(横屏)或 1080×1920(竖屏)设计。新媒体在生成网页版本期间状态为 processing;可以立即加入播放列表,就绪后即开始播放。ownerScope:facility(默认)、brand 或 organisation(brand 和 organisation 需要组织范围的访问权限)。
操作:
- upload_media:上传图片或视频。从公开的 https url(推荐;图片最大 25 MB,视频最大 200 MB)或带 mimeType 的 base64(最大 20 MB)添加图片或视频。支持 JPEG、PNG、WebP、GIF 图片;MP4、WebM、MOV 视频(转换为最高 1080p 的 H.264 MP4)。更大的视频:使用 create_video_upload。
- create_video_upload:开始上传大视频。适用于最大 2 GB 的视频:记录视频并返回预签名上传地址(在 upload.expiresAt 之前使用 upload.headers 将文件 PUT 到 upload.url),然后用其 contentRef 调用 transcode。需要 name、mimeType、bytes。
- transcode:处理视频。为屏幕转换视频:在 create_video_upload 之后、失败后重试,或用于屏幕无法播放的旧视频。需要 contentRef。
- create_app:添加应用。添加网页(kind url,传入 url;会检查能否嵌入框架)、AI Agent 应用(kind agent-app,传入来自 display_library_read list type agent-apps 的 agentAppId)或 CCTV 视图(kind cctv-view,归设施所有,需要 CCTV 访问权限)。需要 kind、name。
- update:更新内容库项目。更改媒体项目或应用的名称、标签或时长;媒体项目的 validFrom/validTo(ISO,null 表示清除;超出该时间范围时会被跳过);网页的 url;或 CCTV 视图的摄像头、视图、布局或画质。需要 contentRef。
- delete:删除内容库项目。删除媒体项目或应用。当其位于当前排程或播放列表中时无法删除:错误信息会列出这些位置(请先通过 display_schedule_write delete 或 display_playlists_write save 移除)。需要 contentRef。需要确认。
- refresh_preview:刷新应用预览。为应用重新截图,用作其内容库预览(例如在页面更改后)。需要 contentRef。
参数
| 名称 | 类型 | 描述 |
|---|---|---|
action* | "upload_media" | "create_video_upload" | "transcode" | "create_app" | "update" | "delete" | "refresh_preview" | 要执行的操作;每个操作的说明见工具描述。 |
url | string | 图片或视频的公开 https URL(推荐)(upload_media、create_app、update) |
base64 | string | 没有 URL 时,以 base64 提供的文件内容(最大 20 MB)(upload_media) |
mimeType | string | 使用 base64 时必填,例如 image/png(upload_media、create_video_upload) |
name | string | 内容库中的名称(upload_media、create_video_upload、create_app、update) |
tags | array | 标签(替换当前标签)(upload_media、create_video_upload、create_app、update) |
ownerScope | "facility" | "brand" | "organisation" | 新内容的所有者(默认 facility)。brand 和 organisation 需要组织范围的访问权限。(upload_media、create_video_upload、create_app) |
durationSec | number | 图片在屏幕上的默认显示时长,单位为秒(upload_media、create_app、update) |
facilityId | string | 设施 ID。如果所指的就是已连接的设施,则可省略。 |
bytes | integer | 文件大小,单位为字节(create_video_upload) |
resolution | "720" | "1080" | "1440" | "2160" | "original" | 为屏幕转换视频的最大尺寸(默认 1080;original 保留原始尺寸)(create_video_upload、transcode) |
contentRef | string | media#<id>、app#<id> 或 playlist#<id>,来自 display_library_read list 或 playlists(transcode、update、delete、refresh_preview) |
kind | "url" | "agent-app" | "cctv-view" | (create_app) |
agentAppId | string | AI Agent 应用:应用 ID(create_app) |
source | "view" | "cameras" | CCTV 视图:view(传入 viewId)或 cameras(传入 cameras)(create_app、update) |
viewId | string | CCTV 视图:Live View ID(display_library_read cctv_sources)(create_app、update) |
cameras | array | CCTV 视图:摄像头 ID(display_library_read cctv_sources)(create_app、update) |
layout | "auto" | "1x1" | "2x1" | "1+2" | "2x2" | "1+5" | "2x3" | "3x3" | CCTV 视图:画面布局(create_app、update) |
quality | "auto" | "native" | "1080p" | "720p" | "480p" | "360p" | "240p" | CCTV 视图:视频流画质(create_app、update) |
showNames | boolean | CCTV 视图:在画面上显示摄像头名称(create_app、update) |
validFrom | stringnull | 媒体:开始播放的 ISO 日期时间;null 表示清除(update) |
validTo | stringnull | 媒体:停止播放的 ISO 日期时间;null 表示清除(update) |
confirm | boolean | 仅在用户确认第一次调用返回的预览后设置 |
display_playlists_write显示屏创建、更新和删除 Display Screens 播放列表:按顺序循环播放的媒体和应用。更改会在数秒内同步到所有显示该播放列表的屏幕。使用 display_publish content.contentRef "playlist#
操作:
- save:保存播放列表。创建:name + items(items 可以为空)。更新:playlistId + name、items、transition 中的任意项;items 会替换整个列表,因此请按顺序发送所有项目。
- delete:删除播放列表。删除一个播放列表。当其在任何位置处于发布状态时无法删除:错误信息会列出需要先移除的分配(display_schedule_write delete)。需要 playlistId。需要确认。
参数
| 名称 | 类型 | 描述 |
|---|---|---|
action* | "save" | "delete" | 要执行的操作;每个操作的说明见工具描述。 |
playlistId | string | 要更新的现有播放列表 ID(pl_…) |
name | string | 播放列表名称(创建时必填)(save) |
transition | "fade" | "none" | (save) |
ownerScope | "facility" | "brand" | "organisation" | 新内容的所有者(默认 facility)。brand 和 organisation 需要组织范围的访问权限。(save) |
items | array | 按顺序提供的完整列表(替换当前项目;保留 itemId 即可保留某个项目)。frameable: false 的网页不会播放。(save) |
facilityId | string | 设施 ID。如果所指的就是已连接的设施,则可省略。 |
confirm | boolean | 仅在用户确认第一次调用返回的预览后设置 |
display_publish显示屏将内容放到 Display Screens 上:媒体项目、播放列表、应用、网页、AI Agent 应用或 CCTV 实时画面,目标可以是屏幕、分组、设施、其品牌或其组织。
mode:now(默认)替换目标平时显示的内容;scheduled 仅在每周时间段(设施时区)内和/或 from 与 to 之间显示;takeover 在 durationMin 内(或直到某个时间)中断所有内容,然后自动结束(可用 display_takeover_stop 提前停止)。屏幕先按层级决定显示内容(takeover > scheduled > default),再按目标的具体程度决定(screen > group > facility > brand > organisation)。
CCTV:屏幕附近的任何人都能看到实时摄像头画面。第一次调用会返回 requiresConfirmation(代码 CCTV_CONFIRMATION_REQUIRED);请询问用户,然后使用 confirmCctv: true 再次调用。设施必须开启 "Allow CCTV on display screens"。
只有播放器模式的屏幕会显示已发布的内容;其他屏幕会列在 warnings 中。返回一个 batchId;使用它调用 display_schedule_write delete 可撤销整个发布。提供多个屏幕、分组或目标时,一次调用会作用于全部对象;对大量对象执行操作前请先与用户确认。
参数
| 名称 | 类型 | 描述 |
|---|---|---|
targets* | object | 内容的投放位置。可任意组合。分组名称和 ID 均可使用。brand 和 organisation 需要组织范围的 Display Screens 访问权限。 |
content* | object | 要显示的内容:contentRef、url、agentAppId 或 cctv 中的一项且仅限一项。 |
mode | "now" | "default" | "scheduled" | "takeover" | `now`/`default`(默认):替换目标平时显示的内容。`scheduled`:仅在时间段内和/或 from 与 to 之间显示。`takeover`:在 durationMin 内(或直到某个时间)中断所有内容,然后自动结束。 |
windows | array | 设施时区内的每周时间段。days 为 ISO 星期(1 = 星期一 … 7 = 星期日);start/end 格式为 "HH:MM"(end 可为 "24:00")。 |
from | string | 排程发布开始的 ISO 日期时间 |
to | string | 排程发布结束的 ISO 日期时间 |
durationMin | number | 接管时长,单位为分钟(最长 7 天) |
until | string | 接管结束的 ISO 日期时间(代替 durationMin) |
priority | integer | 用于决定重叠排程项目的优先顺序(数值高者优先) |
confirmCctv | boolean | 仅在用户明确确认显示实时 CCTV 后设置 |
facilityId | string | 设施 ID。如果所指的就是已连接的设施,则可省略。 |
confirm | boolean | 仅在用户确认第一次调用返回的预览后设置 |
display_schedule_read显示屏读取发布到 Display Screens 的内容:对于单个屏幕,读取其在某一时刻及某一时间范围内显示的内容(综合其继承的所有层级和目标得出)以及作用于它的分配;或读取发布到某个分组、设施、其品牌或其组织的分配。
display_schedule_write 更新或删除的对象就是分配 ID(as_…)和批次 ID(bt_…)。时间采用 ISO 格式;时间段使用设施时区。
操作:
- get:获取屏幕的排程。屏幕在
at(默认当前)显示的内容、从from到to的时间线(默认 24 小时),以及作用于它的每个分配。需要 screenId。 - list_assignments:列出分配。发布到某个分组(groupId),或发布到设施、其品牌或其组织(target,默认 facility)的分配。分页,最新更改在前。
参数
| 名称 | 类型 | 描述 |
|---|---|---|
action* | "get" | "list_assignments" | 要执行的操作;每个操作的说明见工具描述。 |
screenId | string | 屏幕 ID(6 位字符代码),来自 display_screens_read list(get) |
at | string | 要查看显示内容的 ISO 日期时间(默认当前)(get) |
from | string | 时间线开始时间,ISO 格式(默认 at,否则为当前)(get) |
to | string | 时间线结束时间,ISO 格式(默认 from 之后 24 小时)(get) |
includeExpired | boolean | 包括已结束的分配 |
facilityId | string | 设施 ID。如果所指的就是已连接的设施,则可省略。 |
groupId | string | 屏幕分组 ID 或名称,来自 display_screens_read groups(list_assignments) |
target | "facility" | "brand" | "organisation" | 未提供 groupId 时使用(默认 facility)(list_assignments) |
limit | integer | 每页项目数(默认 25,最多 100)(list_assignments) |
cursor | string | 上一页返回的 nextCursor(list_assignments) |
display_schedule_write显示屏更改发布到 Display Screens 的内容:编辑分配的时间、优先级或内容(可选择作用于整个发布),或移除一个分配或整个发布。可通过 display_schedule_read 查找 ID。从排程中移除内容不会将其从内容库中删除;如需提前结束接管但保留其历史记录,请使用 display_takeover_stop。
操作:
- update:更新分配。更改分配的时间(每周时间段、from/to;null 表示清除日期)、优先级或内容。applyToBatch 会对该发布的每个目标进行相同的更改。接管只能设置新的结束时间。CCTV 内容需要在用户同意后提供 confirmCctv。需要 assignmentId。
- delete:从排程中移除。移除一个分配(assignmentId)或某次发布的全部内容(batchId)。屏幕会在数秒内恢复为原本应显示的内容。需要确认。
参数
| 名称 | 类型 | 描述 |
|---|---|---|
action* | "update" | "delete" | 要执行的操作;每个操作的说明见工具描述。 |
assignmentId | string | 来自 display_schedule_read 的单个分配(as_…) |
applyToBatch | boolean | 对该发布的每个目标进行相同的更改(update) |
windows | array | 设施时区内的每周时间段。days 为 ISO 星期(1 = 星期一 … 7 = 星期日);start/end 格式为 "HH:MM"(end 可为 "24:00")。(update) |
from | stringnull | 开始的 ISO 日期时间;null 表示清除(update) |
to | stringnull | 结束的 ISO 日期时间;null 表示清除(update) |
priority | integer | 用于决定重叠排程项目的优先顺序(数值高者优先)(update) |
contentRef | string | media#<id>、app#<id> 或 playlist#<id>,来自 display_library_read list 或 playlists(update) |
confirmCctv | boolean | 仅在用户明确确认显示实时 CCTV 后设置(update) |
facilityId | string | 设施 ID。如果所指的就是已连接的设施,则可省略。 |
batchId | string | 来自 display_publish 或 display_schedule_read 的整个发布(bt_…),涵盖其所有目标(delete) |
confirm | boolean | 仅在用户确认第一次调用返回的预览后设置 |
display_screen_command显示屏向设施中的 Display Screens 发送实时命令:reload(播放器屏幕重新获取排程)、identify(闪烁显示屏幕名称和代码,以便在现场找到它)、displayOn/displayOff(电视面板)、rebootDevice(重启屏幕的电脑,黑屏 1–2 分钟;需要 confirm: true)或 osd(简短的屏幕消息;传入 message)。
通过 screenIds 和/或 groupIds(设施中这些分组的所有屏幕)选择屏幕,或使用 allScreens: true 选择设施中的所有屏幕(此时 displayOn/displayOff 也会作用于 Templated content 屏幕)。返回每个屏幕的结果。提供多个屏幕、分组或目标时,一次调用会作用于全部对象;对大量对象执行操作前请先与用户确认。
参数
| 名称 | 类型 | 描述 |
|---|---|---|
screenIds | array | 屏幕 ID(6 位字符代码),来自 display_screens_read list。使用 allScreens 时请省略。 |
groupIds | array | 屏幕分组 ID 或名称:设施中这些分组的所有屏幕 |
allScreens | boolean | 设施中的所有屏幕,包括 Templated content 屏幕 |
command* | "reload" | "identify" | "displayOn" | "displayOff" | "rebootDevice" | "osd" | 要执行的操作(rebootDevice 需要 confirm) |
message | string | osd 的文本 |
facilityId | string | 设施 ID。如果所指的就是已连接的设施,则可省略。 |
confirm | boolean | 仅在用户确认第一次调用返回的预览后设置 |
display_screens_read显示屏读取设施的 Display Screens:列出屏幕及其状态、当前和接下来显示的内容(可按分组、状态或显示模式筛选),获取单个屏幕的完整详情和时间线,或列出屏幕分组及其屏幕。
显示模式在用户界面中显示为 "Data Source":player 为 "User managed content",program-builder 为 "Templated content"(切勿对用户说 "Program Builder"),url 为 "Full-page website (Kiosk Mode)"。时间采用 ISO 格式;会返回设施时区。
操作:
- list:列出屏幕。设施中的屏幕(分页),每个都包含状态、最后心跳、分组、标签以及当前和接下来显示的内容。同时返回分组。
- get:获取屏幕。单个屏幕的完整详情(状态、心跳、播放器版本、最近错误),对于播放器屏幕,还包括其在某一时间范围内显示的内容(默认接下来 24 小时,最长 14 天)。需要 screenId。
- groups:列出屏幕分组。设施中的屏幕分组(分页),每个都包含其屏幕。
参数
| 名称 | 类型 | 描述 |
|---|---|---|
action* | "list" | "get" | "groups" | 要执行的操作;每个操作的说明见工具描述。 |
groupId | string | 仅限此分组中的屏幕(ID 或名称)(list) |
status | "playing" | "provisioning" | "display-off" | "not-responding" | "offline" | "online" | (list) |
mode | "player" | "program-builder" | "url" | (list) |
limit | integer | 每页项目数(默认 25,最多 100)(list、groups) |
cursor | string | 上一页返回的 nextCursor(list、groups) |
facilityId | string | 设施 ID。如果所指的就是已连接的设施,则可省略。 |
screenId | string | 屏幕 ID(6 位字符代码),来自 display_screens_read list(get) |
from | string | 时间线开始时间,ISO 格式(默认当前)(get) |
to | string | 时间线结束时间,ISO 格式(默认 from 之后 24 小时)(get) |
display_screens_write显示屏设备管理更改 Display Screens:通过配对码配对新屏幕;重命名屏幕、设置其分组和标签,或切换其显示模式(在用户界面中显示为 "Data Source");轮换播放器屏幕的令牌;为屏幕或内容创建限时预览链接;或将屏幕恢复出厂设置(将其从设施中移除)。
显示模式:player("User managed content")、url("Full-page website (Kiosk Mode)",传入 url,仅限 https)、program-builder("Templated content";切勿对用户说 "Program Builder")。更改模式会立即重新加载屏幕并改变会员看到的内容,因此需要用户确认。
操作:
- update:更新屏幕。设置屏幕的名称、分组(ID 或名称;替换当前分组)、标签(替换现有标签)和/或显示模式。更改模式时会先返回 requiresConfirmation。需要 screenId。可能需要确认。
- rotate_token:轮换屏幕令牌。为播放器屏幕签发新令牌并重新加载;旧令牌随即失效。当屏幕的播放器 URL 可能已泄露时使用。需要 screenId。需要确认。
- create_preview_link:创建预览链接。一个限时有效的链接,用于显示屏幕当前显示的内容或内容的显示效果,也可指定未来的某个时间。在链接过期前,任何拥有该链接的人都能查看。
- reset:将屏幕恢复出厂设置。将屏幕从设施中移除并恢复出厂设置;已关机的屏幕会在下次上线时重置,然后显示其配对页面。传入 confirmName:与用户输入完全一致的屏幕名称。需要设备管理权限。需要 screenId、confirmName。需要确认。
- pair:配对新屏幕。通过配对页面上的 6 位字符代码将新屏幕添加到设施,然后重新加载。仅有 Display Screens 的设施会以 player 模式启动;同时拥有 Templated content 的设施由 mode 决定(默认 program-builder)。需要设备管理权限。需要 pairingCode、name。需要确认。
参数
| 名称 | 类型 | 描述 |
|---|---|---|
action* | "update" | "rotate_token" | "create_preview_link" | "reset" | "pair" | 要执行的操作;每个操作的说明见工具描述。 |
screenId | string | 屏幕 ID(6 位字符代码),来自 display_screens_read list(update、rotate_token、create_preview_link、reset) |
name | string | 屏幕名称(update、pair) |
groupIds | array | 分组 ID 或名称;替换当前分组(可通过 display_groups_write save 创建分组)(update) |
tags | array | 替换当前标签(update) |
mode | "player" | "program-builder" | "url" | 显示模式("Data Source")(update、pair) |
url | string | url 模式使用的网站(https)(update) |
facilityId | string | 设施 ID。如果所指的就是已连接的设施,则可省略。 |
contentRef | string | media#<id>、app#<id> 或 playlist#<id>,来自 display_library_read list 或 playlists(create_preview_link) |
orientation | "landscape" | "portrait" | 用于 contentRef 预览(默认 landscape)(create_preview_link) |
at | string | 预览所用的 ISO 日期时间(默认当前)(create_preview_link) |
confirmName | string | 由用户输入以确认的屏幕名称(必须完全一致)(reset) |
pairingCode | string | 屏幕在配对页面上显示的代码(0 和 O 外观相似)(pair) |
contentStream | string | Templated content:播放的流(轮次),默认 1(pair) |
confirm | boolean | 仅在用户确认第一次调用返回的预览后设置 |
display_screenshot显示屏截取 Display Screen 当前显示的画面并返回图片,便于在发布后检查效果(布局、文字大小、没有内容被截断或滚动)。最多等待 15 秒让屏幕响应;离线屏幕会超时。同时返回该 JPEG 的门户 URL(仅限已登录用户,保留 10 分钟)。
截图可能包含实时 CCTV 画面和画面中的会员;请勿在对话之外分享。
参数
| 名称 | 类型 | 描述 |
|---|---|---|
screenId* | string | 屏幕 ID(6 位字符代码),来自 display_screens_read list |
facilityId | string | 设施 ID。如果所指的就是已连接的设施,则可省略。 |
display_settings_read显示屏Reads Display Screens settings for a facility: the fallback slate, polling and nightly reload, CCTV on screens; the screen power schedule (with the next days' on/off times); automations (brightness, bell volume, check-in power, round timer state); the brand's boot screen, screen defaults and templated content settings; and, with templated content, the scheduled program dates and the templated schedule.
Actions:
- settings: Get facility display settings. The fallback slate (message, background, logo, facility name), polling interval, nightly reload time and whether CCTV may be shown on screens.
- power_schedule: Get the power schedule. When screens turn on and off: the saved schedule (or the older automations' equivalent), the facility time zone and the on/off times for the next 7 days.
- power_schedule_preview: Preview a power schedule. The on/off times a schedule would give over the next 7 days, without saving it. Needs schedule.
- automations: Get display automations. Automatic brightness (day/night levels and triggers), bell volume levels and schedule (decimal hours, 6.5 = 06:30), check-in power, and the round timer state, for one or several facilities. usesGlobalDefaults is true until the facility saves its own.
- boot_screen: Get the brand's boot screen. The image the facility's brand shows while screens start up (fit, background, image URLs) and whether you can change it (organisation admins).
- screen_defaults: Get the brand's screen defaults. The settings a screen starts with when it is paired at one of the brand's facilities (orientation, screen mirroring, session timer, speaker control, duress monitoring, camera restreaming, Wi-Fi support) and whether you can change them (organisation admins). Screens that are already paired keep their own settings; see device_inventory_read for those.
- templated: Get the brand's templated content settings. What templated content screens and the Schedule show for the facility's brand (source name, workout names, programs and training phases, look-ahead days) and whether you can change it (organisation admins).
- program_dates: List scheduled program dates. The dates with a workout program, from the start of this month to the brand's look-ahead. Needs templated content (Program Builder) at the facility.
- templated_schedule: Get the templated schedule. Programs and training phases between two dates (YYYY-MM-DD, at most 62 days), as the brand shows them. Needs templated content (Program Builder) at the facility. Needs from, to.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
action* | "settings" | "power_schedule" | "power_schedule_preview" | "automations" | "boot_screen" | "screen_defaults" | "templated" | "program_dates" | "templated_schedule" | 要执行的操作;每个操作的说明见工具描述。 |
facilityId | string | 设施 ID。如果所指的就是已连接的设施,则可省略。 |
schedule | object | 屏幕在人员值守时间(按偏移量扩展)或自定义每周时间段内开启,并带有假期规则。(power_schedule_preview) |
facilityIds | array | 多个设施 ID,用于在每个设施执行相同的请求。代替 facilityId 使用。(automations) |
from | string | 开始日期(YYYY-MM-DD)(templated_schedule) |
to | string | 结束日期(YYYY-MM-DD)(templated_schedule) |
display_settings_write显示屏更改设施的 Display Screens 设置:备用画面、轮询和夜间重新加载,以及 "Allow CCTV on display screens";屏幕电源排程;以及自动化(亮度、铃声音量、签到开屏)。未提供的字段保留当前值。品牌范围的设置(启动画面、Templated content)请使用 display_brand_settings_write。
操作:
- save_settings:保存设施显示设置。没有排程内容时显示的备用画面、轮询间隔(30–300 秒)、夜间重新加载时间(HH:mm)和 allowCctv。开启 allowCctv 需要用户确认,并需要具有 CCTV 访问权限的设施管理员。可能需要确认。
- save_power_schedule:保存电源排程。更改屏幕开关的时间;传入的字段会合并到已保存的排程中。返回未来 7 天的开关时间。请先通过 display_settings_read power_schedule_preview 检查。需要 schedule。
- save_automations:保存显示自动化。更改自动亮度、铃声音量和签到开屏设置。此后设施将使用自己的设置,而不是全局默认值。
参数
| 名称 | 类型 | 描述 |
|---|---|---|
action* | "save_settings" | "save_power_schedule" | "save_automations" | 要执行的操作;每个操作的说明见工具描述。 |
slate | object | (save_settings) |
pollIntervalSec | integer | (save_settings) |
nightlyReloadTime | string | HH:mm (save_settings) |
allowCctv | boolean | Allow CCTV on display screens(save_settings) |
facilityId | string | 设施 ID。如果所指的就是已连接的设施,则可省略。 |
schedule | object | 屏幕在人员值守时间(按偏移量扩展)或自定义每周时间段内开启,并带有假期规则。(save_power_schedule) |
autoPowerDisplays | boolean | 旧版电源自动化的开/关(已由电源排程取代)(save_automations) |
minsBeforeOpenDisplayOn | integer | 旧版电源自动化:开门前的分钟数(save_automations) |
minsAfterCloseDisplayOff | integer | 旧版电源自动化:关门后的分钟数(save_automations) |
displaysOnCheckIn | boolean | 有人签到时开启屏幕(save_automations) |
minsLastCheckInDisplayOff | integer | 配合 displaysOnCheckIn:最后一次签到后多少分钟关闭屏幕(save_automations) |
enableAutoBrightness | boolean | 在白天和夜间亮度之间切换(save_automations) |
dayTriggerType | "auto" | "staffed" | "custom" | 白天亮度的开始时间(save_automations) |
dayTimeStart | string | 当 dayTriggerType 为 custom 时:HH:mm(设施时间)(save_automations) |
dayOffsetMinutes | integer | 黎明或开门后的分钟数(save_automations) |
dayBrightnessLevel | integer | 白天亮度,%(save_automations) |
nightTriggerType | "auto" | "staffed" | "custom" | 夜间亮度的开始时间(save_automations) |
nightTimeStart | string | 当 nightTriggerType 为 custom 时:HH:mm(设施时间)(save_automations) |
nightOffsetMinutes | integer | 日落后或关门前的分钟数(save_automations) |
nightBrightnessLevel | integer | 夜间亮度,%(save_automations) |
bellMasterLevel | integer | 铃声主音量,%(save_automations) |
bellClubHoursLevel | integer | 人员值守时间内的铃声音量,%(save_automations) |
bellExtendedHoursLevel | integer | 延长时间内的铃声音量,%(save_automations) |
enableBellAutoVolume | boolean | 遵循铃声音量排程(save_automations) |
bellVolumeSchedule | object | 按星期划分的每周铃声音量时段(mon … sun);替换整个排程(save_automations) |
confirm | boolean | 仅在用户确认第一次调用返回的预览后设置 |
display_takeover_stop显示屏立即结束正在进行的 Display Screens 接管:针对某次发布(来自 display_publish 的 batchId)、针对目标(默认:发布到整个设施的接管),或使用 allScreens 结束发布到该设施、其屏幕或其分组的所有接管。品牌和组织级接管只能通过 batchId 停止。屏幕会在数秒内恢复为排程内容或默认内容;返回已停止的数量。提供多个屏幕、分组或目标时,一次调用会作用于全部对象;对大量对象执行操作前请先与用户确认。
参数
| 名称 | 类型 | 描述 |
|---|---|---|
batchId | string | 来自 display_publish 的接管发布(bt_…) |
targets | object | 内容的投放位置。可任意组合。分组名称和 ID 均可使用。brand 和 organisation 需要组织范围的 Display Screens 访问权限。 |
allScreens | boolean | 发布到该设施、其屏幕或其分组的所有接管 |
facilityId | string | 设施 ID。如果所指的就是已连接的设施,则可省略。 |
display_templated_write显示屏控制 Templated content 屏幕(display_screens_read 中显示模式为 "Templated content" 的屏幕):在屏幕上加载某天的训练课程,或控制轮次计时器。User managed content 屏幕和整页网站屏幕不受影响。
操作:
- load_program:加载训练课程。从设施的数据源,在一个或多个设施的每个 Templated content 屏幕上加载某个日期的训练课程(YYYY-MM-DD,默认今天);屏幕会在数秒内重新加载。用于显示今天或其他日期的训练,或在屏幕显示错误的训练时使用。涉及多个设施时需要 confirm。可能需要确认。
- clock:控制轮次计时器。在 Templated content 屏幕上播放、暂停、重新开始或停止轮次计时器,将轮次声音静音或取消静音,设置铃声音量(setvolume 配合 volume 0–100)或查询其状态。需要设施拥有 Templated content。需要 command。
参数
| 名称 | 类型 | 描述 |
|---|---|---|
action* | "load_program" | "clock" | 要执行的操作;每个操作的说明见工具描述。 |
facilityIds | array | 多个设施 ID,用于在每个设施执行相同的请求。代替 facilityId 使用。(load_program) |
date | string | 训练日期,YYYY-MM-DD(默认今天)(load_program) |
facilityId | string | 设施 ID。如果所指的就是已连接的设施,则可省略。 |
command | "getstate" | "play" | "pause" | "restart" | "stop" | "mute" | "unmute" | "setvolume" | (clock) |
volume | integer | 用于 setvolume:铃声音量,%(clock) |
confirm | boolean | 仅在用户确认第一次调用返回的预览后设置 |