v1

latestSwagger 2.02026-07-146023.3 KB

JSON - Rail Incidents

<h4 class="text-primary">Description</h4> <p>Returns reported rail incidents (significant disruptions and delays to normal service). The data is identical to WMATA's <a href= "http://www.metroalerts.info/rss.aspx?rs">Metrorail Service Status feed</a>.</p> <p>Rail incidents are refreshed once every 20 to 30 seconds approximately.</p> <h4 class="text-primary">Response Elements</h4> <table class="table table-condensed table-hover"> <thead> <tr> <th class="col-md-3">Element</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>Incidents</td> <td> Array containing rail disruption information (<a href= "#Incident">Incident</a>). </td> </tr> <tr> <td colspan="2"> <div class="text-primary" style="margin-top: 1em"> <a id="Incident" name="Incident">Incident Elements</a> </div> </td> </tr> <tr> <td>DateUpdated</td> <td>Date and time (Eastern Standard Time) of last update. Will be in YYYY-MM-DDTHH:mm:SS format (e.g.: 2010-07-29T14:21:28).</td> </tr> <tr> <td style="text-decoration: line-through">DelaySeverity</td> <td><span class="text-danger">Deprecated.</span></td> </tr> <tr> <td>Description</td> <td>Free-text description of the incident.</td> </tr> <tr> <td style="text-decoration: line-through">EmergencyText</td> <td><span class="text-danger">Deprecated.</span></td> </tr> <tr> <td style="text-decoration: line-through">EndLocationFullName</td> <td><span class="text-danger">Deprecated.</span></td> </tr> <tr> <td>IncidentID</td> <td>Unique identifier for an incident.</td> </tr> <tr> <td>IncidentType</td> <td>Free-text description of the incident type. Usually Delay or Alert but is subject to change at any time.</td> </tr> <tr> <td>LinesAffected</td> <td>Semi-colon and space separated list of line codes (e.g.: <span class="text-info">RD;</span> or <span class="text-info">BL; OR;</span> or <span class="text-info">BL; OR; RD;</span>). We do plan to update this to return something more reasonable like an array, but until then, use code similar to the following:<br> <br> <code>"RD; GR; BL;".split(/;[\s]?/).filter(function(fn) { return fn !== ''; })</code></td> </tr> <tr> <td style="text-decoration: line-through">PassengerDelay</td> <td><span class="text-danger">Deprecated.</span></td> </tr> <tr> <td style="text-decoration: line-through"> StartLocationFullName</td> <td><span class="text-danger">Deprecated.</span></td> </tr> </tbody> </table>
get/json/Incidents

Response

Default response code.