Category: Public information. Tags: Transit and travel, Schedules.
Previews



Views and forms
Views: canvas, corner, chip. Canvas forms: landscape, portrait, square, strip.
Card views, themes and publishing. Browse the gallery.
Data and privacy
Feed: screenrig.vessels/v1.
Feed documents carry source attribution. The Player supplies the feed to the card.
Properties
For theme, background, accent and position, see Common properties.
Set static properties in params. Bind data to a project card data key for live values; that document holds only dynamic properties. Without a data key, put the complete configuration in params. Nested rows describe the contents of their parent property.
Static properties
| Name | Type | Default | Values and limits | Description |
|---|---|---|---|---|
title | string | "Vessel traffic" | maxLength: 40 | |
port | string | "" | maxLength: 40 | The port's name, when the feed carries none. |
windowHours | integer | 12 | minimum: 1; maximum: 48 | Vessels due later than this are left out. |
count | integer | 5 | minimum: 2; maximum: 8 | Most vessels in each of the arrivals and departures lists. |
maxDistanceKm | integer | 50 | minimum: 5; maximum: 500 | The length of the approach lane: the distance at which a vessel starts it. |
units | string | "nautical" | "nautical", "metric", "imperial" | nautical: nm and kn. metric: km and km/h. imperial: mi and mph. |
staleMinutes | integer | 15 | minimum: 1; maximum: 1440 | |
hour12 | boolean | false |
Dynamic properties
| Name | Type | Default | Values and limits | Description |
|---|---|---|---|---|
vessels | array | [] | minItems: 0; maxItems: 100 | Vessels due at or leaving the port. A feed (screenrig.vessels/v1) wins when present; the data store supplies the same rows otherwise. |
vessels[].id | string | maxLength: 40 | ||
vessels[].name | string | minLength: 1; maxLength: 40; Required | ||
vessels[].type | string | maxLength: 30 | Vessel type, for example Container ship. | |
vessels[].flag | string | maxLength: 30 | ||
vessels[].lengthM | number | minimum: 1; maximum: 500 | ||
vessels[].from | string | maxLength: 40 | Port of departure, for an arrival. | |
vessels[].to | string | maxLength: 40 | Next port, for a departure. | |
vessels[].berth | string | maxLength: 40 | ||
vessels[].eta | string | maxLength: 32 | Arrival time, ISO 8601. | |
vessels[].etd | string | maxLength: 32 | Departure time, ISO 8601. | |
vessels[].status | string | "underway", "anchored", "berthed", "departing" | A berthed or departing vessel with an etd is a departure. | |
vessels[].distanceKm | number | minimum: 0; maximum: 5000 | Distance to the port. | |
vessels[].speedKt | number | minimum: 0; maximum: 60 | ||
updated | string | "" | maxLength: 32 | When the positions were fetched, ISO 8601 (data store only; a feed carries fetchedAt). |
Canvas example
Add this item to a playlist page’s primitives. Publish the playlist and assign a screen.
{
"id": "vessel-traffic",
"primitive": "card",
"card": "vessel-traffic",
"major": 1,
"params": {
"theme": "neomustard"
},
"rect": {
"x": 0,
"y": 0,
"width": 1920,
"height": 1080
},
"layer": 0,
"content_fit": "fill",
"data": "vessel-traffic-main"
}
Write live data
Create this document before showing the card, then replace it to update the screen without republishing. Use the same project as the playlist. Supply your API authorization through the environment; see API authentication.
curl --request PUT "https://api.screenrig.ai/api/card-data/vessel-traffic-main" \
--header "Authorization: Bearer $SCREENRIG_TOKEN" \
--header "ScreenRig-Project: $SCREENRIG_PROJECT" \
--header "Content-Type: application/json" \
--data '{"document":{"vessels":[],"updated":""}}'