Web asset fields

The fields on a web content item you can set over the API, what each one accepts, and which ones only exist in v4.1.

A web content item is a URL plus the fields below. All of them are set the same way, by patching the asset.

curl -X PATCH \
  'https://api.screenlyapp.com/api/v4.1/assets?id=eq.<asset-uuid>' \
  -H "Authorization: Token $SCREENLY_API_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"zoom_level": 150, "send_metadata": true}'
FieldWhat it doesAccepts
headersHTTP headers the player sends with its requestObject, up to 50 entries
js_injectionScript run against the page after it loadsString, up to 65,536 characters. Write-only
send_metadataPlayer identifies itself to the page in X-Screenly-* headersBoolean, default false
client_cert_allowedPlayer presents its device certificateBoolean, default false
zoom_levelPage scale, as a percentage25 to 500, default 100
user_agentOverrides the user agent stringString, up to 1,024 characters
player_side_renderRender on the device rather than as a server screenshotBoolean, or null to let Screenly choose
screenshot_cache_secondsHow long a captured screenshot is reused60 to 86,400, default 60
screenshot_delay_secondsWait after load before capturing0 to 5, default 0
disable_verificationSkip the reachability check when adding the URLBoolean, default false

Version matters here

Only headers, js_injection, send_metadata and disable_verification are updatable in v4. The rest of that table does not exist on the v4 asset at all, so patching one against /v4/ is rejected rather than ignored.

Target /v4.1/. See Versions.

Reading them back

GET returns every field except js_injection, which comes back as a placeholder. Headers come back in full, tokens included, which is worth knowing before you decide where to keep a credential. See Authentication.

Fields that do nothing on their own

client_cert_allowed needs a server configured to ask for the certificate. send_metadata needs a page that reads the headers. screenshot_cache_seconds and screenshot_delay_seconds apply only when the page is rendered on our side, which is the Screenly Anywhere path. Setting any of them on content that does not meet the condition is harmless and has no effect.

The complete schema, every field and filter on every endpoint, is in the v4.1 API reference.

Type to search the documentation