Public Transit API Developer's Guide

Alert

Alert contains all available information about an individual transit alert or an announcement.

Note: The Alerts are sourced from transit agencies' API feeds and/or Twitter accounts (where available). If the alerts' origin is from Twitter, you are required to follow Twitter's general principles for presenting alerts correctly. We do not provide any data for Twitter's logos and links for Twitter's actions. The full guidance on the display requirements can be found on Twitter Display Requirements.
Table 1. Alert Type Attributes
Attribute Always Included Type Description
origin Yes String Source of the alert. Available values are:
  • API - received from API
  • RSS - received from RSS
  • WEB - obtained from WEB
  • TWITTER - received from Twitter
  • INVITRO - alert issued internally
severity - String The severity value The following values are possible:
  • DISRUPT - The disruption exists but the severity is unknown
  • INFO - No disruption, just information
  • LOW - Low severity disruption
  • MEDIUM - Medium severity disruption
  • HIGH - High severity disruption
operator Yes String Name of the operator of the public transit line.
id Yes String Identifier for the alert. The id is a unique value.
valid_till - DateTime Time in UTC until which the alert is valid.
valid_from - DateTime Time in UTC from which the alert is valid.
url - String URL which can be used by end-users to access the original alert. For example, for Twitter it would be an URL of the tweet.
sec_ids - IDREFS Whitespace-separated list of section Ids of a connection relevant to the given Alert.
Table 2. Alert Type Elements
Element Always Included Type Description
Info Yes Info Contains information about the public transit line or lines, such as expected closures or special requirements.
Link - Link Link to a web resource with additional information. Link nodes do not contain any text if inside an Alert node.
Transports - Transports List of transports affected by the alert.
Branding - Branding Some alert sources (like Twitter) have branding requirement and clients must comply to these, for example by showing branding info to user.